Question: Construct a class named Room that declares two double-precision data members named length and width (2 points). Include a constructor that initializes each data member

Construct a class named Room that declares two double-precision data members named length and width (2 points). Include a constructor that initializes each data member to 1.0 when a Room object is created (1 point). Add two accessor functions for displaying the length and width values of a Room object and two mutator functions that allow changing these data member values. (2 points)

Write a program that tests all functionality of this class. (3 points)

Extra Credit: Create this class in a separate set of files (i.e. Room.cpp and Room.h) (1 point)

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!