Overview
MeNUS is an all-in-one restaurant management desktop app designed to help restaurant owners and managers streamline the process of managing restaurants within National University of Singapore (NUS). With this app, users can manage their menus, sales, and even reservations!
This portfolio showcases my contributions to this project.
Summary of Contributions
-
Code contributed: RepoSense
-
Major enhancement: Added the Reservation Management feature
-
What it does: Allows the user to manage a Reservations List using various commands
-
Justification: It can be messy to manually manage restaurant reservations using pen and paper. This feature enables a systematic and reliable way to manage reservations.
-
Highlights: This project required me to communicate with my teammates to integrate our different management systems together. It required an in-depth analysis of the underlying MeNUS architecture.
-
Credits: Dates are parsed using Natty, a natural language date parser.
-
-
Minor enhancement: Added a way to add a command alias(a shortcut) to each command to allow users to type commands faster: #41.
-
Other contributions:
-
Project management:
-
Managed the documentation for the project team.
-
-
Documentation:
-
Wrote feature descriptions in the User Guide and Developer Guide.
-
Helped teammates edit language and phrasing in the User Guide and Developer Guide.
-
-
Community:
-
Tools:
-
Contributions to the User Guide
Given below are sections I contributed to the User Guide in relation to the |
Reservations Management
Adding a reservation: add-reservation
or ar
Adds a new reservation to the reservations list.
Format: add-reservation n/NAME px/PAX d/DATE ti/TIME
or ar n/NAME px/PAX d/DATE ti/TIME
|
|
Examples:
-
add-reservation n/TAN px/4 d/21-07-2019 ti/10:00
-
ar n/ONG px/2 d/21st July ti/10am
-
ar n/LEE px/8 d/next tuesday ti/8 p.m.
Listing all reservations : list-reservations
or lr
Shows a list of all reservations in the reservations list.
Format: list-reservations
or lr
Editing a reservation: edit-reservation
or er
Edits an reservation in the reservation list.
Format: edit-reservation INDEX [n/NAME] [px/PAX] [d/DATE] [ti/TIME]
or er INDEX [n/NAME] [px/PAX] [d/DATE] [ti/TIME]
Examples:
-
edit-reservation 2 d/31-12-2019 ti/18:00
Edits the time of the 2nd reservation in the list to31st Dec 2019, 1800
hrs. -
er 6 n/ONG px/4
Edits the name and pax of the 6th reservation toONG
and4
respectively.
Sorting reservations list: sort-reservations
or sortr
Sorts the reservations list by Date/Time.
Format: sort-reservations
or sortr
Deleting a reservation: delete-reservation
or dr
Deletes the specified reservation from the reservations list.
Format: delete-reservation INDEX
or dr INDEX
Examples:
-
list-reservations
delete-reservation 2
list-reservations
Deletes the 2nd reservation in the reservations list. -
list-reservations
dr 5
list-reservations
Deletes the 5th reservation in the reservations list.
Selecting a reservation : select-reservation
or sr
Selects the reservation identified by the index number used in the displayed reservations list.
Format: select-reservation INDEX
or sr INDEX
Examples:
-
list-reservations
select-reservation 2
Selects the 2nd reservation in the reservations list. -
list-reservations
select-reservation 7
Selects the 7th reservation in the reservations list.
Contributions to the Developer Guide
Given below are sections I contributed to the Developer Guide in relation to the |
Reservations feature
The Reservations feature allows users to store customer reservations, view them, and to cancel them.
Current Implementation
The Reservations feature currently contains 6 commands to modify the UniqueReservationsList
stored in ModelManager
.
-
add-reservation
command - Adds reservations to the reservations list. -
edit-reservation
command - Edits existing reservations in the reservations list. -
delete-reservation
command - Deletes existing reservations in the reservations list. -
list-reservation
command - Lists reservations in the reservations list. -
select-reservation
command - Select existing reservations in the reservations list. -
sort-reservation
command - Sorts existing reservations in the reservations list.
Each Reservation
object contains Name
, Pax
, Date
and Time
.
add-reservation
Command
The command takes in 3 parameters, Name
, Pax
,Date
and Time
to create a Reservation
object.
The Dates are parsed using the |
Due to the way As a temporary workaround, the If it is, then it will be parsed using |
After the Reservation
Object is created, RestaurantBook#addReservation(Reservation reservation)
is called to add the
Reservation
Object to the UniqueReservationsList
.
The following activity diagram summarizes what happens when a user executes add-reservation
command:
Figure 4.9.2.1: Activity diagram to illustrate the add-reservation
command
edit-reservation
Command
The command takes in 1 mandatory parameter, Index
, followed by 1 or more of the following optional parameters,
Name
, Pax
, Date
, Time
.
The Reservation
associated with the given Index
is then identified within the internal UniqueReservationsList
,
then has its values updated to the new values specified by the Name
, Pax
,Date
, and Time
parameters.
delete-reservation
Command
The command takes in 1 parameter, Index
.
The Reservation
associated with the given Index
is then identified, then deleted from the internal
UniqueReservationsList
.
list-reservations
Command
The command does not require any additional parameters.
A DisplayReservationListRequestEvent
is posted to the EventsCenter
, which will call the
handleDisplayReservationListRequestEvent
method of the MainWindow
. The Reservations List will then be shown on
the UI.
The following sequence diagram shows how the list-reservations
command works:
Figure 4.9.5.1: Sequence diagram to illustrate the list-reservations
command
Design Considerations
Aspect: How Date
and Time
are parsed
-
Alternative 1 (current choice):
Date
andTime
are parsed using Natty.-
Pros: Easy to implement as it only requires importing the Natty library with minimal configuration.
-
Cons: Natty will sometimes try to "guess" unexpected
Date
values.
-
-
Alternative 2: Configure the Natty library to avoid unexpected parse results.
-
Pros: The parser will be able to provide more accurate
Date
andTime
values. -
Cons: Difficult to implement as it requires deep understanding of how the Natty library works.
-
Use case: UC401 - Add reservation
MSS
-
User requests to add a new reservation.
-
App adds the reservation to the reservations list.
-
App returns a success message confirming the new reservation has been added.
Use case ends.
Extensions
-
2a. The reservation date or time entered has an incorrect format.
-
2a1. App returns a message telling user the date or time format is entered incorrectly.
-
2a2. User requests to add reservation again.
Steps 2a1-2a2 are repeated until a proper date and time are entered.
Use case resumes at step 3.
-
Use case: UC402 - Edit reservation
MSS
-
User requests to edit a specified reservation.
-
App edits the specified reservation with the updated values.
-
App returns a success message confirming the specified reservation has been edited.
Use case ends.
Extensions
-
1a. The given index is invalid.
-
1a1. App returns a message telling user that the index is invalid.
-
1a2. User requests to edit reservation again.
Steps 1a1-1a2 are repeated until a valid index is entered.
Use case resumes at step 2.
-
-
1b. None of the optional fields are specified.
-
1b1. App returns a message telling user at least one optional field has to be specified.
-
1b2. User requests to edit reservation again.
Steps 1b1-1b2 are repeated until at least one optional field is entered.
Use case resumes at step 2.
-
Use case: UC403 - Delete reservation
MSS
-
User requests to list reservations.
-
App shows a list of reservations.
-
User requests to delete a specific reservation in the list.
-
App deletes the reservation.
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
-
3a. The given index is invalid.
-
3a1. App returns a message telling user the index is invalid.
-
3a2. User requests to delete reservation again.
Steps 3a1-3a2 are repeated until a valid index is entered.
Use case resumes at step 3.
-
Reservations Management
-
Adding a reservation
-
Prerequisites: The reservation to be added must not be a duplicated entry in the reservations list and the user must be logged in.
-
Test case:
add-reservation n/John Doe px/4 d/05-12-2019 ti/10:00 t/Driving
Expected: Reservation will be added into the reservation list. Details of the added reservation will be shown. -
Test case:
add-reservation n/
Expected: Reservation will not be added. Improper format error details shown. -
Test case:
add-reservation n/John Doe px/4 d/01-01-2018 ti/10:00 t/Driving
Expected: Reservation will not be added. "Date should not have passed" error will be shown. -
Other incorrect add-reservation commands to try:
add-reservation
,add-reservation n/John Doe px/4@ d/05-12-2019 ti/10:00
Expected: Reservation will not be added. Improper format error details shown.
-
-
Listing reservations
-
Prerequisites: The user must be logged in.
-
Test case:
list-reservations
Expected: The reservations list will be shown.
-
-
Selecting a reservation
-
Prerequisites: The reservations list must contain at least 1 reservation.
-
Test case:
select-reservation 1
Expected: Selects the reservation specified by the index in the reservations list. Index of the selected reservation will be shown. -
Incorrect commands to try:
select-reservation
,select-reservation all
-
-
Editing a reservation
-
Prerequisites: The reservation to be edited must be an existing entry in the reservations list and the user must be logged in.
-
Test case:
edit-reservation 1 d/06-10-2020
Expected: Edited reservation will replace the existing reservation in the reservations list. Details of the edited reservation will be shown. -
Test case:
edit-reservation n/
Expected: No reservation is edited. Improper format error details shown. -
Other incorrect edit-reservation commands to try:
edit-reservation
,edit-reservation 1 px/4@
Expected: Similar to previous.
-
-
Deleting a reservation
-
Prerequisites: The reservation to be deleted must be an existing entry in the reservations list and the user must be logged in.
-
Test case:
delete-reservation 1
Expected: First reservation will be deleted from the list. Details of the deleted reservation will be shown. -
Test case:
delete-reservation 0
Expected: No reservations are deleted. Improper format error details shown. -
Other incorrect delete-reservation commands to try:
delete-reservation
,delete-reservation all
Expected: Similar to previous.
-
-
Sorting reservations
-
Prerequisites: The user must be logged in and the reservations list must be populated with more than one entry.
(and preferably be initially unsorted, to see the effects of thesort-reservations
command) -
Setup: Enter these commands to populate the reservations list with an unsorted set of reservations.
-
add-reservation n/Mandelbrot px/3 d/06-12-2019 ti/18:00
-
add-reservation n/Benoit px/1 d/05-12-2019 ti/10:00
-
add-reservation n/B px/2 d/05-12-2019 ti/12:00
-
-
Test case:
sort-reservations
Expected: Reservations list will be sorted by Date/Time in ascending order.
-