|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Hotel
public class Hotel
Describes a Hotel object containing three rooms. The rooms are numbered 101, 102, and 103. The daily room rates are: P2000.00 for Room 101, P2500.00 for Room 102, and P3000.00 for Room 103.
Constructor Summary | |
---|---|
Hotel()
Constructor for a Hotel object. |
Method Summary | |
---|---|
void |
checkIn(int roomNumber,
String occupantName,
int day)
Facilitates checking into a room. |
double |
checkOut(int roomNumber,
int day,
double extraCharges)
Facilitates checking out of a room. |
String |
getOccupant(int roomNumber)
Returns the current occupant of the given room. |
double |
getTotalCash()
Returns the total cash collections for the hotel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Hotel()
Method Detail |
---|
public void checkIn(int roomNumber, String occupantName, int day)
roomNumber
- the room number (101, 102, 103)occupantName
- name of the occupantday
- the day the occupant wishes to check inpublic double checkOut(int roomNumber, int day, double extraCharges)
roomNumber
- the room number (101, 102, 103)day
- the day the occupant will check outextraCharges
- any extra charges (beyond the room rate)
public String getOccupant(int roomNumber)
roomNumber
- the room number (101, 102, 103)
public double getTotalCash()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |