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:
-
Documentation:
-
Community:
-
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
markupsuggests 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)
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
-
Initial launch
-
Download the jar file and copy into an empty folder
-
Double-click the jar file
Expected: Shows the GUI with a set of sample data. The window size may not be optimum.
-
-
Saving window preferences
-
Resize the window to an optimum size. Move the window to a different location. Close the window.
-
Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained.
-
Adding a guest
-
Adding a guest when all guests are listed.
-
Prerequisites: List all persons using the
switch guestcommand. Multiple guests in the list. -
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. -
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. -
Other incorrect addguest commands to try:
addguest,addguest i/P000000 p/12345679 e/joey@email.com
Expected: Similar to previous.
-
Adding a room
-
Adding a room when all rooms are listed.
-
Prerequisites: List all rooms using the
switch roomcommand. Multiple rooms in the list. -
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. -
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. -
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. -
Other incorrect addroom commands to try:
addroom,addroom rn/500 ti/BRONZE
Expected: Similar to previous.
-
Adding a service
-
Adding a service when all services are listed.
-
Prerequisites: List all service using the
switch servicecommand. Multiple services in the list. -
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. -
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. -
Test case:
addservice si/WC c/100.00
Expected: Invalid description value. No service is added. Error details shown in the status message. -
Other incorrect addservice commands to try:
addservice,addservice c/190.00
Expected: Similar to previous.
-
Reserving a room
-
Adding a booking when all bookings are listed
-
Prerequisites: List all the bookings by using the
switch bookingcommand. Multiple bookings shown. -
Test case:
reserve i/i000000 rn/001 fd/2020-12-12 td/2020-12-24
Expected: Room number001is reserved by personI000000from2020-12-12to2020-12-24 -
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. -
Test case:
reserve i/Bzagda rn/001 fd/2020-12-13 td/2020-12-23Expected: No such person found. No booking made. Error details shown in the status message. -
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
-
Dealing with check-ins and check-outs
-
Prerequisites: List all bookings by using the command
switch booking -
Test case:
checkin i/i000000 rn/001 td/2020-12-24
Expected: Guesti000000is checked into room001 -
Test case:
checkin i/B000000 rn/5602 td/2020-12-23
Expected: There is no such room. Error message shown in result display box. -
Test case:
checkout rn/001
Expected: Guest is checked out of room001 -
Test case:
checkout rn/009
Expected: Room009has no guests. Error message is shown in the result display box. -
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
-
Dealing with extension of a stay.
-
Prerequisites: List all the stays by using the
switch roomcommand. Stays are shown in the rooms. -
Test case:
extend rn/101 td/2020-04-20
Expected: Room number101's stay is extended until2020-04-20 -
Test case:
extend rn/006 td/2020-04-20
Expected: There is no guest checked into room006. Stay cannot be extended. Error details shown in the result display box. -
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. -
Other incorrect extend commands to try:
extend,reserve rn/000,extend td/2012-12-12
-
Charging a service
-
Prerequisites: List all the stays by using the
switch roomcommand. Stays are shown in the rooms. -
Test case:
chargeservice i/A000000 rn/004 si/WC
Expected: Charges service with the IDWCfor room100to the guest with IDA000000's bill. -
Test case:
chargeservice i/R000000 rn/004 si/WC
Expected: GuestR000000is not checked in. No service can be added to his bill. Error details shown in the result display box. -
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
-
Prerequisites: List all the stays by using the
switch roomcommand. Stays are shown in the rooms. -
Test case:
fetchbill i/A000000
Expected: Shows the entire bill, consisting of all costs incurred, for guest with IDG1231231X's stay up till present moment. -
Test case:
fetchbill i/R000000
Expected: GuestR000000is not checked in. His bill cannot be shown. Error details shown in the result display box. -
Other incorrect fetchbill commands to try:
fetchbill
Deleting service from a bill
-
Prerequisites: List all bills by using the
switch billcommand -
Test case:
deletecservice i/G1231231X rn/100 si/WCExpected: Removes service with IDWCfrom guest with IDG1231231X's bill for room100 -
Test case:
deletecservice i/B000000 rn/100 si/WCExpected: GuestB000000does not have the serviceWCin their bill. Error message shown in the result display box. -
Other incorrect deletecservice commands to try:
deletecservice,deletecservice i/A000000 rn/000
Finding a guest
-
Prerequisites: List all guests by using the
switch guestcommand. Guests are listed. -
Test case:
findguest i/A0000000 n/AliceExpected: Shows persons with name:Aliceor ID:A1000000 -
Test case:
findguestExpected: Invalid command format. Error message is shown in the result display box. -
Other incorrect findguest commands to try:
findguest i/,findguest n/
Finding a room
-
Prerequisites: List all rooms by using the
switch roomcommand. Rooms are listed. -
Test case:
findroom i/A000000 rn/001 n/Tuan LeExpected: Shows rooms booked by Guest with name:Tuan Leand/or ID:A000000 -
Test case:
findroomExpected: Invalid command format. Error message is shown in the result display box. -
Other incorrect findroom commands to try:
findroom i/,findroom n/
Finding a booking
-
Prerequisites: List all bookings by using the
switch roomcommand. Rooms are listed. -
Test case:
findbooking n/Alice rn/001Expected: Shows booking ofAliceor of room001. -
Test case:
findbookingExpected: Invalid command format. Error message is shown in the result display box. -
Other incorrect findbooking commands to try:
findbooking rn/,findbooking n/
Deleting a person
-
Deleting a Guest while all Guests are listed
-
Prerequisites: List all guests using the
switch guestcommand. Multiple guests in the list. -
Test case:
delete 1
Expected: First Guest is deleted from the list. Details of the deleted Guest shown in the status message. -
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. -
Other incorrect delete commands to try:
delete,delete x(where x is larger than the list size) Expected: Similar to previous.
-
Saving data
-
Dealing with missing/corrupted data files
-
Prerequisites: Get access to the data files.
-
Test case: Delete hotel.json
Expected: Morpheus will load addressbook and hotel with sample data. -
Other tests to try: Delete some '{}' in hotel.json
Expected: Morpheus will restart with an empty addressbook and hotel.
-