Hotel.java
to both provide a class to represent a hotel
and a main method described below. This class should have at least one field, a String[][] holding
the name of the person in each hotel room. (All of the rooms are singles.) Provide a
constructor which brings in two ints, one for number of floors, one for rooms per floor, and
a default constructor which creates a Hotel with 3 floors and 10 rooms per floor.
Provide a method
checkIn(String name, int room)
that puts the named person in the specified room,
if the room is currently empty. If the room was available, return true, but if the room is
already occupied, return false. Provide a method
checkOut(int room)
to clear a room which returns nothing. Finally, provide a method
isFull()
which returns true if all of the rooms are occupied, otherwise false.
The main method of the program should ask the user for how many floors their hotel is, and then how many rooms per floor. There can be at most 99 rooms per floor, and at most 10 floors, and there must be at least one room and one floor per room. This input should be checked for validity; on invalid input the user should be reprompted. With this data for floors and rooms per floor, a Hotel object should be created.
The user is then repeatedly presented a menu which asks if they want to
If the user says 2, prompt the user for a room number to vacate.
If the user says 3, exit the loop and finish the program.
ssh username@cs.centenary.edu
to connect with the cs server.
mkdir csc234/project2
logout
scp filenames username@cs.centenary.edu:"csc234/project2"