Scenario v.3 for Edit room function
- A manager enters his username, password, and clicks on the login button on LoginFrm.
- The method actionPerformed() of LoginFrm is called.
- The method actionPerformed() calls User to create an User object.
- The class User packs the information into an User object
- The class User returns User object to the method actionPerformed().
- The method actionPerformed() calls method checkLogin() of the class UserDAO.
- The method checkLogin() checks the login information.
- The method checkLogin() calls the class User set more two attributes name, position.
- The class User calls its method setName(), setPosition().
- The class User returns the User object to the method checkLogin().
- The method checkLogin() returns the results to the actionPerformed().
- The method actionPerformed() calls the class ManagerHomeFrm.
- The constructor ManagerHomeFrm() is called
- The interface ManagerHomeFrm is shown to the manager.
- The manager clicks on the manage room button.
- The method actionPerformed() is called.
- The method actionPerformed() calls the class RoomManageFrm.
- The constructor RoomManageFrm() is called
- The interface RoomManageFrm is shown to the manager.
- The manager clicks on the edit room button.
- The method actionPerformed() is called.
- The method actionPerformed() calls the class SearchRoomFrm.
- The constructor SearchRoomFrm() is called
- The interface SearchRoomFrm is shown to the manager.
- The manager enters the room name and clicks search button.
- The method actionPerformed() is called.
- The method actionPerformed() calls the method searchRoom() of the class RoomDAO.
- The method searchRoom() serach room by name.
- The method searchRoom() calls the class Room to pack the results.
- The class Room packs each Room object.
- The class Room returns Room object to the method searchRoom().
- The method searchRoom() returns the results to the method actionPerformed() of the class SearchRoomFrm.
- The method actionPerformed() displays the results to the manager.
- The manager clicks on a room in the list to edit.
- The method actionPerformed() is called.
- The method actionPerformed() calls the class EditRoomFrm.
- The constructor EditRoomFrm() is called,
- The interface EditRoomFrm is shown to the manager.
- The manager modifies some attributes and then clicks on the save button.
- The method actionPerformed() of the class EditRoomFrm is called
- The method actionPerformed() calls the class Room to set modified attributes.
- The class Room sets modifies attributes into a Room object
- The class Room return the results to the method actionPerformed().
- The method actionPerformed() calls the method updateRoom() of the class RoomDAO.
- The method updateRoom() executes.
- The method updateRoom() returns to the method actionPerformed().
- The method actionPerformed() displays a success massage.
- The manager clicks on the OK button of the message.
- The method actionPerformed() calls the class ManagerHomeFrm.
- The interface ManagerHomeFrm is shown to the client.

