Chapter 9: Problem 8
Write an inheritance hierarchy for classes Quadrilateral, Trapezoid, Parallelogram, Rectangle and Square. Use Quadrilateral as the superdass of the hierarchy. Create and use a Point class to represent the points in each shape. Make the hierarchy as deep (i.e., as many levels) as possible. Specify the instance variables and methods for each class. The private instance variables of Quadrilateral should be the \(x\) -y coordinate pairs for the four endpoints of the Quadrilateral. Write a program that instantiates objects of your dasses and outputs each object's area (except Quadri lateral).
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.