Q) Draw an inheritance hierarchy for class Quadrilateral, Trapezoid, Parallelogram, Rectangle and square.Use Quadrilateral as the base of the hierarchy. Make the hierarchy as deep as possible.
Can anyone help me to create it as a proper program?
Well you have the base class already: Quafrilateral. That goes on top. Next in hierarchy would be the ones that are the closest to a quadrilaterl, that is, they share the same properties. Making it as 'deep' as possible means that you would probably want to create a pretty straight line vertically, rather than horizontaly: Like
class Y class Z
It doesn't sound like you are being asked to write a program, just a diagram.