Question

Assignment 5.2:

Define a base class and one derived class wherein they both have magic methods for

init and str; they both have at least one attribute and at least one non-magic method;

and that the derived class has overrides for at least one attribute and at least one

non-magic method. Instantiate an object of each class and test that the objects have

correct values for the attributes and return correct values when the methods are

called. Use assert statements for those tests. Provide that the class may be used by

another program. You do not have to provide that other program.

Question image 1