Question: USE PHYTON ONLY 2. (25 pts) Write an inheritance hierarchy for classes Quadrilateral, Trapezoid, Parallelogram, Rectangle and Square. Use Quadrilateral as the super-class of the
USE PHYTON ONLY
2. (25 pts) Write an inheritance hierarchy for classes Quadrilateral, Trapezoid, Parallelogram, Rectangle and Square. Use Quadrilateral as the super-class of the hierarchy. Create and use a Point class to represent the corners in each shape and has attributes that represent x and y coordinates of a point. Each quadrilateral will have four Point objects. Make the hierarchy as deep (i.e., as many levels) as possible. Specify the attrributes (fields and methods) for each class. Write a main program that instantiates objects of your classes and asserts each object's area (except Quadrilateral) for some test cases
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
