(Singular inheritance) write a program to create a CIRCLE class with one field as radius,
Used to calculate the area of a circle. Create another RECTANGLE class used for
Calculate the area of a rectangle which is a subclass of the CIRCLE class. Use the concept
Of individual inheritance so that the radius of the circle class can be reused as the length in
Class rectangle. Take the necessary data members and member jobs for each of the seasons
to solve this problem. All data members are initialized by the originators. Turns out
Score by accessing the Zone method for both classes through Objects
Class rectangle.
Comments
Leave a comment