Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
(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
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