Scenario v.3 for booking room function
- A client calls to the hotel representative (a seller) to book a room.
- The seller clicks on the function booking on the interface SellerHomeFrm.
- The method actionPerformed() of class SellerHomeFrm is called.
- The method actionPerformed() calls the class SearchFreeRoomFrm.
- The constructor SearchFreeRoomFrm() is called
- The interface SearchFreeRoomFrm is shown to the seller.
- The seller asks the client about the checkin/checkout date.
- The client tells the desired checkin/checkout date to the seller.
- The seller enters them into checkin/checkout fields and clicks search.
- The method actionPerformed() of class SearchFreeRoomFrm is called.
- The method actionPerformed() calls the method searchFreeRoom() of class RoomDAO.
- The method searchFreeRoom() executes.
- The method searchFreeRoom() calls the class Room to pack the results.
- The class Room pack each result into a Room object
- The class Room returns the object to the method searchFreeRoom().
- The method searchFreeRoom() returns the results to the method actionPerformed()
- The method actionPerformed() displays the results on the interface SearchFreeRoomFrm to the seller.
- The seller informs all available rooms to the client and asks him to choose one.
- The client informs the desired room to the seller.
- The seller clicks on a room which satisfies the client requirement.
- The method actionPerformed() of class SearchFreeRoomFrm is called.
- The method actionPerformed() calls the class Booking to pack information to transfer to other interface.
- The class Booking calls its setter methods
- The class Booking calls the class BookedRoom to pack its component
- The class BookedRoom packs its attributes
- The class BookedRoom return to the class Booking the packed object.
- The class Booking returns the Booking object to the method actionPerformed().
- The class actionPerformed() calls the class SearchClientFrm.
- The constractor SearchClientFrm() is called
- The interface SearchClientFrm is shown to the seller.
- The seller requires the personal information from the client.
- The client provides it to the seller.
- The seller enters the client name and clicks search.
- The method actionPerformed() of class SearchClientFrm is called.
- The method actionPerformed() calls the method searchClient() of the class ClientDAO.
- The method searchClient() executes.
- The method searchClient() calls the class Client to pack the results.
- The class Client packs a Client object
- The class Client return the packed object to the method searchClient().
- The method searchClient() returns the results to the method actionPerformed().
- The method actionPerformed() displays the results on the SearchClientFrm to the seller.
- The seller clicks on the row corresponding to the current client.
- The method actionPerformed() of the class SearchClientFrm is called.
- The method actionPerformed() calls the class Booking to add client information to it
- The class Booking calls the method setClient()
- The class Booking returns the packed object to the method actionPerformed()
- The method actionPerformed() calls the class ConfirmFrm.
- The constractor ConfirmFrm() is called
- The interface ConfirmFrm is shown to the seller.
- The seller repeats the booking information to the client and asks him to confirm.
- The client confirms it.
- The seller clicks on the confirm button.
- The method actionPerformed() of the class ConfirmFrm is called.
- The method actionPerformed() calls the method addBooking() of the class BookingDAO.
- The method addBooking() executes.
- The method addBooking() returns the turn to the method actionPerformed()
- The method actionPerformed() displays a success message
- The seller clicks on the OK button of the message.
- The method actionPerformed() recalls the interface SellerHomeFrm.
- The interface SellerHomeFrm is shown to the seller.
- The seller confirms the successful booking to the client and ends the call.

Scenario v.3 for view room statistic function
- A manager clicks on the view report function on the interface ManagerHomeFrm (after loging in).
- The method actionPerformed() of the class ManagerHomeFrm is called.
- The method actionPerformed() calls the class SelectStatFrm.
- The constructor SelectStatFrm() is called,
- The interface SelectStatFrm is shown to the manager.
- The manager configs to view the report of room by revenue.
- The method actionPerformed() of the class SelectStatFrm is called
- The method actionPerformed() calls the class RoomStatFrm.
- The constructor RoomStatFrm() is called,
- The interface RoomStatFrm is shown to the manager.
- The manager enters the start date, end date of statistic and clicks on the view button
- The method actionPerformed() of the class RoomStatFrm is called.
- The method actionPerformed() calls the method getRoomStat() of the class RoomStatDAO.
- The method getRoomStat() executes.
- The method getRoomStat() calls the class RoomStat to pack the results.
- The class RoomStat packs its normal attributes
- The class RoomStat calls the setter methods from the class Room to pack the attribute inherited from the class Room.
- The class Room packs its attributes
- The class Room returns the packed object to the class RoomStat.
- The class RoomStat returns the packed results to the method getRoomStat()
- The method getRoomStat() returns the results to the method actionPerformed()
- The method actionPerformed() displays the results on the interface RoomStatFrm to the manager.
- The manager clicks on a row to view detail of a room.
- The method actionPerformed() of the class RoomStatFrm is called.
- The method actionPerformed() calls the class RoomDetailFrm
- The constructor RoomDetailFrm() is called.
- The constructor RoomDetailFrm() calls the method getBookingOfRoom() of the class BookingDAO.
- The method getBookingOfRoom() executes.
- The method getBookingOfRoom() calls the class Booking to pack object.
- The class Booking packs its normal attributes
- The class Booking calls the class Client to pack its object attribute
- The class Client packs its attributes
- The class Client returns the packed object to the class Booking
- The class Client calls the class BookedRoom to pack its object attribute
- The class BookedRoom packs its normal attributes
- The class BookedRoom calls the class Room to pack its object attributes
- The class Room packs its attributes
- The class Room returns the packed object to the class BookedRoom
- The class BookedRoom return the object to the class Booking
- The class Booking returns the object to the method getBookingOfRoom()
- The method getBookingOfRoom() return the results to the constructor RoomDetailFrm()
- The constructor RoomDetailFrm() displays the detailed statistic of the chosen room on the interface RoomDetailFrm to the manager.
