Question: ONLY PYTHON!! ONLY PYTHON!!! PLEASE WOULD YOU PLEASE ANSWER TWO QUESTIONS (25 pts) Write an inheritance hierarchy for classes named Quadrilateral, Trapezoid, Parallelogram, Rectangle and

ONLY PYTHON!! ONLY PYTHON!!! PLEASE WOULD YOU PLEASE ANSWER TWO QUESTIONS

ONLY PYTHON!! ONLY PYTHON!!! PLEASE WOULD YOU PLEASE ANSWER TWO QUESTIONS (25

(25 pts) Write an inheritance hierarchy for classes named 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. Each quadrilateral will have four Point objects. Make the hierarchy as deep (i.e., as many levels) as possible. Specify the attributes (fields and methods) for each class. The instance variables of Quadrilaterals (and its sub-classes) should be the x-y coordinate pairs for the four endpoints of the Quadrilateral. Write a program that instantiates objects of your classes and asserts each object's area (except Quadrilateral) for some test cases. (25 pts) Please implement a recursive method that takes a list as input, reverts the list and returns only the odd numbers. For example when you submit [1, 2, 3, 4] as input it shall return [3, 1], when you submit [3, 5, 9, 2, 3, 3, 4] it shall return [3, 3, 9, 5]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!