Answer to Question #246943 in C++ for Elena

Question #246943

Write a program to create a class CIRCLE with one

field as radius, used to calculate the area of a Circle. Create another class

RECTANGLE used to calculate the area of the rectangle which is a subclass

of CIRCLE class. Use the concept of single inheritance such that the radius

of circle class can be re-used as length in rectangle class. Take necessary

data members and member functions for both the classes to solve this

problem. All the data members are initialized through the constructors. Show the result by accessing the area method of both the classes through the

objects of rectangle class.

2 (Multilevel Inheritance) Modify the program no. 1 as follows:

Derive a class named as BOX from RECTANGLE class. Take necessary

data & member functions for this box class to calculate the volume of the

box. All the data members are initialized through the constructors. Show the

result by accessing the area method of circle and rectangle and the volume

method of box class through the objects of box class.


1
Expert's answer
2021-10-05T06:20:21-0400
Dear Elena, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS