Question: In C++. Inheritance. Create a class building with variables: int rooms, int floors, int area. Write the code for: Constructor(s) for the class, getters-setters for

In C++. Inheritance. Create a class building with variables: int rooms, int floors, int area. Write the code for: Constructor(s) for the class, getters-setters for all the variables. Create a subclass house of building. House has three more variables: string name, int bedrooms, int bathrooms. Write the appropriate code for constructors and getter-setters for the subclass. Include a main function in your code, where you create 2 houses with different properties. Output the rooms, floors, area, names, bathrooms, and bedrooms of the two houses you created. Output the name of the house with the largest area. All the lines must have an explanation.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!