Slip 30 - A) Derive a class Rectangle from class Square. Create one more class Triangle. Create an interface with only one method called cal_area (). Implement this interface in all the classes. Include appropriate data members and constructors in all classes. Write a program to accept details of a Rectangle, Square and Triangle and display the area.
0 Comments