Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
- The attributes for the Building are:
- Type (Commercial/Residential)
- Number of Rooms
- Number of Floors
- Square Footage
- Zoning (R1, R2, C1, etc.)
- Two other attributes of your own choosing
- 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.
- Provide separate Accessor/Get Methods that will return Type, Number of Rooms, Number of Floors, Square Footage, and Zoning .
- 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.
- 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started