Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE USE ONLY PYTHON WRTE THS CODE WTH PYTHON PYTHON! (25 pts) Write an inheritance hierarchy for classes Quadrilateral, Trapezoid, Parallelogram, Rectangle and Square. Use
PLEASE USE ONLY PYTHON WRTE THS CODE WTH PYTHON PYTHON!
(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 objects area (except Quadrilateral) for some test casesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started