Question: Can anyone help me with this Problem: Create a class called RoomOccupancy that can be used to record the number of people in the rooms

 Can anyone help me with this Problem: Create a class called

Can anyone help me with this

Problem: Create a class called RoomOccupancy that can be used to record the number of people in the rooms of a building. The class has the attributes * numberInRoom the number of people in a room totalNumber-the total number of people in all rooms as a STATIC variable . roomCharges-the charge for the nightly occupancy of the room, in dollars. The class has the following methods: addOnToRoom adds a person to the room and increases the value of totalNumber removeOneFromRoom does not go below zero, and decreases the value of totalNumber as needed. getNumber returns the number of people in the room. getTotal- a static method that returns the total number of people - removes a person from the r oom, ensuring that numberlnRoom In addition, the usual methods will be included, as usual: .At least TWO constructors - a defaulto argument constructor and an overloaded . . constructor The accessor and mutator methods ( getters and setters). The toString' method. The 'equals method ( use the model used in the 'Person' class) The fina The 'copy constructor lize' method Write a client/test program to ex ercise the RoomOccupa ncy class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!