Create a class RoomOccupancy that can be used to record the number of people in the rooms of a building. The class has the attributes numberInRoomthe number of people in a room totalNumberthe total number of people in all rooms as a static variable The class has the following methods: addOneToRoomadds a person to the room and increases the value of totalNumber removeOneFromRoomremoves a person from the room, ensuring that numberInRoom does not go below zero, and decreases the value of totalNumber as needed getNumberreturns the number of people in the room getTotala static method that returns the total number of people
Programming
[Solved] SOLVED:Room Occupancy
$25
File Name: SOLVED:Room_Occupancy.zip
File Size: 197.82 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.