Class Receptionist

java.lang.Object
  extended by Receptionist

public class Receptionist
extends Object

Class for a Receptionist object facilitating transaction for a Hotel.

Version:
02 September 2008
Author:
Jessica Sugay

Constructor Summary
Receptionist(Hotel h)
          Constructor for Receptionist objects.
 
Method Summary
 void addNewRoom(int roomNumber, double dailyRate)
          Adds a new room to the hotel
 void changeRoomRate(int roomNumber, double dailyRate)
           
 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.
 double getCash()
          Returns the collections for this receptionist.
 String occupant(int roomNumber)
          Returns the current occupant of the given room.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Receptionist

public Receptionist(Hotel h)
Constructor for Receptionist objects.

Parameters:
the - hotel the receptionist works in.
Method Detail

addNewRoom

public void addNewRoom(int roomNumber,
                       double dailyRate)
Adds a new room to the hotel

Parameters:
roomNumber - the room number
dailyRate - the daily rate of the room

changeRoomRate

public void changeRoomRate(int roomNumber,
                           double dailyRate)

checkIn

public void checkIn(int roomNumber,
                    String occupantName,
                    int day)
Facilitates checking into a room.

Parameters:
roomNumber - the room number
occupantName - name of the occupant
day - the day the occupant wishes to check in

checkOut

public double checkOut(int roomNumber,
                       int day,
                       double extraCharges)
Facilitates checking out of a room.

Parameters:
roomNumber - the room number
day - the day the occupant will check out
extraCharges - any extra charges (beyond the room rate)
Returns:
the amount charged to the occupant

getCash

public double getCash()
Returns the collections for this receptionist.

Returns:
cash the total cash collected

occupant

public String occupant(int roomNumber)
Returns the current occupant of the given room. Return "no occupant" if not occupied.

Parameters:
roomNumber - the room number
Returns:
the name of the current occupant