|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Room
public class Room
Describes room objects in a hotel.
Constructor Summary | |
---|---|
Room(int rmNo,
double dRate)
Constructor for Room objects. |
Method Summary | |
---|---|
void |
changeRate(double newRate)
Changes the rate of the room. |
String |
getOccupant()
Returns the occupant of the room. |
double |
getRate()
Returns the daily rate of the room. |
int |
getRoomNumber()
Returns the number of the room. |
void |
occupy(String name,
int dayIn)
Causes a room to be occupied. |
int |
vacate(int dayCheckedOut)
Causes a room to be vacated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Room(int rmNo, double dRate)
rmNo
- room number to identify the roomdRate
- daily rate for this roomMethod Detail |
---|
public void changeRate(double newRate)
newRate
- new room ratepublic String getOccupant()
public double getRate()
public int getRoomNumber()
public void occupy(String name, int dayIn)
name
- name of the occupantdayIn
- day the room was occupiedpublic int vacate(int dayCheckedOut)
dayChecked
- day the room was vacated
(should be later than check in date)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |