Small program that includes pythonic implementations of classes, objects, inheratince, and unittests.
The names.py is the object class that includes only a first name and a last name. Name class includes a fillin function to return variables for logical operations. Also the str function returns the formatted string when a name object is printed instead of the default object's bytecode.
loops.py includes a function loop that utilizes names.py to create name objects and name them independantly for later purposes if need be. This is important because normally, unless modified, objects created in loops are unnamed and generic making it difficut to access created objects after the loop is completed. The object variables are stored within independent lists that run in parallel.
Inherited from names.py is name_with_middle which inludes the addition of a middle name.
Other additions to the names_with_middle is the fillin function and str functions.
loop_with_middle is a modified instance of the original loop() to accommodate the additional functionality of the name_with_middle object.
format_a_name.py takes in both types of objects and returns a formatted string to be printed out. This is accomplished by making two of the arguments in the function parameters be empty default strings.
The main class handles both types of objects differently. For the names.py class it uses polymorphism to create a dictionary of first names as keys and last names as values. For the names_with_middle , all three parallel lists are passed into the function.
finally, we test both objects using unittests.