Question: using c++ Cheating=ZERO Define a House class which has the following 1- int hno (House number), int roomNo (number of Rooms in the house), 2-char

 using c++ Cheating=ZERO Define a House class which has the following

using c++

Cheating=ZERO Define a House class which has the following 1- int hno (House number), int roomNo (number of Rooms in the house), 2-char *StreetName (Street Name), char *City; 3-Room *r (pointer to array of Room Objects defined in the heap). The size of array of room objects is roomNo. Room Class has double area, and char color[10]. 4-Door arr[4] which is an array of objects of Door class. Door class has double size and char color[10]. do the following: A)Define all necessary Constructors + Destructors + functions. Inside constructors, Do all possible initializations for data members (3 points). B)Define House h1 object with 3 rooms, h2 with 4 rooms and h3 with 3 rooms. Do all necessary initializations for its data members inside a constructor. (3 points) Do what is required to know the number of active objects of class house using static data member and function. Use this inside main function (3 points) D)Define a function that prints the colors of the doors in h1. (3 points) E) define a function that prints the total area of house h2.(3 points) F)Define a function that prints the number of similar door colors in both houses h1 and 13. (3 points) G) using setColor function member in class Door, change all doors colors in h3 to Yellow. (2 points) using C+

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!