Sequence diagram (design)

Scenario v.3 for Edit room function

  1. A manager enters his username, password, and clicks on the login button on LoginFrm.
  2. The method actionPerformed() of LoginFrm is called.
  3. The method actionPerformed() calls User to create an User object.
  4. The class User packs the information into an User object
  5. The class User returns User object to the method actionPerformed().
  6. The method actionPerformed() calls method checkLogin() of the class UserDAO.
  7. The method checkLogin() checks the login information.
  8. The method checkLogin() calls the class User set more two attributes name, position.
  9. The class User calls its method setName(), setPosition().
  10. The class User returns the User object to the method checkLogin().
  11. The method checkLogin() returns the results to the actionPerformed().
  12. The method actionPerformed() calls the class ManagerHomeFrm.
  13. The constructor ManagerHomeFrm() is called
  14. The interface ManagerHomeFrm is shown to the manager.
  15. The manager clicks on the manage room button.
  16. The method actionPerformed() is called.
  17. The method actionPerformed() calls the class RoomManageFrm.
  18. The constructor RoomManageFrm() is called
  19. The interface RoomManageFrm is shown to the manager.
  20. The manager clicks on the edit room button.
  21. The method actionPerformed() is called.
  22. The method actionPerformed() calls the class SearchRoomFrm.
  23. The constructor SearchRoomFrm() is called
  24. The interface SearchRoomFrm is shown to the manager.
  25. The manager enters the room name and clicks search button.
  26. The method actionPerformed() is called.
  27. The method actionPerformed() calls the method searchRoom() of the class RoomDAO.
  28. The method searchRoom() serach room by name.
  29. The method searchRoom() calls the class Room to pack the results.
  30. The class Room packs each Room object.
  31. The class Room returns Room object to the method searchRoom().
  32. The method searchRoom() returns the results to the method actionPerformed() of the class SearchRoomFrm.
  33. The method actionPerformed() displays the results to the manager.
  34. The manager clicks on a room in the list to edit.
  35. The method actionPerformed() is called.
  36. The method actionPerformed() calls the class EditRoomFrm.
  37. The constructor EditRoomFrm() is called,
  38. The interface EditRoomFrm is shown to the manager.
  39. The manager modifies some attributes and then clicks on the save button.
  40. The method actionPerformed() of the class EditRoomFrm is called
  41. The method actionPerformed() calls the class Room to set modified attributes.
  42. The class Room sets modifies attributes into a Room object
  43. The class Room return the results to the method actionPerformed().
  44. The method actionPerformed() calls the method updateRoom() of the class RoomDAO.
  45. The method updateRoom() executes.
  46. The method updateRoom() returns to the method actionPerformed().
  47. The method actionPerformed() displays a success massage.
  48. The manager clicks on the OK button of the message.
  49. The method actionPerformed() calls the class ManagerHomeFrm.
  50. The interface ManagerHomeFrm is shown to the client.

