Question: WAP in Java Create a class Data with data members: height and breadth of object given by the user and member functions get_data() to read
WAP in Java Create a class Data with data members: height and breadth of object given by the user and member functions get_data() to read the values and put_data() to display the values. Create another class Rectangle that inherits class Data and implement its methods areaRectangle () and perimeterRectangle() that computes the area and perimeter of a rectangle. Create another class Triangle that inherits class Data and implement its methods areaTriangle() and perimeterTriangle() that computes the area and perimeter of a triangle
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
