Interface and Abstract Class in Java | Practice Questions

Write a program to calculate area of Circle by using getArea(int radius) method which is inherited from Shape and print the value by invoking that method from TestCircle class. Draw class diagrams for Shape,Circle and TestCircle.

Write a program to calculate area of Rectangle by using getArea(int length,int width) method which is inherited from Shape and print the value by invoking that method from TestRectangle class. Draw class diagrams for Shape, Rectangle and TestRectangle.

Write a program to calculate area of Square by using getArea(int length) method which is inherited from Shape and print the value by invoking that method from TestSquare class. Draw class diagrams for Shape, Square and TestSquare.

Write a program to calculate the distance how much Kangaroo jumps by using jumping(double distance) method which is extended from Animal and print the value by invoking that method from TestKangaroo class. Draw class diagrams for Animal,Kangaroo and TestKangaroo.

Write a program to calculate the distance how much Tiger jumps by using jumping(double distance) method which is extended from Animal and print the value by invoking that method from TestTiger class. Draw class diagrams for Animal, Tiger and TestTiger .

Get Project Solution Now

Comments