Write a C++ program that asks the user to enter the number of rooms in a house. For each room, the user must be prompted to enter the following details of each room to be stored as attributes of the class Room.
• width length colour
Declare 'name' as a public attribute.
Overload the unary '+' operator so that when called (with object name), the name, area and colour of the room is output to the screen. Define all functions. Assume the units of the width and length of the room is 'm'.

I see no reason to write this. https://www.numerade.com/ask/question/write-c-program-that-asks-the-user-to-enter-the-number-of-rooms-in-house-for-cach-room-the-user-must-be-prompted-to-enter-the-following-details-of-each-room-to-be-stored-as-attributcs-of-thc-79362/ for example appears to have it completed.

Maybe this is homework, maybe it's not but I can't tell from your writing so far.

If it is homework, avoid demands that others write it and tell what where you are stuck. Then we can discuss that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.