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

  1. Prompt the user for the Type, Zoning, Number of Floors, Number of Rooms, and Square Footage
  2. Validate the information
  3. After Information from the user has been validated, create an object for the Building.
  4. Using the Accessor Methods, display the Buildings information (manufacturer, model, etc.).
  5. Allow the user to change the building. Validate any input before calling the appropriate functions.
  6. Allow the user to change any of the attributes you created (appropriately)
  7. Display the Building's information.
  8. 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

Advances In Spatial And Temporal Databases 8th International Symposium Sstd 2003 Santorini Island Greece July 2003 Proceedings Lncs 2750

Authors: Thanasis Hadzilacos ,Yannis Manolopoulos ,John F. Roddick ,Yannis Theodoridis

2003rd Edition

3540405356, 978-3540405351

More Books

Students also viewed these Databases questions

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago