Class Receptionist

java.lang.Object
  extended by Receptionist

public class Receptionist
extends Object

Class for a Receptionist object facilitating transaction for a Hotel.

Version:
1 August 2008
Author:
JP Vergara

Constructor Summary
Receptionist(Hotel h)
          Constructor for Receptionist objects.
 
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.
 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

checkIn

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

Parameters:
roomNumber - the room number (101, 102, 103)
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 (101, 102, 103)
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:
the total cash collected

occupant

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

Parameters:
roomNumber - the room number (101, 102, 103)
Returns:
the name of the current occupant