PROJECT: Morpheus


Overview

Morpheus is a hotel management system desktop application designed to manage the activities in a hotel. The user interacts with it in a CLI and it has a GUI created with JavaFx. It is written in Java.

Summary of contributions

  • Major enhancement: Set up the storage architecture for the Hotel and implemented storage for rooms and bookings

    • What it does: Allows the app to read and write room and booking details to hotel storage upon exit.

    • Justification: This feature improves the product significantly because room and booking data of a hotel must be saved in a database to facilitate hotel management.

    • Highlights: This implementation affected commands added in the future as initialization commands have to modify data in the storage. It required in depth analysis of the design of the storage component.

  • Major enhancement: Set up the display of the various lists in the UI i.e. Room list, Booking list, Stay List

    • What it does: Allows users to view the rooms, bookings and stays in the hotel.

    • Justification: This feature improves the product significantly as the users need to be able to see the current state of the hotel in the UI before entering any commands.

    • Highlights: This implementation affected commands added in the future because users need to be able to view these lists first before executing commands on them.

  • Minor enhancement: added a reserve command that allows the user to make reservations for a guest.

  • Minor enhancement: updated and modified the user interface to make it personalized to Morpheus.

  • Code contributed: Functional code

  • Other contributions:

    • Project management:

      • Managed releases v1.2 - v1.4 (3 releases) on GitHub

    • Enhancements to existing features:

      • Updated the GUI design (Pull requests #189)

      • Added hotel storage, and saved rooms and bookings and stays to hotel storage (Pull requests #85, #107, #223)

    • Documentation:

      • Added section on how to navigate the User Guide and cosmetic tweaks: (Pull requests #240, #245)

      • Added architecture diagrams, section on Initialization Feature, section on navigating the document and cosmetic tweaks to the Developer Guide (Pull requests #205, #240 )

    • Community:

      • Issue management: (Examples: #255, #37)

      • PRs reviewed (with non-trivial review comments): #183, #248 , #75 , #109

      • Reported bugs and suggestions for other teams in the class (examples: 1, 2, 3, 4, 5)

Contributions to the User Guide

Given below are some sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

How to navigate this document (Sanchari)

  • This section shows you how to read and understand this document.

    • Any text in markup suggests that you may enter it as a command in the app.

    • A link like this will take you to the link destination when clicked.

    • Keyboard shows that this is a key that can be pressed on the keyboard.

This is a useful tip to help optimize your experience using Morpheus.
This is important information you need to take note of!

Some Common Parameters
(Sanchari)

Guest:

  • i/ : Guest ID

  • n/ : Guest name

  • p/ : Guest phone

  • e/ : Guest email

  • t/ : Guest tag

Rooms and Bookings and Services

  • rn/ : Room number

  • ti/ : Room tier

  • bi/ : Booking ID

  • fd/ : Date from

  • td/ : Date to

  • c/ : Cost

  • si/ : Service ID

  • d/ : Description of the service

Making a reservation : reserve

If you want to make a reservation for a guest in the hotel, use the command reserve

Format: reserve i/ID rn/ROOM_NUMBER fd/FROM_DATE td/TO_DATE

Examples:

  • reserve i/G1231231X rn/102 fd/ 2020-12-12 td/ 2020-12-30

Result: Reserves room 102 for guest with the ID G1231231X from 2020-12-12 to 2020-12-30. New reservation will be reflected in the bookings tab.

Contributions to the Developer Guide

Given below are some sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

Architecture (Sanchari)

OverallArchitecture
Figure 1. Architecture Diagram

The Architecture Diagram given above explains the high-level design of the App.

Morpheus closely follows the Command Pattern design of software.
This is a quick representation of how the Command Pattern works:
Client → Invoker → CommandQueue → ExecuteCommand

In this case, the Application (Client) which creates and adds a command object to the Logic Manager (Invoker). The Invoker then executes the command objects by calling Command#execute().

Instructions for Manual Testing (Sanchari)

Given below are instructions to test the app manually.

These instructions only provide a starting point for testers to work on; testers are expected to do more exploratory testing.

Launch and Shutdown

  1. Initial launch

    1. Download the jar file and copy into an empty folder

    2. Double-click the jar file
      Expected: Shows the GUI with a set of sample data. The window size may not be optimum.

  2. Saving window preferences

    1. Resize the window to an optimum size. Move the window to a different location. Close the window.

    2. Re-launch the app by double-clicking the jar file.
      Expected: The most recent window size and location is retained.

Adding a guest

  1. Adding a guest when all guests are listed.

    1. Prerequisites: List all persons using the switch guest command. Multiple guests in the list.

    2. Test case: addguest n/Joey i/J000000 p/12345679 e/joey@email.com t/VIP
      Expected: Guest Joey is added to the list. Details of the added Guest shown in the status message.

    3. Test case: addguest n/Jolene i/J000000 p/12345679 e/jolene@email.com t/VIP
      Expected: Guest Id clashes with an existing guest. No Guest is added. Error details shown in the status message.

    4. Other incorrect addguest commands to try: addguest, addguest i/P000000 p/12345679 e/joey@email.com
      Expected: Similar to previous.

Adding a room

  1. Adding a room when all rooms are listed.

    1. Prerequisites: List all rooms using the switch room command. Multiple rooms in the list.

    2. Test case: addroom rn/300 ti/GOLD c/300.00
      Expected: Room 300 is added to the list. Details of the added Room shown in the status message.

    3. Test case: addroom rn/300 ti/GOLD c/300.00
      Expected: Room Id clashes with an existing room. No Room is added. Error details shown in the status message.

    4. Test case: addroom rn/400 ti/Gold c/300.00
      Expected: Invalid Tier value. No Room is added. Error details shown in the status message.

    5. Other incorrect addroom commands to try: addroom, addroom rn/500 ti/BRONZE
      Expected: Similar to previous.

Adding a service

  1. Adding a service when all services are listed.

    1. Prerequisites: List all service using the switch service command. Multiple services in the list.

    2. Test case: addservice si/WC d/Wash clothes c/100.00
      Expected: Service WC is added to the list. Details of the added Service shown in the status message.

    3. Test case: addservice si/WC d/Other service c/100.00
      Expected: Service Id clashes with an existing service. No service is added. Error details shown in the status message.

    4. Test case: addservice si/WC c/100.00
      Expected: Invalid description value. No service is added. Error details shown in the status message.

    5. Other incorrect addservice commands to try: addservice, addservice c/190.00
      Expected: Similar to previous.

Reserving a room

  1. Adding a booking when all bookings are listed

    1. Prerequisites: List all the bookings by using the switch booking command. Multiple bookings shown.

    2. Test case: reserve i/i000000 rn/001 fd/2020-12-12 td/2020-12-24
      Expected: Room number 001 is reserved by person I000000 from 2020-12-12 to 2020-12-24

    3. Test case: reserve i/B000000 rn/001 fd/2020-12-13 td/2020-12-23
      Expected: There is a clash in booking dates for the same room. Error details shown in the result display box.

    4. Test case: reserve i/Bzagda rn/001 fd/2020-12-13 td/2020-12-23 Expected: No such person found. No booking made. Error details shown in the status message.

    5. Other incorrect reserve commands to try: reserve, reserve i/A000000 , reserve i/i000000 rn/004 fd/2012-12-12 td/2012-12-24

Checking in and out guests

  1. Dealing with check-ins and check-outs

    1. Prerequisites: List all bookings by using the command switch booking

    2. Test case: checkin i/i000000 rn/001 td/2020-12-24
      Expected: Guest i000000 is checked into room 001

    3. Test case: checkin i/B000000 rn/5602 td/2020-12-23
      Expected: There is no such room. Error message shown in result display box.

    4. Test case: checkout rn/001
      Expected: Guest is checked out of room 001

    5. Test case: checkout rn/009
      Expected: Room 009 has no guests. Error message is shown in the result display box.

    6. Other incorrect checkin/checkout commands to try: checkin, checkin i/A000000 , checkin i/i000000 rn/004 fd/2012-12-12 td/2012-12-24, checkout , checkout rn/000

Extending the stay of a guest

  1. Dealing with extension of a stay.

    1. Prerequisites: List all the stays by using the switch room command. Stays are shown in the rooms.

    2. Test case: extend rn/101 td/2020-04-20
      Expected: Room number 101 's stay is extended until 2020-04-20

    3. Test case: extend rn/006 td/2020-04-20
      Expected: There is no guest checked into room 006. Stay cannot be extended. Error details shown in the result display box.

    4. Test case: extend rn/001 fd/2012-12-12
      Expected: Invalid date. Date has passed. Stay cannot be extended. Error details shown in the result display box.

    5. Other incorrect extend commands to try: extend, reserve rn/000 , extend td/2012-12-12

Charging a service

Charging a service to the guest’s tab.
  1. Prerequisites: List all the stays by using the switch room command. Stays are shown in the rooms.

  2. Test case: chargeservice i/A000000 rn/004 si/WC
    Expected: Charges service with the ID WC for room 100 to the guest with ID A000000 's bill.

  3. Test case: chargeservice i/R000000 rn/004 si/WC
    Expected: Guest R000000 is not checked in. No service can be added to his bill. Error details shown in the result display box.

  4. Other incorrect chargeservice commands to try: chargeservice, chargeservice i/R000000 rn/000 si/WC , `chargeservice i/R000000 rn/100 si/DD

Fetching the bill of a guest

Retrieving the bill of a guest
  1. Prerequisites: List all the stays by using the switch room command. Stays are shown in the rooms.

  2. Test case: fetchbill i/A000000
    Expected: Shows the entire bill, consisting of all costs incurred, for guest with ID G1231231X 's stay up till present moment.

  3. Test case: fetchbill i/R000000
    Expected: Guest R000000 is not checked in. His bill cannot be shown. Error details shown in the result display box.

  4. Other incorrect fetchbill commands to try: fetchbill

Deleting service from a bill

Deleting a service from a bill
  1. Prerequisites: List all bills by using the switch bill command

  2. Test case: deletecservice i/G1231231X rn/100 si/WC Expected: Removes service with ID WC from guest with ID G1231231X 's bill for room 100

  3. Test case: deletecservice i/B000000 rn/100 si/WC Expected: Guest B000000 does not have the service WC in their bill. Error message shown in the result display box.

  4. Other incorrect deletecservice commands to try: deletecservice , deletecservice i/A000000 rn/000

Finding a guest

Finding a guest from the list
  1. Prerequisites: List all guests by using the switch guest command. Guests are listed.

  2. Test case: findguest i/A0000000 n/Alice Expected: Shows persons with name: Alice or ID: A1000000

  3. Test case: findguest Expected: Invalid command format. Error message is shown in the result display box.

  4. Other incorrect findguest commands to try: findguest i/ , findguest n/

Finding a room

Finding a room related to a guest’s reservation/stay
  1. Prerequisites: List all rooms by using the switch room command. Rooms are listed.

  2. Test case: findroom i/A000000 rn/001 n/Tuan Le Expected: Shows rooms booked by Guest with name: Tuan Le and/or ID: A000000

  3. Test case: findroom Expected: Invalid command format. Error message is shown in the result display box.

  4. Other incorrect findroom commands to try: findroom i/ , findroom n/

Finding a booking

Finding a booking made by a guest
  1. Prerequisites: List all bookings by using the switch room command. Rooms are listed.

  2. Test case: findbooking n/Alice rn/001 Expected: Shows booking of Alice or of room 001.

  3. Test case: findbooking Expected: Invalid command format. Error message is shown in the result display box.

  4. Other incorrect findbooking commands to try: findbooking rn/ , findbooking n/

Deleting a person

  1. Deleting a Guest while all Guests are listed

    1. Prerequisites: List all guests using the switch guest command. Multiple guests in the list.

    2. Test case: delete 1
      Expected: First Guest is deleted from the list. Details of the deleted Guest shown in the status message.

    3. Test case: delete 0
      Expected: Index is out of bounds. No Guest is deleted. Error details shown in the status message. Status bar remains the same.

    4. Other incorrect delete commands to try: delete, delete x (where x is larger than the list size) Expected: Similar to previous.

Saving data

  1. Dealing with missing/corrupted data files

    1. Prerequisites: Get access to the data files.

    2. Test case: Delete hotel.json
      Expected: Morpheus will load addressbook and hotel with sample data.

    3. Other tests to try: Delete some '{}' in hotel.json
      Expected: Morpheus will restart with an empty addressbook and hotel.