Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions