subject

Construct a class named room (in a separate file set, 1 point) that declares two double-precision data members named length and width, and a string data member for the description of the room (1 point). include constructor that initializes each double data member to 1.0 and the string as "room" when a room object is created (1 point). add accessor, mutator and display functions (1 point).

use this class to:

a) create four room objects: hall (length=12.40, width=3.5), kitchen (length=14, width=14), living room (length=12.4, width=20), dining room (length=14, width=10.5) and display each room (1 point)
b) create an array of pointers to room and assign each element in the array to a dynamic object (hint: use operator new) where the values are copied from the objects created in step a (hint: use the = operator ) (1 point)

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 20:30, fickllyd000
In this lab, you complete a prewritten c program that calculates an employee’s productivity bonus and prints the employee’s name and bonus. bonuses are calculated based on an employee’s productivity score as shown below. a productivity score is calculated by first dividing an employee’s transactions dollar value by the number of transactions and then dividing the result by the number of shifts worked.
Answers: 3
image
Computers and Technology, 22.06.2019 21:00, jennifer7037
Ulia is planning to attend the same private four-year college her parents attended. she wants to save at least $18,000 in four years to contribute to her college education. which monthly deposit amounts can julia use to achieve her goal? check all that apply.
Answers: 2
image
Computers and Technology, 23.06.2019 03:00, Julianhooks
State 7 common key's for every keyboard
Answers: 1
image
Computers and Technology, 23.06.2019 06:40, euniceyi56
How many nibbles can be stored in a 16-bit word?
Answers: 1
You know the right answer?
Construct a class named room (in a separate file set, 1 point) that declares two double-precision da...

Questions in other subjects:

Konu
Mathematics, 09.02.2021 16:20
Konu
Mathematics, 09.02.2021 16:20
Konu
Mathematics, 09.02.2021 16:20
Konu
Mathematics, 09.02.2021 16:20
Konu
Mathematics, 09.02.2021 16:20
Konu
Mathematics, 09.02.2021 16:20
Konu
Mathematics, 09.02.2021 16:20