MultipIe Inheritance Using Rectangle Class
Understand multiple inheritance with an example of a derived Rectangle class.
We'll cover the following...
Challenge
Write a program that has 3 classes in it (Shape
, Cost
, and Rectangle
). Of these, Shape
and Cost
should be independent classes, whereas Rectangle
should be derived from Shape
and Cost
.
The Shape
class should maintain shape type (Plate or Ring), length and breadth of the shape type. The ...