Question: C++ Create a Building class. The attributes for the Building are: Type (Commercial/Residential) Number of Rooms Number of Floors Square Footage Zoning (R1, R2, C1,

C++

Create a Building class.

  1. The attributes for the Building are:
    1. Type (Commercial/Residential)
    2. Number of Rooms
    3. Number of Floors
    4. Square Footage
    5. Zoning (R1, R2, C1, etc.)
    6. Two other attributes of your own choosing
  2. Create a constructor for the class that receives Type, Zoning, Number of Floors, Number of Rooms, and Square Footage. The constructor should set the attributes provided.
  3. Provide separate Accessor/Get Methods that will return Type, Number of Rooms, Number of Floors, Square Footage, and Zoning .
  4. Provide separate Mutator/Set Methods that will allow a user to add a room (specify floor and dimensions - must update the square footage) and rezone.
  5. Provide Accessor/Mutator methods for the attributes you provided as appropriate.

Create a main program that utilizes the Building class

-Prompt the user for the Type, Zoning, Number of Floors, Number of Rooms, and Square Footage

-Validate the information

-After Information from the user has been validated, create an object for the Building.

-Using the Accessor Methods, display the Buildings information (manufacturer, model, etc.).

-Allow the user to change the building. Validate any input before calling the appropriate functions.

-Allow the user to change any of the attributes you created (appropriately)

-Display the Building's information.

-Destruct the Building (create an appropriate destructor).

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!