Hierarchical Inheritance in java oops
//Hierarchical Inheritance class Shape { float length,breadth,radius; } class Rect extends Shape { Rect(float l,float b) { length=l; breadth=b; } float rectangleArea() { return length*breadth; } } class Circle extends Shape { Circle(float r) { radius=r; } float circleArea() { […]