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)
Provide source code (all files) containing comment with your name, course code and date (1 point). Also provide screenshot of a sample run (1 point).
Submit source code and screenshot together in a zip file.
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