Scenario v.3 for booking room function

  1. A client calls to the hotel representative (a seller) to book a room.
  2. The seller clicks on the function booking on the interface SellerHomeFrm.
  3. The method actionPerformed() of class SellerHomeFrm is called.
  4. The method actionPerformed() calls the class SearchFreeRoomFrm.
  5. The constructor SearchFreeRoomFrm() is called
  6. The interface SearchFreeRoomFrm is shown to the seller.
  7. The seller asks the client about the checkin/checkout date.
  8. The client tells the desired checkin/checkout date to the seller.
  9. The seller enters them into checkin/checkout fields and clicks search.
  10. The method actionPerformed() of class SearchFreeRoomFrm is called.
  11. The method actionPerformed() calls the method searchFreeRoom() of class RoomDAO.
  12. The method searchFreeRoom() executes.
  13. The method searchFreeRoom() calls the class Room to pack the results.
  14. The class Room pack each result into a Room object
  15. The class Room returns the object to the method searchFreeRoom().
  16. The method searchFreeRoom() returns the results to the method actionPerformed()
  17. The method actionPerformed() displays the results on the interface SearchFreeRoomFrm to the seller.
  18. The seller informs all available rooms to the client and asks him to choose one.
  19. The client informs the desired room to the seller.
  20. The seller clicks on a room which satisfies the client requirement.
  21. The method actionPerformed() of class SearchFreeRoomFrm is called.
  22. The method actionPerformed() calls the class Booking to pack information to transfer to other interface.
  23. The class Booking calls its setter methods
  24. The class Booking calls the class BookedRoom to pack its component
  25. The class BookedRoom packs its attributes
  26. The class BookedRoom return to the class Booking the packed object.
  27. The class Booking returns the Booking object to the method actionPerformed().
  28. The class actionPerformed() calls the class SearchClientFrm.
  29. The constractor SearchClientFrm() is called
  30. The interface SearchClientFrm is shown to the seller.
  31. The seller requires the personal information from the client.
  32. The client provides it to the seller.
  33. The seller enters the client name and clicks search.
  34. The method actionPerformed() of class SearchClientFrm is called.
  35. The method actionPerformed() calls the method searchClient() of the class ClientDAO.
  36. The method searchClient() executes.
  37. The method searchClient() calls the class Client to pack the results.
  38. The class Client packs a Client object
  39. The class Client return the packed object to the method searchClient().
  40. The method searchClient() returns the results to the method actionPerformed().
  41. The method actionPerformed() displays the results on the SearchClientFrm to the seller.
  42. The seller clicks on the row corresponding to the current client.
  43. The method actionPerformed() of the class SearchClientFrm is called.
  44. The method actionPerformed() calls the class Booking to add client information to it
  45. The class Booking calls the method setClient()
  46. The class Booking returns the packed object to the method actionPerformed()
  47. The method actionPerformed() calls the class ConfirmFrm.
  48. The constractor ConfirmFrm() is called
  49. The interface ConfirmFrm is shown to the seller.
  50. The seller repeats the booking information to the client and asks him to confirm.
  51. The client confirms it.
  52. The seller clicks on the confirm button.
  53. The method actionPerformed() of the class ConfirmFrm is called.
  54. The method actionPerformed() calls the method addBooking() of the class BookingDAO.
  55. The method addBooking() executes.
  56. The method addBooking() returns the turn to the method actionPerformed()
  57. The method actionPerformed() displays a success message
  58. The seller clicks on the OK button of the message.
  59. The method actionPerformed() recalls the interface SellerHomeFrm.
  60. The interface SellerHomeFrm is shown to the seller.
  61. The seller confirms the successful booking to the client and ends the call.

Scenario v.3 for view room statistic function

  1. A manager clicks on the view report function on the interface ManagerHomeFrm (after loging in).
  2. The method actionPerformed() of the class ManagerHomeFrm is called.
  3. The method actionPerformed() calls the class SelectStatFrm.
  4. The constructor SelectStatFrm() is called,
  5. The interface SelectStatFrm is shown to the manager.
  6. The manager configs to view the report of room by revenue.
  7. The method actionPerformed() of the class SelectStatFrm is called
  8. The method actionPerformed() calls the class RoomStatFrm.
  9. The constructor RoomStatFrm() is called,
  10. The interface RoomStatFrm is shown to the manager.
  11. The manager enters the start date, end date of statistic and clicks on the view button
  12. The method actionPerformed() of the class RoomStatFrm is called.
  13. The method actionPerformed() calls the method getRoomStat() of the class RoomStatDAO.
  14. The method getRoomStat() executes.
  15. The method getRoomStat() calls the class RoomStat to pack the results.
  16. The class RoomStat packs its normal attributes
  17. The class RoomStat calls the setter methods from the class Room to pack the attribute inherited from the class Room.
  18. The class Room packs its attributes
  19. The class Room returns the packed object to the class RoomStat.
  20. The class RoomStat returns the packed results to the method getRoomStat()
  21. The method getRoomStat() returns the results to the method actionPerformed()
  22. The method actionPerformed() displays the results on the interface RoomStatFrm to the manager.
  23. The manager clicks on a row to view detail of a room.
  24. The method actionPerformed() of the class RoomStatFrm is called.
  25. The method actionPerformed() calls the class RoomDetailFrm
  26. The constructor RoomDetailFrm() is called.
  27. The constructor RoomDetailFrm() calls the method getBookingOfRoom() of the class BookingDAO.
  28. The method getBookingOfRoom() executes.
  29. The method getBookingOfRoom() calls the class Booking to pack object.
  30. The class Booking packs its normal attributes
  31. The class Booking calls the class Client to pack its object attribute
  32. The class Client packs its attributes
  33. The class Client returns the packed object to the class Booking
  34. The class Client calls the class BookedRoom to pack its object attribute
  35. The class BookedRoom packs its normal attributes
  36. The class BookedRoom calls the class Room to pack its object attributes
  37. The class Room packs its attributes
  38. The class Room returns the packed object to the class BookedRoom
  39. The class BookedRoom return the object to the class Booking
  40. The class Booking returns the object to the method getBookingOfRoom()
  41. The method getBookingOfRoom() return the results to the constructor RoomDetailFrm()
  42. The constructor RoomDetailFrm() displays the detailed statistic of the chosen room on the interface RoomDetailFrm to the manager.