Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Implement the following class hierarchy using Python and create a program to tes

ID: 3871157 • Letter: I

Question

Implement the following class hierarchy using Python and create a program to test it. Make sure each class contains a constructor (-init-) with default parameter values equal to 0 The syntax to invoke the superclass A of a class B is super(A, self).-inti-() 1. Test Program def main() myBox Box(5,2,3) myBox.setPercentLoaded(75) print(str(myBox.getPercentLoaded())) print( The volume of the box isstr(myBox.calcVolume))and isstr(myBox.getPercentLoaded())" loaded") myCylinder Cylinder(10) myCylinder.setRadius(5) print( The volume of the cylinder is " + str(myCylinder.calcVolume())) main() Container Attrs. Circle Attrs. PercentLoaded Radius Methods Methods setPercentLoad getPercentLoad setRadius getRadius calcArea Box Attrs, Height Width Length Methods Cylinder Attrs. Length Methods calcVolume calcVolume

Explanation / Answer

Everything is quite simple so no comments are written if there is any confusion you can ask in comment, I am available to help.