Answered step by step
Verified Expert Solution
Link Copied!

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.

  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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions

Question

Describe factors that influence training and development.

Answered: 1 week ago

Question

How are members held accountable for serving in the assigned roles?

Answered: 1 week ago