1. Create a class called Shape with protected data members as width, height and appropriate member functions. Derive another class called Rectangle having only member as getarea(). Test the program which finds area of rectangle.
2. create a class called shape having protected data members width and height.
Create another class called paint having only member called paint_cost() which finds total cost of painting with rate of Rs 80 per unit area.
Derive a class called rectangle from these two classes having only one member called get_area(). Test the program to find cost of painting of the rectangle.
3. create a base class called student with members name , rollnumber and appropriate member functions .Derive a class called test having protected members subject1 subject2 ,subject3 each out of 100. Derive another class called result from test which displays first division second division or third division. Test the program using main function.
2. create a class called shape having protected data members width and height.
Create another class called paint having only member called paint_cost() which finds total cost of painting with rate of Rs 80 per unit area.
Derive a class called rectangle from these two classes having only one member called get_area(). Test the program to find cost of painting of the rectangle.
3. create a base class called student with members name , rollnumber and appropriate member functions .Derive a class called test having protected members subject1 subject2 ,subject3 each out of 100. Derive another class called result from test which displays first division second division or third division. Test the program using main function.