diff --git a/.gitignore b/.gitignore
index 71c9194e8bd..20c9b6e45b1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,11 +9,15 @@ src/main/resources/docs/
/*.iml
# Storage/log files
-/data/
/config.json
/preferences.json
/*.log.*
+# Data files
+/data/
+/order/
+/profile/
+
# Test sandbox files
src/test/data/sandbox/
diff --git a/README.md b/README.md
index 13f5c77403f..aba0caef058 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,28 @@
-[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/se-edu/addressbook-level3/actions)
+
+
+# Supper Strikers
+
+[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/AY2021S1-CS2103-T16-1/tp/actions)
![Ui](docs/images/Ui.png)
-* This is **a sample project for Software Engineering (SE) students**.
- Example usages:
- * as a starting point of a course project (as opposed to writing everything from scratch)
- * as a case study
-* The project simulates an ongoing software project for a desktop application (called _AddressBook_) used for managing contact details.
- * It is **written in OOP fashion**. It provides a **reasonably well-written** code base **bigger** (around 6 KLoC) than what students usually write in beginner-level SE modules, without being overwhelmingly big.
- * It comes with a **reasonable level of user and developer documentation**.
-* It is named `AddressBook Level 3` (`AB3` for short) because it was initially created as a part of a series of `AddressBook` projects (`Level 1`, `Level 2`, `Level 3` ...).
-* For the detailed documentation of this project, see the **[Address Book Product Website](https://se-education.org/addressbook-level3)**.
-* This project is a **part of the se-education.org** initiative. If you would like to contribute code to this project, see [se-education.org](https://se-education.org#https://se-education.org/#contributing) for more info.
+
+
+**Supper Strikers is a desktop application for managing your supper orders.** It is targeted at students living in NUS for ordering delivery from supper stretch. While it has a GUI (Graphical User Interface), most of the user interactions happen using a CLI (Command Line Interface).
+
+- If you are interested in using Supper Strikers, head over to the [**User Guide**](docs/UserGuide.md).
+- If you are interested about developing Supper Strikers, the [**Developer Guide**](docs/DeveloperGuide.md) is a good place to start.
+
+
+
+## Libraries Used
+
+- JavaFX - Used for creating the GUI
+- Jackson - Used for processing JSON files
+- JUnit5 - Used for unit testing
+
+
+
+## Acknowledgments
+
+- Adapted from AddressBook Level 3 (AB3), part of the **se-education.org initiative.** If you would like to contribute code to this project, see [se-education.org](https://se-education.org#https://se-education.org/#contributing) for more info .
diff --git a/build.gradle b/build.gradle
index be2d2905dde..85e77299608 100644
--- a/build.gradle
+++ b/build.gradle
@@ -11,6 +11,10 @@ mainClassName = 'seedu.address.Main'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
+run {
+ enableAssertions = true
+}
+
repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
@@ -42,7 +46,7 @@ task coverage(type: JacocoReport) {
dependencies {
String jUnitVersion = '5.4.0'
- String javaFxVersion = '11'
+ String javaFxVersion = '11.0.1'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'mac'
@@ -66,7 +70,7 @@ dependencies {
}
shadowJar {
- archiveName = 'addressbook.jar'
+ archiveName = 'supperstrikers.jar'
}
defaultTasks 'clean', 'test'
diff --git a/docs/AboutUs.md b/docs/AboutUs.md
index 1c9514e966a..b245fd7ba93 100644
--- a/docs/AboutUs.md
+++ b/docs/AboutUs.md
@@ -1,59 +1,53 @@
----
-layout: page
-title: About Us
----
-
We are a team based in the [School of Computing, National University of Singapore](http://www.comp.nus.edu.sg).
-You can reach us at the email `seer[at]comp.nus.edu.sg`
+You can contact us at the email `seer[at]comp.nus.edu.sg`
## Project team
-### John Doe
+### Lim Wei Quan, Ernest
-
+
-[[homepage](http://www.comp.nus.edu.sg/~damithch)]
-[[github](https://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+[[github](https://github.com/ernestlim8)]
+[[portfolio](http://ernestlim8.netlify.app/)]
-* Role: Project Advisor
+* Role: Team Lead
-### Jane Doe
+### Ambrose Liew Cheng Yuan
-
+
-[[github](http://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+[[github](https://github.com/MorningLit)]
+[[portfolio](https://ambroseliew.netlify.app/)]
-* Role: Team Lead
-* Responsibilities: UI
+* Role: Developer
+* Responsibilities: Checkstyle, Documentation, Intellij expert, Arts Director
-### Johnny Doe
+### Anikesh Bhuvaneshwaram
-
+
-[[github](http://github.com/johndoe)] [[portfolio](team/johndoe.md)]
+[[github](https://github.com/Ebolaeater)]
+[[portfolio](https://anikeshb.netlify.app)]
* Role: Developer
-* Responsibilities: Data
+* Responsibilities: Integration, Scheduling and Tracking, Data Handler
-### Jean Doe
+### Tan Wei Xin
-
+
-[[github](http://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+[[github](github.com/duckmoon99/)]
+[[portfolio](https://www.linkedin.com/in/tanweixin/)]
* Role: Developer
-* Responsibilities: Dev Ops + Threading
+* Responsibilities: Code Quality
-### James Doe
+### Chan Yong Soon, Kendrew
-
+
-[[github](http://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+[[github](https://github.com/KendrewChan)] [[portfolio]([https://kendrewc.netlify.app](https://kendrewc.netlify.app/))]
* Role: Developer
-* Responsibilities: UI
+* Responsibilities: Testing, Handle Code Skeletons, Deliverables and deadlines
diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md
index 4829fe43011..04071692ab3 100644
--- a/docs/DeveloperGuide.md
+++ b/docs/DeveloperGuide.md
@@ -23,11 +23,11 @@ The ***Architecture Diagram*** given above explains the high-level design of the
-:bulb: **Tip:** The `.puml` files used to create diagrams in this document can be found in the [diagrams](https://github.com/se-edu/addressbook-level3/tree/master/docs/diagrams/) folder. Refer to the [_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create and edit diagrams.
+:bulb: **Tip:** The `.puml` files used to create diagrams in this document can be found in the [diagrams](https://github.com/AY2021S1-CS2103-T16-1/tp/tree/master/docs/diagrams) folder. Refer to the [_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create and edit diagrams.
-**`Main`** has two classes called [`Main`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/Main.java) and [`MainApp`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/MainApp.java). It is responsible for,
+**`Main`** has two classes called [`Main`](https://github.com/AY2021S1-CS2103-T16-1/tp/blob/master/src/main/java/seedu/address/Main.java) and [`MainApp`](https://github.com/AY2021S1-CS2103-T16-1/tp/blob/master/src/main/java/seedu/address/MainApp.java). It is responsible for,
* At app launch: Initializes the components in the correct sequence, and connects them up with each other.
* At shut down: Shuts down the components and invokes cleanup methods where necessary.
@@ -47,11 +47,11 @@ Each of the four components,
For example, the `Logic` component (see the class diagram given below) defines its API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class which implements the `Logic` interface.
-![Class Diagram of the Logic Component](images/LogicClassDiagram.png)
+![Class Diagram of the Logic Component](images/LogicClassDiagram2.png)
**How the architecture components interact with each other**
-The *Sequence Diagram* below shows how the components interact with each other for the scenario where the user issues the command `delete 1`.
+The *Sequence Diagram* below shows how the components interact with each other for the scenario where the user issues the command `remove 1`.
@@ -62,66 +62,78 @@ The sections below give more details of each component.
![Structure of the UI Component](images/UiClassDiagram.png)
**API** :
-[`Ui.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/Ui.java)
+[`Ui.java`](https://github.com/AY2021S1-CS2103-T16-1/tp/blob/master/src/main/java/seedu/address/ui/Ui.java)
-The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.
+The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `FoodListPanel`, `OrderListPanel`, `VendorListPanel` `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.
-The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/resources/view/MainWindow.fxml)
+The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/AY2021S1-CS2103-T16-1/tp/blob/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/AY2021S1-CS2103-T16-1/tp/blob/master/src/main/resources/view/MainWindow.fxml)
The `UI` component,
* Executes user commands using the `Logic` component.
* Listens for changes to `Model` data so that the UI can be updated with the modified data.
+The `UI` component has two modes, the Vendor mode and the Menu mode.
+
+- If `Model#getVendorIndex()` is -1 (default value), the `UI` will be in Vendor mode, otherwise, the `UI` will be in Menu mode.
+- The mode can be updated using `MainWindow#updateMode()`.
+- In Vendor mode, the `VendorListPanel` will be displayed to the user and the `FoodListPanel` will be hidden.
+- In Menu mode, the `FoodListPanel` will be displayed to the user and the `VendorListPanel` will be hidden.
+
+
+
### Logic component
-![Structure of the Logic Component](images/LogicClassDiagram.png)
+![Structure of the Logic Component](images/LogicClassDiagram2.png)
**API** :
-[`Logic.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/logic/Logic.java)
+[`Logic.java`](https://github.com/AY2021S1-CS2103-T16-1/tp/blob/master/src/main/java/seedu/address/logic/Logic.java)
-1. `Logic` uses the `AddressBookParser` class to parse the user command.
+1. `Logic` uses the `SupperStrikersParser` class to parse the user command.
1. This results in a `Command` object which is executed by the `LogicManager`.
-1. The command execution can affect the `Model` (e.g. adding a person).
+1. The command execution can affect the `Model` (e.g. adding an order item).
+1. The command execution can affect the `Storage` (e.g saving a preset).
1. The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.
-1. In addition, the `CommandResult` object can also instruct the `Ui` to perform certain actions, such as displaying help to the user.
+1. In addition, the `CommandResult` object can also instruct the `UI` to perform certain actions, such as displaying help to the user.
+1. The `CommandResult` object can also instruct the `UI` to re-render the menu when some commands such as `SortCommand` and `FindCommand`.
-Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute("delete 1")` API call.
+Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute("remove 1")` API call.
-![Interactions Inside the Logic Component for the `delete 1` Command](images/DeleteSequenceDiagram.png)
+![Interactions Inside the Logic Component for the `remove 1` Command](images/DeleteSequenceDiagram2.png)
-:information_source: **Note:** The lifeline for `DeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
+
:information_source: **Note:** The lifeline for `RemoveCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
### Model component
-![Structure of the Model Component](images/ModelClassDiagram.png)
+![Structure of the Model Component](images/ModelClassDiagram2.png)
-**API** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java)
+**API** : [`Model.java`](https://github.com/AY2021S1-CS2103-T16-1/tp/blob/master/src/main/java/seedu/address/model/Model.java)
The `Model`,
* stores a `UserPref` object that represents the user’s preferences.
-* stores the address book data.
-* exposes an unmodifiable `ObservableList
` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.
-* does not depend on any of the other three components.
-
+* contains the `VendorManager` and `MenuManager`, `OrderManager` components.
+ * `VendorManager` stores the data for vendors.
+ * `MenuManager` stores the data for food items of the vendor's menu.
+ * `OrderManager` stores the data for order items.
-:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, which `Person` references. This allows `AddressBook` to only require one `Tag` object per unique `Tag`, instead of each `Person` needing their own `Tag` object.
-![BetterModelClassDiagram](images/BetterModelClassDiagram.png)
+* Each of these components exposes an unmodifiable `ObservableList` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.
+* does not depend on any of the other three components.
-
### Storage component
-![Structure of the Storage Component](images/StorageClassDiagram.png)
+![Structure of the Storage Component](images/StorageClassDiagram2.png)
-**API** : [`Storage.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/storage/Storage.java)
+**API** : [`Storage.java`](https://github.com/AY2021S1-CS2103-T16-1/tp/blob/master/src/main/java/seedu/address/storage/Storage.java)
The `Storage` component,
* can save `UserPref` objects in json format and read it back.
-* can save the address book data in json format and read it back.
+* can save the vendor book data in json format and read it back.
+* can save the `Preset` objects in json format and read it back.
+* can save the `Profile` object in json format and read it back.
### Common classes
@@ -133,90 +145,425 @@ Classes used by multiple components are in the `seedu.addressbook.commons` packa
This section describes some noteworthy details on how certain features are implemented.
-### \[Proposed\] Undo/redo feature
-#### Proposed Implementation
+### Menu Commands
-The proposed undo/redo mechanism is facilitated by `VersionedAddressBook`. It extends `AddressBook` with an undo/redo history, stored internally as an `addressBookStateList` and `currentStatePointer`. Additionally, it implements the following operations:
+Menu commands represent the operations with which the users can interact with the menu.
-* `VersionedAddressBook#commit()` — Saves the current address book state in its history.
-* `VersionedAddressBook#undo()` — Restores the previous address book state from its history.
-* `VersionedAddressBook#redo()` — Restores a previously undone address book state from its history.
-These operations are exposed in the `Model` interface as `Model#commitAddressBook()`, `Model#undoAddressBook()` and `Model#redoAddressBook()` respectively.
+#### Find Command
-Given below is an example usage scenario and how the undo/redo mechanism behaves at each step.
+- The Find Command allows the user to find items in the menu of their selected vendor `Model#updateFilteredMenuItemList()`.
+- If a vendor has not been selected, a `CommandException will be thrown`.
-Step 1. The user launches the application for the first time. The `VersionedAddressBook` will be initialized with the initial address book state, and the `currentStatePointer` pointing to that single address book state.
-![UndoRedoState0](images/UndoRedoState0.png)
+The following diagram summarises the sequence when the MenuCommand is executed.
-Step 2. The user executes `delete 5` command to delete the 5th person in the address book. The `delete` command calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state.
+![FindCommandSequenceDiagram](images/FindCommandSequenceDiagram.png)
-![UndoRedoState1](images/UndoRedoState1.png)
-Step 3. The user executes `add n/David …` to add a new person. The `add` command also calls `Model#commitAddressBook()`, causing another modified address book state to be saved into the `addressBookStateList`.
+Given below is an example usage scenario and how the FindCommand behaves at each step.
-![UndoRedoState2](images/UndoRedoState2.png)
+Step 1: The user has selected a vendor with vendor i.
-:information_source: **Note:** If a command fails its execution, it will not call `Model#commitAddressBook()`, so the address book state will not be saved into the `addressBookStateList`.
+Step 2: The user enters the command `find Milo` which finds and displays all the items in the selected menu with Milo in their names.
-
+Step 3: `Model#updateFilteredMenuItemList()` is executed to filter the current menu to only contain items that have the string "Milo" in their names.
-Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state.
-![UndoRedoState3](images/UndoRedoState3.png)
+#### Menu Command
-:information_source: **Note:** If the `currentStatePointer` is at index 0, pointing to the initial AddressBook state, then there are no previous AddressBook states to restore. The `undo` command uses `Model#canUndoAddressBook()` to check if this is the case. If so, it will return an error to the user rather
-than attempting to perform the undo.
+- The Menu Command allows the user to view the default menu of their selected vendor `Model#showDefaultMenu`.
+- If a vendor has not been selected, a `CommandException will be thrown`.
-
-The following sequence diagram shows how the undo operation works:
+The following diagram summarises the sequence when the MenuCommand is executed.
-![UndoSequenceDiagram](images/UndoSequenceDiagram.png)
+![MenuCommandSequenceDiagram](images/MenuCommandSequenceDiagram.png)
-:information_source: **Note:** The lifeline for `UndoCommand` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
-
+Given below is an example usage scenario and how the FindCommand behaves at each step.
-The `redo` command does the opposite — it calls `Model#redoAddressBook()`, which shifts the `currentStatePointer` once to the right, pointing to the previously undone state, and restores the address book to that state.
+Step 1: The user has selected a vendor with vendor i.
-:information_source: **Note:** If the `currentStatePointer` is at index `addressBookStateList.size() - 1`, pointing to the latest address book state, then there are no undone AddressBook states to restore. The `redo` command uses `Model#canRedoAddressBook()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo.
+Step 2: The user enters the command `find Milo` which finds and displays all the items in the selected menu with Milo in their names.
-
+Step 3: The user enters the command `menu` to display the selected menu with all the items.
+
+Step 4: `Model#showDefaultMenu()` is executed to retrieve and display the selected menu.
+
+
+#### Sort Command
+
+- The Sort Command allows the user to sort the selected menu based on price or name in ascending or descending order.
+- If a vendor has not been selected, a `CommandException will be thrown`.
+- If the parameters inputted are invalid, a `ParseException will be thrown`.
+
+
+The following diagram summarizes the sequence when the Sort Command is executed.
+
+![SortCommandSequenceDiagram](images/SortCommandSequenceDiagram.png)
+
+
+Given below is an example usage scenario and how the SortCommand behaves at each step.
+
+Step 1: The user has selected a vendor with vendor i.
+
+Step 2: The user enters the command `sort n a` which sorts the menu in ascending alphabetical order based on their names.
+
+Step 3: SortCommand checks whether the parameters - ascending and name, inputted are valid. The parameters are valid.
+
+Step 4: `Model#sortMenuItemBy()` is executed to sort the currently displayed menu in alphabetical ascending order of the menu item names.
+
+
+
+### Order Commands
+
+Order commands represents the operations to which users interact with.
+
+#### Add Command
+
+- The Add Command allows the user to add an order item from the selected menu `Model#getFilteredMenuItemList()`.
+- If the index provided is greater than the size of the menu or less than equals to zero, a `CommandException will be thrown`.
+- If the quantity provided is less than equals to zero, a `CommandException will be thrown`.
+- If the resultant supper order's quantity added exceeds 100, a `CommandException will be thrown`.
+
+
+The following diagram summarises the sequence when the AddCommand is executed.
+
+![AddCommandDiagram](images/AddCommandDiagram.png)
+
+
+
+Given below is an example usage scenario and how the AddCommand behaves at each step.
+
+Step 1: The user launches the application for the first time, by default, no vendor is selected.
+
+Step 2: The user selects a vendor with the VendorCommand `vendor i`, the corresponding menu will be loaded.
+
+Step 3: The user enters the command `add 2 3` which adds item 2 from the menu with a quantity of 3.
+
+Step 4: `Model#getFilteredMenuItemList()` is executed to retrieve the list of menu items from the current vendor.
+
+Step 5: `SupperStrikers` creates an AddCommandParser and calls `AddCommandParser#parse()` with argument "2 3".
+
+Step 6: AddCommandParser checks whether the index and quantity inputted is valid. Index and Quantity is valid, then an AddCommand is created.
+
+Step 7: An OrderItem object is created from the retrieved menu item and input quantity.
+
+Step 8: `Model#addOrderItem()` is executed to add the OrderItem into the `Model`.
+
+
+
+#### Remove Command
+
+- The RemoveCommand allows the user to remove an order from his order list `Model#getObservableOrderItemList()`.
+- If the index provided is greater than the size of his order list or less than or equal to zero, a `CommandException will be thrown`.
+- If the quantity provided is less than equals to zero or greater than the current quantity, a `CommandException will be thrown`.
+
+
+
+The following diagram summarises the sequence when the RemoveCommand is executed.
+
+![RemoveCommandDiagram](images/RemoveCommandDiagram.png)
+
+
+Given below is an example usage scenario and how the RemoveCommand behaves at each step.
+
+Step 1: The user has selected a vendor with `vendor i`.
+
+Step 2: The user has added items with `add i qty`.
+
+Step 3: The user enters the command `remove 1 1` which removes 1 quantity of the item at the 1st index in the order.
+
+Step 4: `Model#getObservableOrderItemList()` is executed to retrieve the list of OrderItems from the current order.
+
+Step 5: RemoveCommand checks whether the index and quantity inputted is valid. Index and Quantity is valid.
+
+Step 6: A new OrderItem object is created from the retrieved OrderItem and input quantity.
+
+Step 7: `Model#removeOrderItem()` is executed to remove the related OrderItem.
+
+
+
+#### Clear Command
+
+- The ClearCommand allows the user to clear all orders in the current order.
+- If the current Order has no items, a `CommandException will be thrown`.
+
+
+
+The following diagram summarises the sequence when the ClearCommand is executed.
+
+![ClearCommandDiagram](images/ClearCommandDiagram.png)
+
+
+
+Given below is an example usage scenario and how the ClearCommand behaves at each step.
+
+Step 1: The user has selected a vendor with `vendor i`.
+
+Step 2: The user has added items with `add i qty`.
+
+Step 3: The user enters the command `clear`.
+
+Step 4: ClearCommand checks whether the order has OrderItems with `Model#getOrderSize()`. The order has OrderItems.
+
+Step 5: `Model#clearOrder()` is executed to clear all OrderItems from the order.
+
+
+
+#### Tag Command
+
+ - The TagCommand allows the user to specify his preferences to an order item in the current order.
+ - If the index provided is greater than the size of the user's order list or less than equals to zero, a `CommandException will be thrown`.
+ - If the tag provided already exists, a `CommandException will be thrown`.
+
+
+The following diagram summarizes the sequence when the TagCommand is executed.
+![TagCommandActivityDiagram](images/TagCommandActivityDiagram.png)
+
+Given below is an example usage scenario and how the TagCommand behaves at each step.
+
+Step 1: The user has selected a vendor with `vendor i`.
+
+Step 2: The user has added items with `add i qty`.
+
+Step 3: The user enters the command `tag 1 1 no ice` which adds the tag of "1 no ice" to the item at the first index in the order.
+
+Step 4: `Model#getObservableOrderItemList()` is executed to retrieve the list of OrderItems from the current order.
+
+Step 5: TagCommand checks whether the index and tag inputted is valid. Index and tag is valid.
+
+Step 6: `Model#tagOrderItem()` is executed to tag the given OrderItem.
+
+
+#### Untag Command
+
+- The UntagCommand allows users to remove all tags from an order item in the current order.
+- If the index provided is greater than the size of the user's order list or less than equals to zero, a `CommandException will be thrown`.
+
+The following diagram summarizes the sequence when the TagCommand is executed.
+![UntagCommandActivityDiagram](images/UntagCommandActivityDiagram.png)
+
+Given below is an example usage scenario and how the UnTagCommand behaves at each step.
+
+Step 1: The user has selected a vendor with `vendor i`.
+
+Step 2: The user has added items with `add i qty`.
+
+Step 3: The user tagged the item at index 1 with `tag 1 all no ice`.
+
+Step 4: The user enters the command `untag 1` to remove the tag of "all no ice" from the OrderItem at index 1.
+
+Step 5: `Model#getObservableOrderItemList()` is executed to retrieve the list of OrderItems from the current order.
+
+Step 6: UntagCommand checks whether the index inputted is valid. Index is valid.
+
+Step 7: `Model#untagOrderItem()` is executed to remove all the tags that the given OrderItem has.
+
+
+
+#### Preset Commands
+
+- There are three types of preset commands, `preset save`, `preset load` `preset delete`.
+- Preset save stores the current order in a file, with the given preset name under the specific vendor.
+- Preset load retrieves the preset with the name provided from the user, and loads it into the current order.
+- Preset delete deletes the preset with the name provided from the user.
+
+- If the name given is invalid for preset commands, a `CommandException will be thrown`.
+- If the name already exists for preset save, the previous file will be overwritten with the current one.
+- Preset load retrieves the preset with the name provided from the file, and loads it into the current order.
+
+The following sequence diagram summarises the sequence when the LoadPresetCommand is executed.
+
+
+
+![LoadPresetSequenceDiagram](images/LoadPresetCommandSequenceDiagram.png)
-Step 5. The user then decides to execute the command `list`. Commands that do not modify the address book, such as `list`, will usually not call `Model#commitAddressBook()`, `Model#undoAddressBook()` or `Model#redoAddressBook()`. Thus, the `addressBookStateList` remains unchanged.
+Given below is an example usage scenario and how the LoadPresetCommand behaves at each step.
-![UndoRedoState4](images/UndoRedoState4.png)
+Step 1: The user has selected a vendor with `vendor i`.
-Step 6. The user executes `clear`, which calls `Model#commitAddressBook()`. Since the `currentStatePointer` is not pointing at the end of the `addressBookStateList`, all address book states after the `currentStatePointer` will be purged. Reason: It no longer makes sense to redo the `add n/David …` command. This is the behavior that most modern desktop applications follow.
+Step 2: The user enters the command `load preset sample` to load the preset named `sample`.
-![UndoRedoState5](images/UndoRedoState5.png)
+Step 3: `Storage#readPresetManager()` is executed to retrieve the list of all presets, `allLists`,from the presets json file.
-The following activity diagram summarizes what happens when a user executes a new command:
+Step 4: The preset with the name `sample` for vendor `i` exists and is valid.
-![CommitActivityDiagram](images/CommitActivityDiagram.png)
+Step 5: The preset is obtained and the ArrayList of `OrderItem` is obtained.
-#### Design consideration:
+Step 6: `Model#setOrder()` is executed to set the current order to the obtained ArrayList of `OrderItem`.
-##### Aspect: How undo & redo executes
-* **Alternative 1 (current choice):** Saves the entire address book.
- * Pros: Easy to implement.
- * Cons: May have performance issues in terms of memory usage.
-* **Alternative 2:** Individual command knows how to undo/redo by
- itself.
- * Pros: Will use less memory (e.g. for `delete`, just save the person being deleted).
- * Cons: We must ensure that the implementation of each individual command are correct.
+Given below is the activity diagram for the LoadPresetCommand.
-_{more aspects and alternatives to be added}_
+![LoadPresetCommandActivityDiagram](images/LoadPresetCommandActivityDiagram.png)
-### \[Proposed\] Data archiving
-_{Explain here how the data archiving feature will be implemented}_
+The following diagram sequence summarises the sequence when the SavePresetCommand is executed.
+
+![SavePresetSequenceDiagram](images/SavePresetCommandSequenceDiagram.png)
+
+Given below is an example usage scenario and how the SavePresetCommand behaves at each step.
+
+Step 1: The user has selected a vendor with `vendor i`.
+
+Step 2: The user has added items with `add i qty`.
+
+Step 3: The user enters the command `save preset sample` to save the preset with the name `sample`.
+
+Step 4: `Storage#readPresetManager()` is executed to retrieve the list of all presets, `allLists`, from the presets json file.
+
+Step 5: The preset with the name `sample` for vendor `i` does not exist.
+
+Step 6: The current order item list, `orderItemList`, is retrieved by executing `Model#getObservableOrderItemList()`.
+
+Step 7: `orderItemList` is converted to a preset named `sample`.
+
+Step 8: `sample` is added to the vendor index `i` position of `allLists`.
+
+Step 9: `Storage#savePresetManager()` is executed to save the modified `allLists` into the `presets` json file.
+
+
+
+Given below is the activity diagram for SavePresetCommand.
+
+![SavePresetCommandActivityDiagram](images/SavePresetCommandActivityDiagram.png)
+
+
+
+The following diagram sequence summarises the sequence when the DeletePresetCommand is executed.
+
+![DeletePresetSequenceDiagram](images/DeletePresetCommandSequenceDiagram.png)
+
+Given below is an example usage scenario and how the DeletePresetCommand behaves at each step.
+
+Step 1: The user has selected a vendor with `vendor i`.
+
+Step 2: The user enters the command `delete preset sample` to delete the preset named 'sample' stored in the user's presets json file.
+
+Step 3: `Storage#readPresetManager()` is executed to retrieve the list of all presets, from the presets json file.
+
+Step 4: The preset with the name `sample` for vendor `i` exists.
+
+Step 5: `sample` is removed from the vendor index `i` position of `allLists`.
+
+Step 6: `Storage#savePresetManager()` is executed to save the modified `allLists` into the `presets` json file.
+
+
+
+Given below is the activity diagram for SavePresetCommand.
+
+![SavePresetCommandActivityDiagram](images/SavePresetCommandActivityDiagram.png)
+
+
+
+### Undo feature
+
+Changes made to the Order can be undone by using the `undo` command.
+
+The OrderManager starts out with a Stack of Order `orderHistory` and a main Order `order`, which
+represents the past versions of the order, and the most current order respectively. Any changes (ie. `add`, `remove`,
+`clear` etc.) should be done to `order`. After the changes are done, the method `OrderManager#saveChanges()` should be
+called, which saves a copy (see `Order#makeCopy()`) of `order` to the `orderHistory`. If the user requests an undo,
+the head of `orderHistory` will be popped, and `order` is now a copy of the head of the popped stack.
+
+`OrderManager#saveChanges()` works based on the assumption that the head of `orderHistory` is always equal to `order`.
+If not and a change is made to the order followed by calling `OrderManager#saveChanges()`, then the `order` right before
+the change is not saved. Therefore, the method `orderHistory#clear()` should not be called unless the developer
+understands the effect of doing so. This also means if a method changes the order and it should be able to be undone,
+`saveChanges()` must be called at the end of the method.
+
+### Friendly Syntax
+
+The friendly syntax allows users to type in just the prefix of a command to execute it.
+
+The following diagram summarizes the sequence when the RemoveCommand is executed from the user input of `r 1`.
+
+![Friendly_Syntax_Architecture_Diagram](images/friendly_syntax_architecture_diagram.png)
+
+Given below is an example usage scenario and how the friendly syntax behaves at the parse stage.
+
+Step 1: The user launches the application for the first time and enters the vendor command `vendor 1`.
+
+Step 2: SupperStrikers loads the menu of the 1st vendor into the GUI.
+
+Step 3: The user enters the add command `add 1 3`
+
+Step 4: SupperStrikers adds 3 of the 1st item into the order.
+
+Step 5: The user enters the command `r 1 1`.
+
+Step 6: The `LogicManager#execute()` is executed to call the `SupperStrikersParser#parseCommand()` method.
+
+Step 7: `SupperStrikersParser#parseCommand()` checks if the inputted command word is a prefix of one and only one of the valid commands by filtering the list of valid commands based on whether they start with the user inputted prefix. The `r` in this case maps to the `remove` keyword.
+
+Step 8: The `RemoveCommand` is executed and one quantity of the first item in the order is removed.
+
+- If there is no command with the given prefix, an `ParseException` will be thrown.
+- If the inputted prefix exists for more than 1 command, a `ParseException` will be thrown.
+- If there is a command which is a prefix for another command, it can no longer be executed.
+
+### Vendor Commands
+
+- There are two VendorCommand classes in SupperStrikers.
+- `SwitchVendorCommand` allows the user to select a vendor from the `VendorManager` to order from.
+- `VendorCommand`, deselects the vendor to the default unintialized value.
+
+- If the vendor does not exist, a `CommandException will be thrown`.
+- If the vendor selected is different from the current vendor, the model will clear the current order.
+
+
+#### Switch Vendor Command
+The following activity diagram summarises the process when the SwitchVendorCommand is executed.
+
+
+
+
+
+
+Given below is an example usage scenario and how the SwitchVendorCommand behaves at each step.
+
+Step 1: The user launches the application for the first time, by default, no vendor is selected.
+
+Step 2: The user enters the vendor command `vendor i`.
+
+Step 3: `Model#getObservableVendorList()` is executed to retrieve the list of vendors.
+
+Step 4: SwitchVendorCommand checks whether ith index is valid.
+
+Step 5: If the ith index is valid, `Model#selectVendor(i)` is executed to select the vendor.
+
+Step 6: Supper Strikers loads the menu of the ith vendor into the UI by calling `MainWindow#handleVendor()`.
+
+Step 7: The UI component showing the vendor list is hidden and the UI showing the menu is displayed to the user by calling
+`MainWindow#displayMenu()`.
+
+Step 8: `Model#resetOrder()` creates a new empty order for the ith vendor.
+
+
+
+The following diagram summarises the sequence when the SwitchVendorCommmand is executed.
+
+
+
+#### Vendor Command
+
+Given below is an example usage scenario and how VendorCommand behaves at each step.
+
+Step 1: The user has selected a vendor with index `i`.
+
+Step 2: The user enters the vendor command `vendor`.
+
+Step 3: `Model#selectVendor(-1)` is executed to set the vendor to the default uninitialized value.
+
+Step 4: The UI component showing the menu is hidden and the UI component showing the vendor list is displayed to the
+user by calling `MainWindow#displayMenu()`.
+
+Step 5: `Model#resetOrder()` sets the order to a new empty order.
--------------------------------------------------------------------------------------------------------------------
@@ -236,13 +583,14 @@ _{Explain here how the data archiving feature will be implemented}_
**Target user profile**:
-* has a need to manage a significant number of contacts
+* has a need to order supper frequently
+* stays on campus
* prefer desktop apps over other types
* can type fast
* prefers typing to mouse interactions
* is reasonably comfortable using CLI apps
-**Value proposition**: manage contacts faster than a typical mouse/GUI driven app
+**Value proposition**: manage ordering supper faster than a typical mouse/GUI driven app
### User stories
@@ -252,55 +600,470 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
| Priority | As a … | I want to … | So that I can… |
| -------- | ------------------------------------------ | ------------------------------ | ---------------------------------------------------------------------- |
| `* * *` | new user | see usage instructions | refer to instructions when I forget how to use the App |
-| `* * *` | user | add a new person | |
-| `* * *` | user | delete a person | remove entries that I no longer need |
-| `* * *` | user | find a person by name | locate details of persons without having to go through the entire list |
-| `* *` | user | hide private contact details | minimize chance of someone else seeing them by accident |
-| `*` | user with many persons in the address book | sort persons by name | locate a person easily |
+| `* * *` | NUS resident | add a food item to my supper order | |
+| `* * *` | NUS resident | remove a food item from my supper order | |
+| `* * *` | NUS resident | see the menu | view all the items currently ordered by me |
+| `* * *` | NUS resident | see the vendor list and select vendor | confirm which vendor to order from |
+| `* * ` | NUS resident | see the total price of my current order | decide whether I want to order more |
+| `*` | NUS resident | confirm order | finalize my supper selection |
+| `* * *` | NUS resident | undo my commands | fix any mistakes made while ordering |
+| `* * *` | NUS resident | submit my order | |
+| `* *` | NUS resident | clear the current order | start a new order |
+| `* *` | NUS resident | filter the menu | find the food item that I want to order easily |
+| `* *` | NUS resident | save my current order as a preset | load up the preset for fast supper ordering |
+| `* *` | NUS resident | tag an item in my supper order | mention my preferences for that item |
+| `* *` | NUS resident | remove tags from an item in my supper order| fix any mistakes made while tagging that item |
-*{More to be added}*
### Use cases
-(For all use cases below, the **System** is the `AddressBook` and the **Actor** is the `user`, unless specified otherwise)
+(For all use cases below, the **System** is the `SupperStrikers` and the **Actor** is the `user`, unless specified otherwise)
+
+**Use case: Display user instructions**
+
+**MSS**
+
+1. User requests to see the user instructions.
+2. SupperStrikers displays the link to the user guide.
+
+ Use case ends.
+
+**Use case: Exit the program**
+
+**MSS**
+
+1. User requests to exit the program.
+2. SupperStrikers terminates and closes.
+
+ Use case ends.
+
+**Use case: Showing and selecting a particular vendor**
+
+**MSS**
+
+1. SupperStrikers displays the list of vendors.
+2. User requests to choose a specified vendor.
+3. SupperStrikers displays the menu of the selected vendor.
+4. SupperStrikers creates a new empty order of the selected vendor.
+
+ Use case ends.
+
+**Extensions**
+
+- 2a. The given index is invalid.
+
+ - 2a1. SupperStrikers displays an error message.
+
+ Use case resumes at step 2.
+
+- 2b. The user has already selected a different vendor.
+
+ - 2b1. SupperStrikers clears the order of the current vendor.
+
+ Use case resumes at step 3.
+
+
+**Use case: Showing list of all vendors**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. SupperStrikers displays a specific vendor.
+2. User requests to view all vendors.
+3. SupperStrikers displays the details of all vendors.
+4. SupperStrikers resets the current order to a new empty order.
+
+ Use case ends.
+
+**Use case: Display current menu**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. User requests to see the current default menu for his selected vendor.
+2. SupperStrikers displays the default menu to the user.
+
+ Use case ends.
+
+**Use case: Find a keyword**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. User requests to search for specified keyword(s) in the menu.
+2. SupperStrikers filter out the current menu using the specified keyword(s).
+3. SupperStrikers displays the matching menu items that contains the keyword(s) to the user.
+
+ Use case ends.
+
+**Use case: Filter menu item by price**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. User requests to see menu items that satisfy a specified price range.
+2. SupperStrikers filter out the current menu using the specified price range.
+3. SupperStrikers displays the matching menu items that satisfy the price range to the user.
+
+ Use case ends.
+
+**Use case: Sort menu items**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. User requests to sort the menu items by price or name.
+2. SupperStrikers sorts the current menu.
+
+ Use case ends.
+
+**Use case: Viewing total**
-**Use case: Delete a person**
+Precondition: User has already selected a particular vendor
**MSS**
-1. User requests to list persons
-2. AddressBook shows a list of persons
-3. User requests to delete a specific person in the list
-4. AddressBook deletes the person
+1. User requests to see the total price of the current order.
+2. SupperStrikers displays the total price of the current order to the user.
+
+ Use case ends.
+**Extensions**
+
+- 1a. The order list is empty.
+
+ - 1a1. SupperStrikers displays an error message.
+
Use case ends.
+
+**Use case: Clearing current order**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. User requests to clear the current order.
+2. SupperStrikers clears the current order.
+3. SupperStrikers creates a new empty order of the selected order.
+
+ Use case ends.
+
**Extensions**
-* 2a. The list is empty.
+- 1a. The order list is empty.
+
+ - 1a1. SupperStrikers displays an error message.
+
+ Use case ends.
+
+
+**Use case: Set a profile**
+
+**MSS**
+
+1. User requests to set his profile which includes his phone number and address.
+2. SupperStrikers creates a new profile that has the user's inputted details.
+3. SupperStrikers saves the created profile into storage.
Use case ends.
-* 3a. The given index is invalid.
+**Extensions**
+
+- 1a. The user's details are invalid.
- * 3a1. AddressBook shows an error message.
+ - 1a1. SupperStrikers displays an error message.
+
+ Use case resumes at step 1.
- Use case resumes at step 2.
+- 3a. The user has an existing profile.
+
+ - 3a1. SupperStrikers overwrite the existing profile with the newly created profile.
+
+ Use case ends.
+
+**Use case: Submit order**
+
+Precondition: User has already selected a particular vendor and User has created a profile
+
+**MSS**
+
+1. User requests to submit the current order.
+2. SupperStrikers displays a copy of the order in a submittable format to the user and at the same time copies that text
+ to the user's clipboard.
+
+ Use case ends.
+
+**Extensions**
+
+- 1a. The order list is empty.
+
+ - 1a1. SupperStrikers displays an error message.
+
+ Use case ends.
+
+**Use case: Add an item**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. User requests to add a specified quantity of an item listed in the vendor menu.
+2. SupperStrikers adds the item along with the quantity specified into the current order.
+3. SupperStrikers displays the updated order with the newly added item.
+
+ Use case ends.
+
+**Extensions**
+
+- 1a. The given index is invalid.
+
+ - 1a1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+- 1b. The given quantity is invalid.
+
+ - 1b1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+- 1c. The quantity is not specified.
+
+ - 1c1. SupperStrikers sets the quantity of the item to be added as 1.
+
+ Use case resumes at step 2.
+
+- 2a. The resultant quantity of the item exceeds 100.
+
+ - 2a1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+**Use case: Remove an item**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. User requests to remove a quantity of a specific item in the current order.
+2. SupperStrikers decreases the quantity of the item by the quantity provided.
+
+ Use case ends.
+
+**Extensions**
+
+- 1a. The given index is invalid.
+
+ - 1a1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+- 1b. The given quantity is invalid.
+
+ - 1b1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+- 1c. The given quantity is larger than the quantity to the order item.
+
+ - 1c1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+- 1d. The quantity is not specified.
+
+ - 1d1. SupperStrikers removes the order item at the specified index along with all of its quantity.
+
+ Use case ends.
+
+
+**Use case: Add a tag to an item**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. User requests to tag a specific item in the current order.
+2. SupperStrikers adds tag to the item.
+
+ Use case ends.
+
+**Extensions**
+
+- 1a. The given index is invalid.
+
+ - 1a1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+- 1b. The tag is not specified.
+
+ - 1b1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+- 1c. The tag already exists at the specified order item.
+
+ - 1c1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+**Use case: Remove tags from an item**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. User requests to remove all tags from a specific item in the current order.
+2. SupperStrikers removes all tags from the item.
+
+ Use case ends.
+
+**Extensions**
+
+- 1a. The given index is invalid.
+
+ - 1a1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+
+**Use case: Load a Preset**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. User requests to load preset of a specific name.
+2. SupperStrikers loads the saved presets from storage.
+3. SupperStrikers finds the preset with the same name under the current vendor.
+4. SupperStrikers loads the preset into the current order.
+
+ Use case ends.
+
+**Extensions**
+
+- 1a. The name given is invalid.
+
+ - 1a1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+- 1b. The name is not provided.
+
+ - 1b1. SupperStrikers instead displays the name of all saved presets for the current vendor.
+
+ Use case ends.
+
+- 3a. There is no preset with the same name.
+
+ - 3a1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+- 4a. The current order already contains order items.
+
+ - 4a1. The current order is replaced by the preset.
+
+ Use case ends.
+
+**Use case: Save a Preset**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. User requests to save preset with a specific name.
+2. SupperStrikers loads the saved presets from storage.
+3. SupperStrikers creates a new preset with the current order items.
+4. SupperStrikers adds the new preset into the current list of saved presets for the current vendor.
+5. SupperStrikers saves the modified presets into storage.
+
+ Use case ends.
+
+**Extensions**
+
+- 1a. The name given is invalid.
+
+ - 1a1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+- 1b. The name is not provided.
+
+ - 1b1. SupperStrikers gives the preset a default name of 'MyPreset'.
+
+ Use case resumes at step 2.
+
+- 4a. The preset that is trying to be saved has an identical name to an existing saved preset.
+
+ - 4a1. The preset that is trying to be saved replaces the old preset with the same name.
+
+ Use case resumes at step 5.
+
+**Use case: Delete a Preset**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. User requests to delete a preset with a specific name.
+2. SupperStrikers loads the saved presets from storage.
+3. SupperStrikers removes the preset with the specified name from the list.
+4. SupperStrikers saves the modified presets into storage.
+
+ Use case ends.
+
+**Extensions**
+
+- 1a. The name given is invalid or is not provided.
+
+ - 1a1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+- 2a. The specified name is not found in the list of saved presets.
+
+ - 2a1. SupperStrikers shows an error message.
+
+ Use case resumes at step 1.
+
+**Use case: Undo changes to an order**
+
+Precondition: User has already selected a particular vendor
+
+**MSS**
+
+1. User requests to undo a change from his current order.
+2. SupperStrikers reverts his order back to an older history of his order.
+
+ Use case ends.
+
+**Extensions**
+
+- 1a. The user is at the oldest history of his order.
+
+ - 1a1. SupperStrikers shows an error message.
+
+ Use case ends.
-*{More to be added}*
### Non-Functional Requirements
1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed.
-2. Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.
+2. Should be able to hold up to 1000 items without a noticeable sluggishness in performance for typical usage.
3. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.
-*{More to be added}*
### Glossary
* **Mainstream OS**: Windows, Linux, Unix, OS-X
-* **Private contact detail**: A contact detail that is not meant to be shared with others
--------------------------------------------------------------------------------------------------------------------
@@ -310,7 +1073,6 @@ Given below are instructions to test the app manually.
:information_source: **Note:** These instructions only provide a starting point for testers to work on;
testers are expected to do more *exploratory* testing.
-
### Launch and shutdown
@@ -319,38 +1081,85 @@ testers are expected to do more *exploratory* testing.
1. Download the jar file and copy into an empty folder
- 1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
+ 2. Open a command window. Run the java -version command to ensure you are using Java 11. If not, please install Java 11 to ensure you are able to safely launch the jar file.
+
+ 3. Launch the jar file using the java -jar supperstrikers.jar command (do not use double-clicking).
+ Expected: Shows the GUI with a set of sample vendors. The window size may not be optimum.
1. Saving window preferences
1. Resize the window to an optimum size. Move the window to a different location. Close the window.
- 1. Re-launch the app by double-clicking the jar file.
+ 2. Re-launch the app by using the java -jar supperstrikers.jar command.
Expected: The most recent window size and location is retained.
-1. _{ more test cases … }_
-### Deleting a person
+### Selecting a vendor
+
+1. Selecting a vendor while all the vendors are being shown
-1. Deleting a person while all persons are being shown
+ 1. Prerequisites: List all vendors using the `vendor` command.
- 1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
+ 2. Test case: `vendor 1`
+ Expected: First vendor is selected. The menu from the selected vendor is displayed.
- 1. Test case: `delete 1`
- Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated.
+ 3. Test case: `vendor`
+ Expected: No vendor is selected. The list of vendors is displayed again.
- 1. Test case: `delete 0`
- Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.
+ 4. Test case: `vendor 0`
+ Expected: No vendor is selected. Error details shown in status message. Status bar remains the same.
- 1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)
+ 5. Other incorrect delete commands to try: `vendor x`, `...` (where x is larger than the list size)
Expected: Similar to previous.
-1. _{ more test cases … }_
+
+### Adding an item
+
+1. Adding an item while an order is currently active
+
+ 1. Prerequisites: Has a vendor selected using the `vendor` command.
+
+ 2. Test case: `add 1 1`
+ Expected: 1 order of the first item from the menu is added into the order. Details of the added order item shown in the status message.
+
+ 3. Test case: `add 1 0`
+ Expected: No item is added. Error details shown in the status message.
+
+ 4. Test case: `add 0 1`
+ Expected: No item is added. Error details shown in the status message.
+
+ 5. Other incorrect add commands to try: `add`, `add -1 -1`, `add x y`, `...` (where x is larger than the menu size)
+ Expected: Similar to previous.
+
+
+### Removing an item
+
+1. Removing an item while an order is currently active
+
+ 1. Prerequisites: Has a vendor selected using the `vendor` command. There is at least one item in the order.
+
+ 2. Test case: `remove 1`
+ Expected: All the quantity of the first item is removed from the order. Details of the removed order shown in the status message.
+
+ 3. Test case: `remove 1 1`
+ Expected: 1 order of the first item from the user's order is removed from the order. Details of the removed order shown in the status message.
+
+ 4. Test case: `remove 0`
+ Expected: No item is deleted. Error details shown in the status message.
+
+ 5. Test case: `remove 1 0`
+ Expected: No item is deleted. Error details shown in the status message.
+
+ 6. Other incorrect delete commands to try: `remove`, `remove -1 -1`,`remove x y`, `...` (where x is larger than the list size or y is larger than the user's order quantity amount)
+ Expected: Similar to previous.
### Saving data
1. Dealing with missing/corrupted data files
- 1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_
+ 1. Delete the data folder, preferences and config json file.
+
+ 2. Make sure you have the latest copy of the SupperStrikers.jar which can be obtained [here.](https://github.com/AY2021S1-CS2103-T16-1/tp/releases)
+
+ 3. Rerun the SupperStrikers.jar in an empty folder.
-1. _{ more test cases … }_
diff --git a/docs/UserGuide.md b/docs/UserGuide.md
index b91c3bab04d..4dd91f0cce1 100644
--- a/docs/UserGuide.md
+++ b/docs/UserGuide.md
@@ -2,38 +2,33 @@
layout: page
title: User Guide
---
-
-AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized for use via a Command Line Interface** (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, AB3 can get your contact management tasks done faster than traditional GUI apps.
+**Supper Strikers is a desktop application for managing your supper orders.** It is targeted at students living in NUS for ordering delivery from supper stretch. While it has a GUI (Graphical User Interface), most of the user interactions happen using a CLI (Command Line Interface).
* Table of Contents
{:toc}
--------------------------------------------------------------------------------------------------------------------
-## Quick start
-
-1. Ensure you have Java `11` or above installed in your Computer.
+1. Download the latest `supperstrikers.jar` from [here](https://github.com/AY2021S1-CS2103-T16-1/tp/releases).
-1. Download the latest `addressbook.jar` from [here](https://github.com/se-edu/addressbook-level3/releases).
+1. Copy the jar to the folder you want to use as the _home folder_ for your SupperStrikers.
-1. Copy the file to the folder you want to use as the _home folder_ for your AddressBook.
+1. Open a command window. Run the java -version command to ensure you are using Java 11. If not, please install Java 11 to ensure you are able to safely launch the jar file.
-1. Double-click the file to start the app. The GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
+1. Launch the jar file using the java -jar supperstrikers.jar command (do not use double-clicking). The GUI similar to the one below should appear in a few seconds.
![Ui](images/Ui.png)
1. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.
Some example commands you can try:
- * **`list`** : Lists all contacts.
-
- * **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` : Adds a contact named `John Doe` to the Address Book.
-
- * **`delete`**`3` : Deletes the 3rd contact shown in the current list.
-
- * **`clear`** : Deletes all contacts.
-
+ * **`vendor`** : List all the vendors available.
+ * **`vendor 1`** : Select the first vendor to make a supper order for.
+ * **`add 1 2`** : Adds two quantity of the item at the 1st index from the vendor's menu to your supper order.
+ * **`remove 1 1`** : Removes 1 quantity of the item at the 1st index from your order.
+ * **`preset save My First Preset`** : Saves your current order items locally as a preset with the name "My First Preset", which you can call it back easily by:
+ * **`preset load My First Preset`** : Loads the preset with the name "My First Preset" to your supper strikers app!
* **`exit`** : Exits the app.
-
+
1. Refer to the [Features](#features) below for details of each command.
--------------------------------------------------------------------------------------------------------------------
@@ -41,138 +36,332 @@ AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized fo
## Features
-
-**:information_source: Notes about the command format:**
+**Notes about the command format:**
* Words in `UPPER_CASE` are the parameters to be supplied by the user.
- e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.
-
+ E.g. in `find KEYWORD`, `KEYWORD` is a parameter which can be used as `find spicy`.
+
* Items in square brackets are optional.
- e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.
-
-* Items with `…` after them can be used multiple times including zero times.
- e.g. `[t/TAG]…` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.
+ E.g `add INDEX [QUANTITY]` can be used as `add 3 2` or as `add 3`.
+
+* **Friendly syntax** is supported! For any command, typing the prefix of the command will already be recognized, unless there is any ambiguity.
-* Parameters can be in any order.
- e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.
+ * E.g. `help` only requires the user to type `h` to be recognized, while `sort` will require user to at least type `so` since typing `s` by itself will conflict with another command `submit` (The commands
+ will be explained below. To minimize confusion, the whole command will be shown instead of the prefix.)
+
+* Extra whitespaces in between arguments will be ignored.
-### Viewing help : `help`
+The application is divided into two modes, vendor mode and menu mode. Vendor mode is when a vendor is not yet selected,
+as seen by the section on the left displaying a list of vendors. In vendor mode, only vendor
+related commands can be executed. In menu mode, vendor, menu and order commands can be executed.
-Shows a message explaning how to access the help page.
+## General
-![help message](images/helpMessage.png)
+### Getting Started: `help`
+
+Shows the user instructions on how to use the application.
Format: `help`
+- Note that anything written after the `help` command will be ignored.
-### Adding a person: `add`
+### Exit application: `exit`
-Adds a person to the address book.
+See you next time!
-Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…`
+Note that any arguments written after the `exit` command will be ignored.
-:bulb: **Tip:**
-A person can have any number of tags (including 0)
-
+- `exit` and `exit 1` is treated as the same command
+- This also applies to all other commands with no arguments
+
+Format: `exit`
+
+- This command closes the jar file.
+
+## Vendor related commands
+
+### View/select vendor: `vendor`
+
+Displays the list of all vendors or selects the specified vendor.
+
+Format: `vendor [INDEX]`
+
+* If no `INDEX` is specified, it displays the list of all vendors and returns to vendor mode.
+* If an `INDEX` is specified, the corresponding vendor is selected, and its menu will be shown.
+* If there is an existing supper order, it will be deleted.
+* `INDEX` must be a positive integer and must not exceed the size of the vendor list.
Examples:
-* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01`
-* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal`
+* `vendor`: Changes back to vendor mode.
+* `vendor 2`: Selects the 2nd vendor in the list.
+
+## Menu related commands
+
+### Displaying supper menu: `menu`
+
+Displays the default menu from the selected vendor.
+
+- Can be used to display the menu after a `sort` / `find` / `price` command.
+- Note that any arguments written after the `menu` command will be ignored, and menu will be listed as intended.
+
+Format: `menu`
-### Listing all persons : `list`
+Example:
-Shows a list of all persons in the address book.
+- `menu`: Displays the full menu of the selected vendor.
-Format: `list`
-### Editing a person : `edit`
+### Sorting the menu: `sort`
-Edits an existing person in the address book.
+Sorts the menu by either price or name.
-Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…`
+Format: `sort MODE [DIRECTION]`
-* Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. The index **must be a positive integer** 1, 2, 3, …
-* At least one of the optional fields must be provided.
-* Existing values will be updated to the input values.
-* When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative.
-* You can remove all the person’s tags by typing `t/` without
- specifying any tags after it.
+* `MODE` dictates which mode it will sort by, with format:
+ * `n`: sorts by name
+ * `p`: sorts by price
+
+* `DIRECTION` dictates which direction it will sort by, with format:
+ * `a`: sort in ascending order
+ * `d`: sort in descending order
+ * `t`: toggles the direction, if previous sort was ascending, new direction is descending. If no direction was previously specified, sort in ascending order.
+* If `DIRECTION` is not specified, it will be treated as a toggle, and ascending direction will be sorted as descending order and vice versa.
Examples:
-* `edit 1 p/91234567 e/johndoe@example.com` Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively.
-* `edit 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.
+* `sort n a`: sorts the menu by name in ascending direction.
+* `sort p`: sorts the menu by price in opposite direction as last sorted.
-### Locating persons by name: `find`
-Finds persons whose names contain any of the given keywords.
+### Find menu item: `find`
-Format: `find KEYWORD [MORE_KEYWORDS]`
+Finds and lists all menu items containing any of the specified keywords in their name.
-* The search is case-insensitive. e.g `hans` will match `Hans`
-* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`
-* Only the name is searched.
-* Only full words will be matched e.g. `Han` will not match `Hans`
-* Persons matching at least one keyword will be returned (i.e. `OR` search).
- e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`
+Format: `find KEYWORD [MORE_KEYWORDS]...`
+
+- `KEYWORD` are NOT **case-sensitive**.
+- Tags will also be detected.
+- Note that keywords with spaces will be are treated as separate keywords (see example below). This is to avoid user mistake.
+
+Examples:
+* `find milo`: lists all menu items containing the word 'milo' in their name.
+* `find milo dinosaur`: lists all menu items containing the word 'milo' or 'dinosaur' in their name.
+
+
+### Filter menu item by price: `price`
+
+Filters all menu item within a specified price range.
+
+Format: `price INEQUALITY PRICE`
+
+* `INEQUALITY` is an inequality sign, of the below formats:
+ * `<`: Strictly less than
+ * `<=`: Less than or Equal to
+ * `>`: Strictly greater than
+ * `>=`: Greater than or Equal to
+* `PRICE` must be a non-negative real number. Only up to 2 decimal places will be considered, anything from third decimal places onward will be ignored.
+
+Examples:
+* `price < 3`: lists all menu items with price less than $3.
+* `price <= 2`: lists all menu items with price less than or equal to $2.
+* `price > 4.123`: lists all menu items with price greater than $4.12
+
+
+## Order related commands
+
+### Adding an order item: `add`
+
+Adds an order item for the user according to the index from the menu to the user's supper order.
+
+Format: `add INDEX [QUANTITY]`
+
+* The `INDEX` refers to the index number shown on the displayed menu list.
+* `INDEX` must be a positive integer and must not exceed the size of the menu list.
+* `QUANTITY` can be specified to indicate the number of item to be added. Otherwise, it adds one quantity of the item at the specified index.
+
+Examples:
+* `add 1 1`: add item at INDEX 1, of QUANTITY 1.
+* `add 2 3`: add item at INDEX 2, of QUANTITY 3.
+* `add 1`: add item at INDEX 1, of default QUANTITY 1.
+
+
+### Removing an order item : `remove`
+
+Removes the specified item from the supper order.
+
+Format: `remove INDEX [QUANTITY]`
+
+* `INDEX` refers to the index number shown in the displayed supper order list.
+* `INDEX` must be a positive integer and must not exceed the size of the supper order list.
+* `QUANTITY` can be specified to indicate the number of item to be deleted (has to be less than or equal to the current quantity).
+* If `QUANTITY` is not specified, it removes all items of the specified index.
Examples:
-* `find John` returns `john` and `John Doe`
-* `find alex david` returns `Alex Yeoh`, `David Li`
- ![result for 'find alex david'](images/findAlexDavidResult.png)
+* `remove 2`: remove all items at INDEX 2.
+* `remove 1 2`: remove item at INDEX 1, of quantity 2.
+
-### Deleting a person : `delete`
+### Tag an order item: `tag`
-Deletes the specified person from the address book.
+Tags an order item with remark.
-Format: `delete INDEX`
+Format: `tag INDEX REMARK`
-* Deletes the person at the specified `INDEX`.
-* The index refers to the index number shown in the displayed person list.
-* The index **must be a positive integer** 1, 2, 3, …
+- The `INDEX` refers to the index number of the order item.
+- `INDEX` must be positive number and must not exceed the size of the order list.
+- `REMARK` is any non-empty string.
+- If the `REMARK` being added to the order item already exists, it would not be added.
+- Unlimited tags can be added, and is left up to the user's discretion.
Examples:
-* `list` followed by `delete 2` deletes the 2nd person in the address book.
-* `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command.
+* `tag 5 2 no egg`: tags the order item at INDEX 5 with the REMARK '2 no egg'.
-### Clearing all entries : `clear`
-Clears all entries from the address book.
+### Untag an order item: `untag`
+
+Clears all tags of the specified order item.
+
+Format: `untag INDEX`
+
+- The `INDEX` refers to the index number of the order item.
+- `INDEX` must be positive number and must not exceed the size of the order list.
+
+Examples:
+
+- `untag 1`: clears all tags for the order item at INDEX 1.
+
+
+### Clearing the order: `clear`
+
+Removes everything from the order.
Format: `clear`
-### Exiting the program : `exit`
+Example:
-Exits the program.
+- `clear`: clears all items on current order.
+
+
+### Undo changes to order: `undo`
+
+Undoes last change to the order. Note that it does not affect commands unrelated to order.
+
+Format: `undo`
+
+- Note that any arguments written after the `undo` command will be ignored.
+- Note that an error message will be returned to the user if there are no changes left to undo.
+
+Example:
+
+- `undo`: undoes previous command and returns order back to its previous state.
+
+
+### Calculate total: `total`
+
+Displays the total cost of the order currently.
+
+Format: `total`
+
+- Note that any arguments written after the `total` command will be ignored.
+- Note that an error message will be returned to the user if the order is empty.
+
+Example:
+
+- `total`: returns the total cost of all items from current order.
-Format: `exit`
-### Saving the data
-AddressBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
+### Profile Details: `profile`
+
+Add delivery address and phone number for submission.
+
+Format: `profile PHONE ADDRESS`
+
+- `PHONE` represents your contact number and must be a valid phone number (First digit must start with a 6/8/9 and must be exactly 8 digits long).
+
+- `ADDRESS` represents your delivery address.
+
+Examples:
+
+- `profile 92030888 25 Lower Kent Ridge Rd, Singapore 119081`: Saves your PHONE number as '92030888' and your ADDRESS as '25 Lower Kent Ridge Rd, Singapore 119081'.
+
+
+### Generate order text: `submit`
+
+Displays a copy-paste-able text of profile with order. A profile must be set up before using `submit`.
+
+Format: `submit`
+
+- Text obtained will be copied to clipboard if possible.
+- Note that an error message will be returned to the user if the order is empty.
+- Note that any arguments written after the `submit` command will be ignored.
+
+Example:
+
+- `submit`: returns a text form of the order
+
+
+### Preset supper orders: `preset`
+
+Saves or Loads a preset of the user's supper order.
+
+Format: `preset MODE [NAME]`
+
+* `MODE` dictates what the system will perform for the user's supper orders, represented by the formats:
+ * `save`: Used to save a preset. (If used without a `NAME`, will save with a default preset name of 'MyPreset')
+ * `load`: Used to load a preset. (If used without a `NAME`, will list all saved presets for the current vendor)
+ * `delete`: Used to delete a preset. (`NAME` must be specified)
+* `NAME` is the preset name which the system will save the preset as, or tries to load the given preset by the given name.
+ * if `NAME` already exists and preset is in save mode, the new preset will overwrite the existing preset.
+ * `NAME` is **case-sensitive** and supports space characters.
+ * if `NAME` does not exist and preset is in delete mode, an error message will be returned to the user.
+* Presets are split by vendors, therefore running `preset save PresetName` for two different vendors will not affect one
+another. Similar for `preset load`.
+
+Examples:
+* `preset save`: saves the user's supper order with the default preset name.
+* `preset load MyPreset`: loads the current default preset if it exists.
+* `preset save vegan`: save the user's supper order with a preset NAME of 'vegan'.
+* `preset load vegan`: loads the preset supper order with the preset NAME 'vegan'.
+* `preset delete vegan`: deletes the preset supper order with the preset NAME "vegan".
-### Archiving data files `[coming in v2.0]`
-_{explain the feature here}_
--------------------------------------------------------------------------------------------------------------------
## FAQ
-**Q**: How do I transfer my data to another Computer?
-**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous AddressBook home folder.
+**Q**: How do I transfer my data to another Computer?
+**A**: Overwrite your current data file with your old data file.
+
+**Q**: Why are some pictures missing on the menu?
+**A**: These are intended as an example of what is shown if vendors lack a picture for a menu item.
+
+**Q**: Why am I not allowed to add vendors or menu items?
+**A**: We realised that allowing users to add vendors or menu items from the command line is unfeasible, as each vendor will have many menu items, and it would be extremely time-consuming for the user. However, the user is able to manually add vendors or menu items in the json file, but the user must ensure that all details are included correctly.
+
--------------------------------------------------------------------------------------------------------------------
## Command summary
-Action | Format, Examples
+Action | Format
--------|------------------
-**Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague`
+**Help** | `help`
+**Exit** | `exit`
+**Vendor** | `vendor [INDEX]`
+**Menu** | `menu`
+**Sort** | `sort MODE [DIRECTION]`
+**Find** | `find KEYWORD [MORE_KEYWORDS]...`
+**Price** | `price INEQUALITY PRICE`
+**Add** | `add INDEX [QUANTITY]`
+**Remove** | `remove INDEX [QUANTITY]`
+**Tag** | `tag INDEX REMARK`
+**Untag** | `untag INDEX`
**Clear** | `clear`
-**Delete** | `delete INDEX`
e.g., `delete 3`
-**Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…`
e.g.,`edit 2 n/James Lee e/jameslee@example.com`
-**Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake`
-**List** | `list`
-**Help** | `help`
+**Undo** | `undo`
+**Total** | `total`
+**Profile** | `profile PHONE ADDRESS`
+**Submit** | `submit`
+**Preset** | `preset MODE [NAME]`
diff --git a/docs/_config.yml b/docs/_config.yml
index 6bd245d8f4e..7359dcae976 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -1,4 +1,4 @@
-title: "AB-3"
+title: "Supper Strikers"
theme: minima
header_pages:
@@ -8,7 +8,7 @@ header_pages:
markdown: kramdown
-repository: "se-edu/addressbook-level3"
+repository: "AY2021S1-CS2103-T16-1/tp"
github_icon: "images/github-icon.png"
plugins:
diff --git a/docs/diagrams/AddCommand.xml b/docs/diagrams/AddCommand.xml
new file mode 100644
index 00000000000..1d5dae891e0
--- /dev/null
+++ b/docs/diagrams/AddCommand.xml
@@ -0,0 +1,2 @@
+
+7VzbcqM4EP0aV+0+hBIS4vJoJ5nd2ZqpmdpUzV5ethSj2FQw8mI8cebrVxhhQDLhYm6eWT+koIFG6T5Sn+6WPUO3m8MvIdmuPzKX+jMI3MMM3c0gtADkf2PBayLQTWQlklXouUKWCR68b1QIgZDuPZfuCjdGjPmRty0KlywI6DIqyEgYspfibU/ML751S1ZUETwsia9K//DcaJ1IbWhl8l+pt1qnb9ZNJ7myIenN4j/ZrYnLXnIidD9DtyFjUXK0OdxSPzZeapfkuXclV08DC2kQ1Xlg/uJ+ef+w2M1D+Pfdb58efv/n+euN0PKV+HvxD4vBRq+pBdbRxudH+gwttswLoqNB8WKG72IJDb0NjWjIhSyM1mzFAuJ/zqQL8QIaRvRQOnL9ZA8OJMr4s+ErvyV9AAkTChDd2KngJXNJCph1zhsQCyERKFiddGeG4gfCVg3sBlW7ofkHtvKWH0nAMRG+ZcYOTGLLFrHOWASeM0lfFjGqkUQDdx5PSX4WsIALFy7ZrakrzJKzED140Z/8GGgYmOL8r/hcHN8d8ievuZMc9I6yZBDUVWa5ZGk+ULYPl7RqrqgeyVkcnzF4KgupTyLva3EY57wg3vA5nmv5OYAlj0OnqCMZv3gsvw6omjRu1KIyeaJEJFzRSFHG3Udec7eJBUHGzsk67eGEO4VTwAcj8JSexnDSNQCMVJBh6nj2mj9rj6rEkFeDKowkINRHlVHUZBkSPksg1RVgrEaAefTZ8vnoXfed5/tnIMN9+yAezQLbfSZdEN9bBfyqT5+4Uxbxcu5x3jAX4ohtGwCldKFPI/SFji6NoM39XKWpZz/bip/pgS73Ef1pBs1/9zGbWhDX5bfEt6FM+LOKB+6WD+SRM1a0COnO+0Yej5dAEQoVjn5kUcQ2J18LIipUzU4BtyLcl2O6N2ikt7Cnpx3txVdO9Zwcn11CE0mI1sVSVsEujb6oVPqyIrucuy4H6W7B2PNnEu56p5h8qkt2GZ1j6jXSlSsnmc6YdACatuTytiSTa9IAdrKPzF4NR3Pyn1oxZDj6qZ9J8Drhn4Zt5hko0Bz7dMdIDHRakGvNQKFpFTUNzUDT9XJiFPQEvhugAWgU0QeANU30dUt/dUNmrWmMb46yKk2N166yF5XQkgy1icpuMayWcbYx2bhlmw0J3O+QYyeztjsAXkZwapQ9xmfMyJHnAKhZj+2NGJqK3UhCmQVw37JiFxYxZH6jn7PIGZOkI+/eJGqi/N0ymGTajEVhkExuLRnndYMLcqQimumgYSlMjYx9DAojMjVdAyjN3BLsoQnmat1SF2hJPMByDA22ZC/qOpU2aCeTecEaOX4OYaVMIQdTtqWBvLbxy6LZbA/CZy9eY6SQa9lt0yRLLtTLmnpeY1J/XquDS5jAxXmwPM2tlnNcN8wKTX07WM2DiRpFJpQXVNRBgTz1ZHt2t6ugRhN9gvTfqrkdQ5dLO90Zrq928QTJbgqSSnpilLSPRmLFWO6XtGfF+rCsGKrZ5VvoGqWwBwobG46SsXc2JEDtv7Snl6xGjXEmt7YVTR2V9kqH3GtpD6o7JNLO+RWW7ZI52T+4pBZCf71yWKNeM37sx7o8R2C92N9bsxyeKVmgudiIXG6/Dmxh2HIyjVVbmEOWQdP16jvujyfTZCxSg3WlftKyQc41acAEp48UEWw47f44arYT40fodfYdiwwlD21bZsYgBpekTHc0C16IsjKoAw3K1Q04AONBaqWJ/z8cgNy51H3HmPvB20XXyH5Qx4i7LOrU2PcwWkGv80IdBtI2E7NtJVaZ0IqmnvNadBXdZiyXm0yjHuXsrdqE1HoA45zzU+jS8H1EN28ZsQuDYImEmKZqEHtI3mk0452Dtw0LLUNTx40JbFYRLFIKXEEo6q5SdYivKIJVll3QIJmxYceEKveRmg4mBpoOFX7bmKpgXTOdc6ovpCpdr6XGGEHwBEu9CEsHoonW/i4Nvkos0NsGX/kblIqmnoOv0azX0zdgxt7B0wtclE6VCVrCRfnCraKpb7g042pXTrKV/bpYCjewnRvlCn+F2r59eo5HTjkXraqHVi2p3RHOGt/23K3JNj7cb/w7uotCxoe1eFl7EX3YkiPVegnJtmjF+Lbn0w89oI765bJdcFo4zvF1NGQCY/xAe0On1wXvZCFzDM0uLx+bAGqGmVWP7WHXtWa7SKcLr8m0GVrvncA6x4lUex26zISbVQf+h4Oa9RiaY8mIcDSz5eIR61NA0Vn6w0+zHzVKbs9+Ggrd/wc=
diff --git a/docs/diagrams/AddCommandSequenceDiagram.puml b/docs/diagrams/AddCommandSequenceDiagram.puml
new file mode 100644
index 00000000000..94473566fdf
--- /dev/null
+++ b/docs/diagrams/AddCommandSequenceDiagram.puml
@@ -0,0 +1,68 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":SupperStrikersParser" as SupperStrikersParser LOGIC_COLOR
+participant ":AddCommandParser" as AddCommandParser LOGIC_COLOR
+participant "s:AddCommand" as AddCommand LOGIC_COLOR
+end box
+
+
+box Model MODEL_COLOR_T1
+participant ":Model" as Model MODEL_COLOR
+participant "o:OrderItem" as OrderItem MODEL_COLOR
+end box
+
+[-> LogicManager : execute("add 2 3")
+activate LogicManager
+
+LogicManager -> SupperStrikersParser : parseCommand("add 2 3")
+activate SupperStrikersParser
+
+create AddCommandParser
+SupperStrikersParser -> AddCommandParser
+activate AddCommandParser
+
+AddCommandParser --> SupperStrikersParser
+deactivate AddCommandParser
+
+SupperStrikersParser -> AddCommandParser : parse("2 3")
+activate AddCommandParser
+
+create AddCommand
+AddCommandParser -> AddCommand
+activate AddCommand
+AddCommand --> AddCommandParser : s
+deactivate AddCommand
+
+AddCommandParser --> SupperStrikersParser : s
+deactivate AddCommandParser
+AddCommandParser -[hidden]-> SupperStrikersParser
+destroy AddCommandParser
+
+SupperStrikersParser --> LogicManager : s
+deactivate SupperStrikersParser
+
+LogicManager -> AddCommand : execute()
+activate AddCommand
+
+AddCommand -> Model : getFilteredMenuItemList()
+
+create OrderItem
+AddCommand -> OrderItem
+activate OrderItem
+
+OrderItem --> AddCommand
+deactivate OrderItem
+
+AddCommand -> Model: addOrderItem(o)
+
+AddCommand -> LogicManager
+deactivate AddCommand
+
+[<-- LogicManager
+deactivate LogicManager
+
+
+@enduml
diff --git a/docs/diagrams/ArchitectureSequenceDiagram.puml b/docs/diagrams/ArchitectureSequenceDiagram.puml
index ef81d18c337..553baf0cfae 100644
--- a/docs/diagrams/ArchitectureSequenceDiagram.puml
+++ b/docs/diagrams/ArchitectureSequenceDiagram.puml
@@ -19,7 +19,7 @@ activate model MODEL_COLOR
model -[MODEL_COLOR]-> logic
deactivate model
-logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook)
+logic -[LOGIC_COLOR]> storage : saveAddressBook(vendorManager)
activate storage STORAGE_COLOR
storage -[STORAGE_COLOR]> storage : Save to file
diff --git a/docs/diagrams/ClearCommandSequenceDiagram.puml b/docs/diagrams/ClearCommandSequenceDiagram.puml
new file mode 100644
index 00000000000..cf659a7760d
--- /dev/null
+++ b/docs/diagrams/ClearCommandSequenceDiagram.puml
@@ -0,0 +1,49 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":SupperStrikersParser" as SupperStrikersParser LOGIC_COLOR
+participant "s:ClearCommand" as ClearCommand LOGIC_COLOR
+end box
+
+
+box Model MODEL_COLOR_T1
+participant ":Model" as Model MODEL_COLOR
+end box
+
+[-> LogicManager : execute("clear")
+activate LogicManager
+
+
+LogicManager -> SupperStrikersParser : parseCommand("clear")
+activate SupperStrikersParser
+
+create ClearCommand
+SupperStrikersParser -> ClearCommand
+activate ClearCommand
+
+
+ClearCommand --> SupperStrikersParser
+deactivate ClearCommand
+
+SupperStrikersParser --> LogicManager
+deactivate SupperStrikersParser
+
+LogicManager -> ClearCommand: execute()
+activate ClearCommand
+
+ClearCommand -> Model: getOrderSize()
+
+ClearCommand -> Model: clearOrder()
+
+ClearCommand --> LogicManager
+deactivate ClearCommand
+
+
+[<-- LogicManager
+deactivate LogicManager
+
+destroy ClearCommand
+
+@enduml
diff --git a/docs/diagrams/DeletePresetSequenceDiagram.puml b/docs/diagrams/DeletePresetSequenceDiagram.puml
new file mode 100644
index 00000000000..8bf14593b54
--- /dev/null
+++ b/docs/diagrams/DeletePresetSequenceDiagram.puml
@@ -0,0 +1,75 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":SupperStrikersParser" as SupperStrikersParser LOGIC_COLOR
+participant ":PresetCommandParser" as PresetCommandParser LOGIC_COLOR
+participant "d:DeletePresetCommand" as DeletePresetCommand LOGIC_COLOR
+participant "r:CommandResult" as CommandResult LOGIC_COLOR
+end box
+
+
+box Storage STORAGE_COLOR_T1
+participant ":Storage" as Storage STORAGE_COLOR
+end box
+
+[-> LogicManager : execute("preset delete sample")
+activate LogicManager
+
+LogicManager -> SupperStrikersParser : parseCommand("preset delete sample")
+activate SupperStrikersParser
+
+create PresetCommandParser
+SupperStrikersParser -> PresetCommandParser
+activate PresetCommandParser
+
+PresetCommandParser --> SupperStrikersParser
+deactivate PresetCommandParser
+
+SupperStrikersParser -> PresetCommandParser : parse("delete sample")
+activate PresetCommandParser
+
+create DeletePresetCommand
+PresetCommandParser -> DeletePresetCommand
+activate DeletePresetCommand
+
+DeletePresetCommand --> PresetCommandParser : d
+deactivate DeletePresetCommand
+
+PresetCommandParser --> SupperStrikersParser : d
+deactivate PresetCommandParser
+'Hidden arrow to position the destroy marker below the end of the activation bar.
+PresetCommandParser -[hidden]-> SupperStrikersParser
+destroy PresetCommandParser
+
+SupperStrikersParser --> LogicManager : d
+deactivate SupperStrikersParser
+
+LogicManager -> DeletePresetCommand : execute()
+activate DeletePresetCommand
+
+DeletePresetCommand -> Storage : readPresetManager()
+activate Storage
+Storage --> DeletePresetCommand: allLists
+deactivate Storage
+
+
+DeletePresetCommand -> Storage : savePresetManager(allLists)
+activate Storage
+Storage --> DeletePresetCommand
+deactivate Storage
+|||
+create CommandResult
+DeletePresetCommand -> CommandResult
+activate CommandResult
+
+CommandResult --> DeletePresetCommand : r
+deactivate CommandResult
+
+DeletePresetCommand --> LogicManager : r
+deactivate DeletePresetCommand
+
+[<--LogicManager
+deactivate LogicManager
+@enduml
diff --git a/docs/diagrams/DeleteSequenceDiagram.puml b/docs/diagrams/DeleteSequenceDiagram.puml
index 1dc2311b245..0c834ed8b1f 100644
--- a/docs/diagrams/DeleteSequenceDiagram.puml
+++ b/docs/diagrams/DeleteSequenceDiagram.puml
@@ -3,66 +3,66 @@
box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
-participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
-participant ":DeleteCommandParser" as DeleteCommandParser LOGIC_COLOR
-participant "d:DeleteCommand" as DeleteCommand LOGIC_COLOR
-participant ":CommandResult" as CommandResult LOGIC_COLOR
+participant ":SupperStrikersParser" as SupperStrikersParser LOGIC_COLOR
+participant ":RemoveCommandParser" as RemoveCommandParser LOGIC_COLOR
+participant "d:RemoveCommand" as RemoveCommand LOGIC_COLOR
+participant "r:CommandResult" as CommandResult LOGIC_COLOR
end box
box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
end box
-[-> LogicManager : execute("delete 1")
+[-> LogicManager : execute("remove 1")
activate LogicManager
-LogicManager -> AddressBookParser : parseCommand("delete 1")
-activate AddressBookParser
+LogicManager -> SupperStrikersParser : parseCommand("remove 1")
+activate SupperStrikersParser
-create DeleteCommandParser
-AddressBookParser -> DeleteCommandParser
-activate DeleteCommandParser
+create RemoveCommandParser
+SupperStrikersParser -> RemoveCommandParser
+activate RemoveCommandParser
-DeleteCommandParser --> AddressBookParser
-deactivate DeleteCommandParser
+RemoveCommandParser --> SupperStrikersParser
+deactivate RemoveCommandParser
-AddressBookParser -> DeleteCommandParser : parse("1")
-activate DeleteCommandParser
+SupperStrikersParser -> RemoveCommandParser : parse("1")
+activate RemoveCommandParser
-create DeleteCommand
-DeleteCommandParser -> DeleteCommand
-activate DeleteCommand
+create RemoveCommand
+RemoveCommandParser -> RemoveCommand
+activate RemoveCommand
-DeleteCommand --> DeleteCommandParser : d
-deactivate DeleteCommand
+RemoveCommand --> RemoveCommandParser : d
+deactivate RemoveCommand
-DeleteCommandParser --> AddressBookParser : d
-deactivate DeleteCommandParser
+RemoveCommandParser --> SupperStrikersParser : d
+deactivate RemoveCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
-DeleteCommandParser -[hidden]-> AddressBookParser
-destroy DeleteCommandParser
+RemoveCommandParser -[hidden]-> SupperStrikersParser
+destroy RemoveCommandParser
-AddressBookParser --> LogicManager : d
-deactivate AddressBookParser
+SupperStrikersParser --> LogicManager : d
+deactivate SupperStrikersParser
-LogicManager -> DeleteCommand : execute()
-activate DeleteCommand
+LogicManager -> RemoveCommand : execute()
+activate RemoveCommand
-DeleteCommand -> Model : deletePerson(1)
+RemoveCommand -> Model : removeOrderItem(1)
activate Model
-Model --> DeleteCommand
+Model --> RemoveCommand
deactivate Model
create CommandResult
-DeleteCommand -> CommandResult
+RemoveCommand -> CommandResult
activate CommandResult
-CommandResult --> DeleteCommand
+CommandResult --> RemoveCommand : r
deactivate CommandResult
-DeleteCommand --> LogicManager : result
-deactivate DeleteCommand
+RemoveCommand --> LogicManager : r
+deactivate RemoveCommand
[<--LogicManager
deactivate LogicManager
diff --git a/docs/diagrams/FindCommandSequenceDiagram.puml b/docs/diagrams/FindCommandSequenceDiagram.puml
new file mode 100644
index 00000000000..03d6cbdcf76
--- /dev/null
+++ b/docs/diagrams/FindCommandSequenceDiagram.puml
@@ -0,0 +1,66 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":SupperStrikersParser" as SupperStrikersParser LOGIC_COLOR
+participant ":FindCommandParser" as FindCommandParser LOGIC_COLOR
+participant "f:FindCommand" as FindCommand LOGIC_COLOR
+participant "r:CommandResult" as CommandResult LOGIC_COLOR
+end box
+
+
+box Model MODEL_COLOR_T1
+participant ":Model" as Model MODEL_COLOR
+end box
+
+[-> LogicManager : execute("find Milo")
+activate LogicManager
+
+LogicManager -> SupperStrikersParser : parseCommand("find Milo")
+activate SupperStrikersParser
+
+create FindCommandParser
+SupperStrikersParser -> FindCommandParser
+activate FindCommandParser
+
+FindCommandParser --> SupperStrikersParser
+deactivate FindCommandParser
+
+SupperStrikersParser -> FindCommandParser : parse("Milo")
+activate FindCommandParser
+
+create FindCommand
+FindCommandParser -> FindCommand
+activate FindCommand
+FindCommand --> FindCommandParser : f
+deactivate FindCommand
+
+FindCommandParser --> SupperStrikersParser : f
+deactivate FindCommandParser
+FindCommandParser -[hidden]-> SupperStrikersParser
+destroy FindCommandParser
+
+SupperStrikersParser --> LogicManager : f
+deactivate SupperStrikersParser
+
+LogicManager -> FindCommand : execute()
+activate FindCommand
+
+FindCommand -> Model : updateFilteredMenuItemList()
+activate Model
+Model --> FindCommand
+deactivate Model
+
+create CommandResult
+FindCommand -> CommandResult
+activate CommandResult
+
+CommandResult --> FindCommand : r
+deactivate CommandResult
+
+FindCommand --> LogicManager: r
+deactivate FindCommand
+[<--LogicManager
+deactivate LogicManager
+@enduml
diff --git a/docs/diagrams/LoadPresetCommandActivityDiagram.puml b/docs/diagrams/LoadPresetCommandActivityDiagram.puml
new file mode 100644
index 00000000000..fa25598e017
--- /dev/null
+++ b/docs/diagrams/LoadPresetCommandActivityDiagram.puml
@@ -0,0 +1,25 @@
+@startuml
+start
+:User executes LoadPresetCommand;
+
+'Since the beta syntax does not support placing the condition outside the
+'diamond we place it as the true branch instead.
+
+if () then ([Vendor has been selected])
+:Current presets are read from storage;
+if () then([preset name exists])
+:Preset with the same name is
+loaded into the current order;
+else ([else])
+:Supper Strikers throws a CommandException
+informing user that the preset does not exist;
+:Error message is displayed to user;
+endif
+
+else ([else])
+:Supper Strikers throws a CommandException
+informing user that no vendor has been selected;
+:Error message is displayed to user;
+endif
+stop
+@enduml
diff --git a/docs/diagrams/LoadPresetSequenceDiagram.puml b/docs/diagrams/LoadPresetSequenceDiagram.puml
new file mode 100644
index 00000000000..a2c5e6d2053
--- /dev/null
+++ b/docs/diagrams/LoadPresetSequenceDiagram.puml
@@ -0,0 +1,79 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":SupperStrikersParser" as SupperStrikersParser LOGIC_COLOR
+participant ":PresetCommandParser" as PresetCommandParser LOGIC_COLOR
+participant "d:LoadPresetCommand" as LoadPresetCommand LOGIC_COLOR
+participant ":CommandResult" as CommandResult LOGIC_COLOR
+end box
+
+
+box Storage STORAGE_COLOR_T1
+participant ":Storage" as Storage STORAGE_COLOR
+end box
+
+box Model MODEL_COLOR_T1
+participant ":Model" as Model MODEL_COLOR
+end box
+
+[-> LogicManager : execute("preset load sample")
+activate LogicManager
+
+LogicManager -> SupperStrikersParser : parseCommand("preset load sample")
+activate SupperStrikersParser
+
+create PresetCommandParser
+SupperStrikersParser -> PresetCommandParser
+activate PresetCommandParser
+
+PresetCommandParser --> SupperStrikersParser
+deactivate PresetCommandParser
+
+SupperStrikersParser -> PresetCommandParser : parse("load sample")
+activate PresetCommandParser
+
+create LoadPresetCommand
+PresetCommandParser -> LoadPresetCommand
+activate LoadPresetCommand
+
+LoadPresetCommand --> PresetCommandParser : d
+deactivate LoadPresetCommand
+
+PresetCommandParser --> SupperStrikersParser : d
+deactivate PresetCommandParser
+'Hidden arrow to position the destroy marker below the end of the activation bar.
+PresetCommandParser -[hidden]-> SupperStrikersParser
+destroy PresetCommandParser
+
+SupperStrikersParser --> LogicManager : d
+deactivate SupperStrikersParser
+
+LogicManager -> LoadPresetCommand : execute()
+activate LoadPresetCommand
+
+LoadPresetCommand -> Storage : readPresetManager()
+activate Storage
+Storage --> LoadPresetCommand: allLists
+deactivate Storage
+|||
+
+LoadPresetCommand -> Model: setOrder(orderItems)
+activate Model
+Model --> LoadPresetCommand
+deactivate Model
+|||
+create CommandResult
+LoadPresetCommand -> CommandResult
+activate CommandResult
+
+CommandResult --> LoadPresetCommand
+deactivate CommandResult
+
+LoadPresetCommand --> LogicManager : result
+deactivate LoadPresetCommand
+
+[<--LogicManager
+deactivate LogicManager
+@enduml
diff --git a/docs/diagrams/LogicClassDiagram.puml b/docs/diagrams/LogicClassDiagram.puml
index 016ef33e2e2..0dbc4b12267 100644
--- a/docs/diagrams/LogicClassDiagram.puml
+++ b/docs/diagrams/LogicClassDiagram.puml
@@ -8,13 +8,9 @@ package Logic {
package Parser {
Interface Parser <>
-Class AddressBookParser
+Class SupperStrikersParser
Class XYZCommandParser
-Class CliSyntax
-Class ParserUtil
-Class ArgumentMultimap
-Class ArgumentTokenizer
-Class Prefix
+
}
package Command {
@@ -31,29 +27,27 @@ package Model{
Class HiddenModel #FFFFFF
}
+package Storage {
+Class HiddenStorage #FFFFFF
+}
+
Class HiddenOutside #FFFFFF
HiddenOutside ..> Logic
LogicManager .up.|> Logic
-LogicManager -->"1" AddressBookParser
-AddressBookParser .left.> XYZCommandParser: creates >
+LogicManager -->"1" SupperStrikersParser
+SupperStrikersParser ..> XYZCommandParser: creates >
+SupperStrikersParser ..> XYZCommand: creates >
XYZCommandParser ..> XYZCommand : creates >
XYZCommandParser ..|> Parser
-XYZCommandParser ..> ArgumentMultimap
-XYZCommandParser ..> ArgumentTokenizer
-ArgumentTokenizer .left.> ArgumentMultimap
-XYZCommandParser ..> CliSyntax
-CliSyntax ..> Prefix
-XYZCommandParser ..> ParserUtil
-ParserUtil .down.> Prefix
-ArgumentTokenizer .down.> Prefix
XYZCommand -up-|> Command
LogicManager .left.> Command : executes >
LogicManager --> Model
-Command .right.> Model
-note right of XYZCommand: XYZCommand = AddCommand, \nFindCommand, etc
+Command .up.> Model
+Command .right.> Storage
+note right of XYZCommand: XYZCommand = AddCommand, \nSortCommand, etc
Logic ..> CommandResult
LogicManager .down.> CommandResult
diff --git a/docs/diagrams/MenuCommandSequenceDiagram.puml b/docs/diagrams/MenuCommandSequenceDiagram.puml
new file mode 100644
index 00000000000..b942dce9e50
--- /dev/null
+++ b/docs/diagrams/MenuCommandSequenceDiagram.puml
@@ -0,0 +1,52 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":SupperStrikersParser" as SupperStrikersParser LOGIC_COLOR
+participant "m:MenuCommand" as MenuCommand LOGIC_COLOR
+participant ":CommandResult" as CommandResult LOGIC_COLOR
+end box
+
+
+box Model MODEL_COLOR_T1
+participant ":Model" as Model MODEL_COLOR
+end box
+
+[-> LogicManager : execute("menu")
+activate LogicManager
+
+LogicManager -> SupperStrikersParser : parseCommand("menu")
+activate SupperStrikersParser
+
+create MenuCommand
+SupperStrikersParser -> MenuCommand
+activate MenuCommand
+
+MenuCommand --> SupperStrikersParser : m
+deactivate MenuCommand
+
+SupperStrikersParser --> LogicManager : m
+deactivate SupperStrikersParser
+
+LogicManager -> MenuCommand : execute()
+activate MenuCommand
+
+MenuCommand -> Model : showDefaultMenu()
+activate Model
+Model --> MenuCommand
+deactivate Model
+
+create CommandResult
+MenuCommand -> CommandResult
+activate CommandResult
+
+CommandResult --> MenuCommand
+deactivate CommandResult
+
+MenuCommand --> LogicManager: result
+deactivate MenuCommand
+
+[<--LogicManager
+deactivate LogicManager
+@enduml
diff --git a/docs/diagrams/ModelClassDiagram.puml b/docs/diagrams/ModelClassDiagram.puml
index e85a00d4107..006163994fa 100644
--- a/docs/diagrams/ModelClassDiagram.puml
+++ b/docs/diagrams/ModelClassDiagram.puml
@@ -5,52 +5,83 @@ skinparam arrowColor MODEL_COLOR
skinparam classBackgroundColor MODEL_COLOR
Package Model <>{
-Interface ReadOnlyAddressBook <>
+Interface ReadOnlyVendorManager <>
Interface Model <>
Interface ObservableList <>
-Class AddressBook
-Class ReadOnlyAddressBook
+Class VendorManager
+Class ReadOnlyVendorManager <>
Class Model
Class ModelManager
+Class MenuManager
+Class ReadOnlyMenuManager <>
+Class ReadOnlyOrderManager <>
+Class OrderManager
Class UserPrefs
-Class ReadOnlyUserPrefs
+Class ReadOnlyUserPrefs <>
-Package Person {
-Class Person
+Package Vendor {
+Class Vendor
Class Address
Class Email
Class Name
Class Phone
-Class UniquePersonList
+Class UniqueVendorList
}
Package Tag {
Class Tag
}
+
+Package Food {
+Abstract Class Food
+Class Order
+Class Menu
+Class MenuItem
+Class OrderItem
+}
+
}
Class HiddenOutside #FFFFFF
HiddenOutside ..> Model
-AddressBook .up.|> ReadOnlyAddressBook
+VendorManager .up.|> ReadOnlyVendorManager
ModelManager .up.|> Model
-Model .right.> ObservableList
-ModelManager o--> "1" AddressBook
+ModelManager o--> "1" VendorManager
+ModelManager o--> "1" OrderManager
+ModelManager o--> "*" MenuManager
ModelManager o-left-> "1" UserPrefs
UserPrefs .up.|> ReadOnlyUserPrefs
-AddressBook *--> "1" UniquePersonList
-UniquePersonList o--> "*" Person
-Person *--> Name
-Person *--> Phone
-Person *--> Email
-Person *--> Address
-Person *--> "*" Tag
+VendorManager *--> "1" UniqueVendorList
+UniqueVendorList o--> "*" Vendor
+UniqueVendorList .up.|> ObservableList
+
+MenuManager .up.|> ReadOnlyMenuManager
+MenuManager *--> "1" Menu
+Menu .up.|> ObservableList
+Menu o--> "*" MenuItem
+MenuItem -up-> Food
+MenuItem *--> "*" Tag
+
+OrderManager *--> Order
+OrderManager .up.|> ReadOnlyOrderManager
+Order .up.|> ObservableList
+Order o--> "*" OrderItem
+OrderItem -up-> Food
+OrderItem *--> "*" Tag
+
+Vendor *--> Name
+Vendor *--> Phone
+Vendor *--> Email
+Vendor *--> Address
+Vendor *--> "*" Tag
+OrderManager -[hidden]left-> ReadOnlyMenuManager
+Order -[hidden]right-> MenuItem
Name -[hidden]right-> Phone
Phone -[hidden]right-> Address
Address -[hidden]right-> Email
-ModelManager -->"1" Person : filtered list
@enduml
diff --git a/docs/diagrams/RemoveCommandSequenceDiagram.puml b/docs/diagrams/RemoveCommandSequenceDiagram.puml
new file mode 100644
index 00000000000..f753765c18c
--- /dev/null
+++ b/docs/diagrams/RemoveCommandSequenceDiagram.puml
@@ -0,0 +1,68 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":SupperStrikersParser" as SupperStrikersParser LOGIC_COLOR
+participant ":RemoveCommandParser" as RemoveCommandParser LOGIC_COLOR
+participant "s:RemoveCommand" as RemoveCommand LOGIC_COLOR
+end box
+
+
+box Model MODEL_COLOR_T1
+participant ":Model" as Model MODEL_COLOR
+participant "o:OrderItem" as OrderItem MODEL_COLOR
+end box
+
+[-> LogicManager : execute("remove 1 1")
+activate LogicManager
+
+LogicManager -> SupperStrikersParser : parseCommand("remove 1 1")
+activate SupperStrikersParser
+
+create RemoveCommandParser
+SupperStrikersParser -> RemoveCommandParser
+activate RemoveCommandParser
+
+RemoveCommandParser --> SupperStrikersParser
+deactivate RemoveCommandParser
+
+SupperStrikersParser -> RemoveCommandParser : parse("1 1")
+activate RemoveCommandParser
+
+create RemoveCommand
+RemoveCommandParser -> RemoveCommand
+activate RemoveCommand
+RemoveCommand --> RemoveCommandParser : s
+deactivate RemoveCommand
+
+RemoveCommandParser --> SupperStrikersParser : s
+deactivate RemoveCommandParser
+RemoveCommandParser -[hidden]-> SupperStrikersParser
+destroy RemoveCommandParser
+
+SupperStrikersParser --> LogicManager : s
+deactivate SupperStrikersParser
+
+LogicManager -> RemoveCommand : execute()
+activate RemoveCommand
+
+RemoveCommand -> Model : getFilteredOrderItemList()
+
+create OrderItem
+RemoveCommand -> OrderItem
+activate OrderItem
+
+OrderItem --> RemoveCommand
+deactivate OrderItem
+
+RemoveCommand -> Model: removeOrderItem(o)
+
+RemoveCommand -> LogicManager
+deactivate RemoveCommand
+
+[<-- LogicManager
+deactivate LogicManager
+
+
+@enduml
diff --git a/docs/diagrams/SavePresetCommandActivityDiagram.puml b/docs/diagrams/SavePresetCommandActivityDiagram.puml
new file mode 100644
index 00000000000..b47ff462a4f
--- /dev/null
+++ b/docs/diagrams/SavePresetCommandActivityDiagram.puml
@@ -0,0 +1,32 @@
+@startuml
+start
+:User executes SavePresetCommand;
+
+'Since the beta syntax does not support placing the condition outside the
+'diamond we place it as the true branch instead.
+
+if () then ([Vendor has been selected])
+
+if () then([Order is not empty])
+:Current presets are read from storage;
+:New Preset is created from current order;
+if () then([Preset Name already exists])
+:Current preset with the same name
+is overwritten by the new preset;
+else ([else])
+:New preset is added to the list of current presets;
+endif
+:List of presets is saved to storage;
+else ([else])
+:Supper Strikers throws a CommandException
+informing user that the order must not be empty;
+:Error message is displayed to user;
+endif
+
+else ([else])
+:Supper Strikers throws a CommandException
+informing user that no vendor has been selected;
+:Error message is displayed to user;
+endif
+stop
+@enduml
diff --git a/docs/diagrams/SavePresetSequenceDiagram.puml b/docs/diagrams/SavePresetSequenceDiagram.puml
new file mode 100644
index 00000000000..21848116f3f
--- /dev/null
+++ b/docs/diagrams/SavePresetSequenceDiagram.puml
@@ -0,0 +1,84 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":SupperStrikersParser" as SupperStrikersParser LOGIC_COLOR
+participant ":PresetCommandParser" as PresetCommandParser LOGIC_COLOR
+participant "d:SavePresetCommand" as SavePresetCommand LOGIC_COLOR
+participant ":CommandResult" as CommandResult LOGIC_COLOR
+end box
+
+
+box Storage STORAGE_COLOR_T1
+participant ":Storage" as Storage STORAGE_COLOR
+end box
+
+box Model MODEL_COLOR_T1
+participant ":Model" as Model MODEL_COLOR
+end box
+
+[-> LogicManager : execute("preset Save sample")
+activate LogicManager
+
+LogicManager -> SupperStrikersParser : parseCommand("preset Save sample")
+activate SupperStrikersParser
+
+create PresetCommandParser
+SupperStrikersParser -> PresetCommandParser
+activate PresetCommandParser
+
+PresetCommandParser --> SupperStrikersParser
+deactivate PresetCommandParser
+
+SupperStrikersParser -> PresetCommandParser : parse("Save sample")
+activate PresetCommandParser
+
+create SavePresetCommand
+PresetCommandParser -> SavePresetCommand
+activate SavePresetCommand
+
+SavePresetCommand --> PresetCommandParser : d
+deactivate SavePresetCommand
+
+PresetCommandParser --> SupperStrikersParser : d
+deactivate PresetCommandParser
+'Hidden arrow to position the destroy marker below the end of the activation bar.
+PresetCommandParser -[hidden]-> SupperStrikersParser
+destroy PresetCommandParser
+
+SupperStrikersParser --> LogicManager : d
+deactivate SupperStrikersParser
+
+LogicManager -> SavePresetCommand : execute()
+activate SavePresetCommand
+
+SavePresetCommand -> Storage : readPresetManager()
+activate Storage
+Storage --> SavePresetCommand: allLists
+deactivate Storage
+
+SavePresetCommand -> Model : getObservableOrderItemList()
+activate Model
+Model --> SavePresetCommand: orderItemList
+deactivate Model
+
+
+SavePresetCommand -> Storage : savePresetManager(allLists)
+activate Storage
+Storage --> SavePresetCommand
+deactivate Storage
+|||
+create CommandResult
+SavePresetCommand -> CommandResult
+activate CommandResult
+
+CommandResult --> SavePresetCommand
+deactivate CommandResult
+
+SavePresetCommand --> LogicManager : result
+deactivate SavePresetCommand
+
+[<--LogicManager
+deactivate LogicManager
+@enduml
diff --git a/docs/diagrams/SortCommandSequenceDiagram.puml b/docs/diagrams/SortCommandSequenceDiagram.puml
new file mode 100644
index 00000000000..05e73789eff
--- /dev/null
+++ b/docs/diagrams/SortCommandSequenceDiagram.puml
@@ -0,0 +1,66 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":SupperStrikersParser" as SupperStrikersParser LOGIC_COLOR
+participant ":SortCommandParser" as SortCommandParser LOGIC_COLOR
+participant "s:SortCommand" as SortCommand LOGIC_COLOR
+participant "r:CommandResult" as CommandResult LOGIC_COLOR
+end box
+
+
+box Model MODEL_COLOR_T1
+participant ":Model" as Model MODEL_COLOR
+end box
+
+[-> LogicManager : execute("sort n a")
+activate LogicManager
+
+LogicManager -> SupperStrikersParser : parseCommand("sort n a")
+activate SupperStrikersParser
+
+create SortCommandParser
+SupperStrikersParser -> SortCommandParser
+activate SortCommandParser
+
+SortCommandParser --> SupperStrikersParser
+deactivate SortCommandParser
+
+SupperStrikersParser -> SortCommandParser : parse("n a")
+activate SortCommandParser
+
+create SortCommand
+SortCommandParser -> SortCommand
+activate SortCommand
+SortCommand --> SortCommandParser : s
+deactivate SortCommand
+
+SortCommandParser --> SupperStrikersParser : s
+deactivate SortCommandParser
+SortCommandParser -[hidden]-> SupperStrikersParser
+destroy SortCommandParser
+
+SupperStrikersParser --> LogicManager : s
+deactivate SupperStrikersParser
+
+LogicManager -> SortCommand : execute()
+activate SortCommand
+
+SortCommand -> Model : sortMenuItemBy()
+activate Model
+Model --> SortCommand
+deactivate Model
+
+create CommandResult
+SortCommand -> CommandResult
+activate CommandResult
+
+CommandResult --> SortCommand : r
+deactivate CommandResult
+
+SortCommand --> LogicManager: r
+deactivate SortCommand
+[<--LogicManager
+deactivate LogicManager
+@enduml
diff --git a/docs/diagrams/StorageClassDiagram.puml b/docs/diagrams/StorageClassDiagram.puml
index 6adb2e156bf..4575bd7c60a 100644
--- a/docs/diagrams/StorageClassDiagram.puml
+++ b/docs/diagrams/StorageClassDiagram.puml
@@ -6,19 +6,33 @@ skinparam classBackgroundColor STORAGE_COLOR
Interface Storage <>
Interface UserPrefsStorage <>
-Interface AddressBookStorage <>
+Interface VendorManagerStorage <>
+Interface PresetManagerStorage <>
+Interface ProfileManagerStorage <>
Class StorageManager
Class JsonUserPrefsStorage
-Class JsonAddressBookStorage
+Class JsonVendorManagerStorage
+Class JsonPresetManagerStorage
+class JsonProfileManagerStorage
StorageManager .left.|> Storage
StorageManager o-right-> UserPrefsStorage
-StorageManager o--> AddressBookStorage
+StorageManager o--> VendorManagerStorage
+StorageManager o--> PresetManagerStorage
+StorageManager o--> ProfileManagerStorage
JsonUserPrefsStorage .left.|> UserPrefsStorage
-JsonAddressBookStorage .left.|> AddressBookStorage
-JsonAddressBookStorage .down.> JsonSerializableAddressBookStorage
-JsonSerializableAddressBookStorage .right.> JsonSerializablePerson
-JsonSerializablePerson .right.> JsonAdaptedTag
+JsonVendorManagerStorage .left.|> VendorManagerStorage
+JsonPresetManagerStorage .up.|> PresetManagerStorage
+JsonProfileManagerStorage .up.|> ProfileManagerStorage
+JsonVendorManagerStorage .down.> JsonSerializableVendorManager
+JsonSerializableVendorManager .down.> JsonAdaptedVendor
+JsonAdaptedVendor .down.> JsonAdaptedTag
+JsonPresetManagerStorage .down.> JsonSerializablePresetManager
+JsonPresetManagerStorage .down.> JsonAdaptedPreset
+JsonAdaptedPreset .down.> JsonAdaptedOrderItem
+JsonAdaptedOrderItem .right.> JsonAdaptedTag
+JsonProfileManagerStorage .down.> JsonAdaptedProfile
+JsonProfileManagerStorage .down.> JsonSerializableProfileManager
@enduml
diff --git a/docs/diagrams/SwitchVendorCommandActivityDiagram.puml b/docs/diagrams/SwitchVendorCommandActivityDiagram.puml
new file mode 100644
index 00000000000..b45111a8b65
--- /dev/null
+++ b/docs/diagrams/SwitchVendorCommandActivityDiagram.puml
@@ -0,0 +1,24 @@
+@startuml
+start
+:User executes SwitchVendorCommand;
+
+'Since the beta syntax does not support placing the condition outside the
+'diamond we place it as the true branch instead.
+
+if () then ([Vendor Index is valid])
+ :Supper Strikers selects vendor
+ corresponding to the index;
+ :Vendor window will be hidden
+ and replaced with corresponding
+ Menu window;
+ if() then([index is different from current index])
+ :Current order is cleared;
+ else ([else])
+ endif
+else ([else])
+:Supper Strikers throws a CommandException
+informing user that index provided is invalid;
+:Error message is displayed to user;
+endif
+stop
+@enduml
diff --git a/docs/diagrams/TagCommandActivityDiagram.puml b/docs/diagrams/TagCommandActivityDiagram.puml
new file mode 100644
index 00000000000..1d6d2ad05f7
--- /dev/null
+++ b/docs/diagrams/TagCommandActivityDiagram.puml
@@ -0,0 +1,69 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":SupperStrikersParser" as SupperStrikersParser LOGIC_COLOR
+participant ":TagCommandParser" as TagCommandParser LOGIC_COLOR
+participant "t:TagCommand" as TagCommand LOGIC_COLOR
+participant ":CommandResult" as CommandResult LOGIC_COLOR
+end box
+
+box Model MODEL_COLOR_T1
+participant ":Model" as Model MODEL_COLOR
+end box
+
+[-> LogicManager : execute("tag 1 all no ice")
+activate LogicManager
+
+LogicManager -> SupperStrikersParser : parseCommand("tag 1 all no ice")
+activate SupperStrikersParser
+
+create TagCommandParser
+SupperStrikersParser -> TagCommandParser
+activate TagCommandParser
+
+TagCommandParser --> SupperStrikersParser
+deactivate TagCommandParser
+
+SupperStrikersParser -> TagCommandParser : parse("1", "all no ice")
+activate TagCommandParser
+
+create TagCommand
+TagCommandParser -> TagCommand
+activate TagCommand
+
+TagCommand --> TagCommandParser : t
+deactivate TagCommand
+
+TagCommandParser --> SupperStrikersParser : t
+deactivate TagCommandParser
+'Hidden arrow to position the destroy marker below the end of the activation bar.
+TagCommandParser -[hidden]-> SupperStrikersParser
+destroy TagCommandParser
+
+SupperStrikersParser --> LogicManager : t
+deactivate SupperStrikersParser
+
+LogicManager -> TagCommand : execute()
+activate TagCommand
+
+TagCommand -> Model : TagOrderItem(1, "all no ice")
+activate Model
+
+Model --> TagCommand
+deactivate Model
+
+create CommandResult
+TagCommand -> CommandResult
+activate CommandResult
+
+CommandResult --> TagCommand
+deactivate CommandResult
+
+TagCommand --> LogicManager : result
+deactivate TagCommand
+
+[<--LogicManager
+deactivate LogicManager
+@enduml
diff --git a/docs/diagrams/UiClassDiagram.puml b/docs/diagrams/UiClassDiagram.puml
index 92746f9fcf7..9e426430a84 100644
--- a/docs/diagrams/UiClassDiagram.puml
+++ b/docs/diagrams/UiClassDiagram.puml
@@ -11,9 +11,12 @@ Class UiManager
Class MainWindow
Class HelpWindow
Class ResultDisplay
-Class PersonListPanel
-Class PersonCard
-Class StatusBarFooter
+Class VendorListPanel
+Class VendorCard
+Class FoodListPanel
+Class FoodCard
+Class OrderListPanel
+Class OrderCard
Class CommandBox
}
@@ -33,28 +36,33 @@ UiManager -down-> MainWindow
MainWindow --> HelpWindow
MainWindow *-down-> CommandBox
MainWindow *-down-> ResultDisplay
-MainWindow *-down-> PersonListPanel
-MainWindow *-down-> StatusBarFooter
+MainWindow *-down-> VendorListPanel
+MainWindow *-down-> FoodListPanel
+MainWindow *-down-> OrderListPanel
-PersonListPanel -down-> PersonCard
+VendorListPanel -down-> VendorCard
+FoodListPanel -down-> FoodCard
+OrderListPanel -down-> OrderCard
MainWindow -left-|> UiPart
ResultDisplay --|> UiPart
CommandBox --|> UiPart
-PersonListPanel --|> UiPart
-PersonCard --|> UiPart
-StatusBarFooter --|> UiPart
+VendorListPanel --|> UiPart
+VendorCard --|> UiPart
+FoodListPanel --|> UiPart
+FoodCard --|> UiPart
HelpWindow -down-|> UiPart
-PersonCard ..> Model
+VendorCard ..> Model
+FoodCard .right.> Model
+OrderCard .up.> Model
UiManager -right-> Logic
MainWindow -left-> Logic
-PersonListPanel -[hidden]left- HelpWindow
+VendorListPanel -[hidden]left- HelpWindow
HelpWindow -[hidden]left- CommandBox
CommandBox -[hidden]left- ResultDisplay
-ResultDisplay -[hidden]left- StatusBarFooter
MainWindow -[hidden]-|> UiPart
@enduml
diff --git a/docs/diagrams/UntagCommandActivityDiagram.puml b/docs/diagrams/UntagCommandActivityDiagram.puml
new file mode 100644
index 00000000000..9570a63ef0a
--- /dev/null
+++ b/docs/diagrams/UntagCommandActivityDiagram.puml
@@ -0,0 +1,69 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":SupperStrikersParser" as SupperStrikersParser LOGIC_COLOR
+participant ":UntagCommandParser" as UntagCommandParser LOGIC_COLOR
+participant "u:UntagCommand" as UntagCommand LOGIC_COLOR
+participant ":CommandResult" as CommandResult LOGIC_COLOR
+end box
+
+box Model MODEL_COLOR_T1
+participant ":Model" as Model MODEL_COLOR
+end box
+
+[-> LogicManager : execute("untag 1")
+activate LogicManager
+
+LogicManager -> SupperStrikersParser : parseCommand("untag 1")
+activate SupperStrikersParser
+
+create UntagCommandParser
+SupperStrikersParser -> UntagCommandParser
+activate UntagCommandParser
+
+UntagCommandParser --> SupperStrikersParser
+deactivate UntagCommandParser
+
+SupperStrikersParser -> UntagCommandParser : parse("1")
+activate UntagCommandParser
+
+create UntagCommand
+UntagCommandParser -> UntagCommand
+activate UntagCommand
+
+UntagCommand --> UntagCommandParser : u
+deactivate UntagCommand
+
+UntagCommandParser --> SupperStrikersParser : u
+deactivate UntagCommandParser
+'Hidden arrow to position the destroy marker below the end of the activation bar.
+UntagCommandParser -[hidden]-> SupperStrikersParser
+destroy UntagCommandParser
+
+SupperStrikersParser --> LogicManager : u
+deactivate SupperStrikersParser
+
+LogicManager -> UntagCommand : execute()
+activate UntagCommand
+
+UntagCommand -> Model : untagOrderItem(1)
+activate Model
+
+Model --> UntagCommand
+deactivate Model
+
+create CommandResult
+UntagCommand -> CommandResult
+activate CommandResult
+
+CommandResult --> UntagCommand
+deactivate CommandResult
+
+UntagCommand --> LogicManager : result
+deactivate UntagCommand
+
+[<--LogicManager
+deactivate LogicManager
+@enduml
diff --git a/docs/images/AddCommandDiagram.png b/docs/images/AddCommandDiagram.png
new file mode 100644
index 00000000000..20bc57c0bf6
Binary files /dev/null and b/docs/images/AddCommandDiagram.png differ
diff --git a/docs/images/ArchitectureSequenceDiagram.png b/docs/images/ArchitectureSequenceDiagram.png
index 2f1346869d0..f4b4434db6c 100644
Binary files a/docs/images/ArchitectureSequenceDiagram.png and b/docs/images/ArchitectureSequenceDiagram.png differ
diff --git a/docs/images/ClearCommandDiagram.png b/docs/images/ClearCommandDiagram.png
new file mode 100644
index 00000000000..7c19f76e756
Binary files /dev/null and b/docs/images/ClearCommandDiagram.png differ
diff --git a/docs/images/DeletePresetCommandSequenceDiagram.png b/docs/images/DeletePresetCommandSequenceDiagram.png
new file mode 100644
index 00000000000..a7fafc57734
Binary files /dev/null and b/docs/images/DeletePresetCommandSequenceDiagram.png differ
diff --git a/docs/images/DeleteSequenceDiagram.png b/docs/images/DeleteSequenceDiagram.png
index fa327b39618..75e8c1f97cc 100644
Binary files a/docs/images/DeleteSequenceDiagram.png and b/docs/images/DeleteSequenceDiagram.png differ
diff --git a/docs/images/DeleteSequenceDiagram2.png b/docs/images/DeleteSequenceDiagram2.png
new file mode 100644
index 00000000000..75e8c1f97cc
Binary files /dev/null and b/docs/images/DeleteSequenceDiagram2.png differ
diff --git a/docs/images/FindCommandSequenceDiagram.png b/docs/images/FindCommandSequenceDiagram.png
new file mode 100644
index 00000000000..2e2ebc3ca4f
Binary files /dev/null and b/docs/images/FindCommandSequenceDiagram.png differ
diff --git a/docs/images/LoadPresetCommandActivityDiagram.png b/docs/images/LoadPresetCommandActivityDiagram.png
new file mode 100644
index 00000000000..0d557c6e716
Binary files /dev/null and b/docs/images/LoadPresetCommandActivityDiagram.png differ
diff --git a/docs/images/LoadPresetCommandSequenceDiagram.png b/docs/images/LoadPresetCommandSequenceDiagram.png
new file mode 100644
index 00000000000..53f276073ba
Binary files /dev/null and b/docs/images/LoadPresetCommandSequenceDiagram.png differ
diff --git a/docs/images/LogicClassDiagram.png b/docs/images/LogicClassDiagram.png
index b9e853cef12..7c5a1093993 100644
Binary files a/docs/images/LogicClassDiagram.png and b/docs/images/LogicClassDiagram.png differ
diff --git a/docs/images/LogicClassDiagram2.png b/docs/images/LogicClassDiagram2.png
new file mode 100644
index 00000000000..74cbf0e0b3c
Binary files /dev/null and b/docs/images/LogicClassDiagram2.png differ
diff --git a/docs/images/MenuCommandSequenceDiagram.png b/docs/images/MenuCommandSequenceDiagram.png
new file mode 100644
index 00000000000..0c76b67a038
Binary files /dev/null and b/docs/images/MenuCommandSequenceDiagram.png differ
diff --git a/docs/images/ModelClassDiagram2.png b/docs/images/ModelClassDiagram2.png
new file mode 100644
index 00000000000..513e75e2795
Binary files /dev/null and b/docs/images/ModelClassDiagram2.png differ
diff --git a/docs/images/RemoveCommandDiagram.png b/docs/images/RemoveCommandDiagram.png
new file mode 100644
index 00000000000..c653d3bab8e
Binary files /dev/null and b/docs/images/RemoveCommandDiagram.png differ
diff --git a/docs/images/SavePresetCommandActivityDiagram.png b/docs/images/SavePresetCommandActivityDiagram.png
new file mode 100644
index 00000000000..a219ef5e4a4
Binary files /dev/null and b/docs/images/SavePresetCommandActivityDiagram.png differ
diff --git a/docs/images/SavePresetCommandSequenceDiagram.png b/docs/images/SavePresetCommandSequenceDiagram.png
new file mode 100644
index 00000000000..d9bda464138
Binary files /dev/null and b/docs/images/SavePresetCommandSequenceDiagram.png differ
diff --git a/docs/images/SortCommandSequenceDiagram.png b/docs/images/SortCommandSequenceDiagram.png
new file mode 100644
index 00000000000..45e4d0872ac
Binary files /dev/null and b/docs/images/SortCommandSequenceDiagram.png differ
diff --git a/docs/images/StorageClassDiagram.png b/docs/images/StorageClassDiagram.png
index d87c1216820..b612c187c3d 100644
Binary files a/docs/images/StorageClassDiagram.png and b/docs/images/StorageClassDiagram.png differ
diff --git a/docs/images/StorageClassDiagram2.png b/docs/images/StorageClassDiagram2.png
new file mode 100644
index 00000000000..8f2ef59b47a
Binary files /dev/null and b/docs/images/StorageClassDiagram2.png differ
diff --git a/docs/images/SwitchVendorCommandActivityDiagram.png b/docs/images/SwitchVendorCommandActivityDiagram.png
new file mode 100644
index 00000000000..eb7deeaeb4a
Binary files /dev/null and b/docs/images/SwitchVendorCommandActivityDiagram.png differ
diff --git a/docs/images/TagCommandActivityDiagram.png b/docs/images/TagCommandActivityDiagram.png
new file mode 100644
index 00000000000..9d08568294d
Binary files /dev/null and b/docs/images/TagCommandActivityDiagram.png differ
diff --git a/docs/images/Ui.png b/docs/images/Ui.png
index 5bd77847aa2..10e8903dd9b 100644
Binary files a/docs/images/Ui.png and b/docs/images/Ui.png differ
diff --git a/docs/images/UiClassDiagram.png b/docs/images/UiClassDiagram.png
index 7b4b3dbea45..02fd4cc9a05 100644
Binary files a/docs/images/UiClassDiagram.png and b/docs/images/UiClassDiagram.png differ
diff --git a/docs/images/UntagCommandActivityDiagram.png b/docs/images/UntagCommandActivityDiagram.png
new file mode 100644
index 00000000000..f79c9406220
Binary files /dev/null and b/docs/images/UntagCommandActivityDiagram.png differ
diff --git a/docs/images/VendorCommandSequenceDiagram.png b/docs/images/VendorCommandSequenceDiagram.png
new file mode 100644
index 00000000000..14675cc0edd
Binary files /dev/null and b/docs/images/VendorCommandSequenceDiagram.png differ
diff --git a/docs/images/duckmoon99.png b/docs/images/duckmoon99.png
new file mode 100644
index 00000000000..d1b0502a899
Binary files /dev/null and b/docs/images/duckmoon99.png differ
diff --git a/docs/images/ebolaeater.png b/docs/images/ebolaeater.png
new file mode 100644
index 00000000000..97f4519491e
Binary files /dev/null and b/docs/images/ebolaeater.png differ
diff --git a/docs/images/ernestlim8.png b/docs/images/ernestlim8.png
new file mode 100644
index 00000000000..e9d14761a35
Binary files /dev/null and b/docs/images/ernestlim8.png differ
diff --git a/docs/images/friendly_syntax_architecture_diagram.png b/docs/images/friendly_syntax_architecture_diagram.png
new file mode 100644
index 00000000000..4a356e81e4f
Binary files /dev/null and b/docs/images/friendly_syntax_architecture_diagram.png differ
diff --git a/docs/images/kendrewchan.png b/docs/images/kendrewchan.png
new file mode 100644
index 00000000000..1f9df57aeb1
Binary files /dev/null and b/docs/images/kendrewchan.png differ
diff --git a/docs/images/morninglit.png b/docs/images/morninglit.png
new file mode 100644
index 00000000000..c512b4077af
Binary files /dev/null and b/docs/images/morninglit.png differ
diff --git a/docs/images/tset.png b/docs/images/tset.png
new file mode 100644
index 00000000000..cfb69068dee
Binary files /dev/null and b/docs/images/tset.png differ
diff --git a/docs/index.md b/docs/index.md
index 7601dbaad0d..09e1d10b728 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,17 +1,17 @@
---
layout: page
-title: AddressBook Level-3
+title: Supper Strikers
---
-[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/se-edu/addressbook-level3/actions)
-[![codecov](https://codecov.io/gh/se-edu/addressbook-level3/branch/master/graph/badge.svg)](https://codecov.io/gh/se-edu/addressbook-level3)
+![Java CI](https://github.com/AY2021S1-CS2103-T16-1/tp/workflows/Java%20CI/badge.svg)
+[![codecov](https://codecov.io/gh/AY2021S1-CS2103-T16-1/tp/branch/master/graph/badge.svg?token=CJKQa8CATW)](https://codecov.io/gh/AY2021S1-CS2103-T16-1/tp)
![Ui](images/Ui.png)
-**AddressBook is a desktop application for managing your contact details.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface).
+**Supper Strikers is a desktop application for managing your supper orders.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface).
-* If you are interested in using AddressBook, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start).
-* If you are interested about developing AddressBook, the [**Developer Guide**](DeveloperGuide.html) is a good place to start.
+* If you are interested in using Supper Strikers, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start).
+* If you are interested about developing Supper Strikers, the [**Developer Guide**](DeveloperGuide.html) is a good place to start.
**Acknowledgements**
diff --git a/docs/team/duckmoon99.md b/docs/team/duckmoon99.md
new file mode 100644
index 00000000000..f7d3b055acc
--- /dev/null
+++ b/docs/team/duckmoon99.md
@@ -0,0 +1,38 @@
+---
+layout: page
+title: Wei Xin's Project Portfolio Page
+---
+
+## Project: SupperStrikers
+
+SupperStriker is a desktop meal ordering application. The user interacts with it using a CLI, and it has a GUI created
+with JavaFX. It is written in Java.
+
+Given below are my contributions to the project.
+
+* **New Feature**: Added OrderItem, Order class
+ * What it does: Used to represent order items.
+* **New Feature**: Added Friendly Syntax
+ * What it does: Users can type prefix of a command to use it, without typing the full command. For example, users can
+ type `r` instead of `remove` to use the `remove` command. If the prefix is ambiguous (match multiple commands) the
+ user will be notified.
+ * Justification: To reduce the number of characters needed to be typed by the user, increasing speed.
+* **New Feature**: Add Undo Command
+ * What it does: Add ability for user to undo last few changes to the order.
+ * Justification: To allow user to recover from minor mistakes, without going through the trouble of edit or remove.
+* **New Feature**: Add Price Filter
+ * What it does: Users are able to list out all food item within a certain price range. For example, `price < 5` lists
+ all food item with price < $5.
+ * Justification: Allows price conscious users to find food within their budget.
+* **New Feature**: Add Tag/Untag feature
+ * What it does: Add ability for user to tag specific order item with remarks.
+ * Justification: Allows users to specify special request for their food if needed, ie. "Less sugar", "No nuts"
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=duckmoon99)
+* **Enhancements made**:
+ * Wrote additional tests to increase code coverage [#228](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/228)
+* **Documentation**:
+ * User Guide: Update and finalised User Guide [#213](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/213)
+ * Developer Guide: Explained how the Undo feature is implemented [#111](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/111)
+* **Team contribution**:
+ * Hosted meetings and suggested directions for the project.
+ * Reorganise bug reports into more coherent problems to be fixed.
diff --git a/docs/team/ebolaeater.md b/docs/team/ebolaeater.md
new file mode 100644
index 00000000000..f685195af34
--- /dev/null
+++ b/docs/team/ebolaeater.md
@@ -0,0 +1,53 @@
+---
+layout: page
+title: Anikesh's Project Portfolio Page
+---
+
+## Project: SupperStrikers
+
+SupperStrikers is a food ordering application. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java.
+
+Given below are my contributions to the project.
+
+* **New Feature**: Added MenuItem and Vendor Class.
+
+ * What it does: Used to represent menu items as items the vendor has in the menu
+
+* **New Feature**: Added Clear Command
+
+ * What it does: Allows users to clear their current supper order.
+ * Justification: Helps the user to quickly delete all the items in the order and start afresh.
+
+* **New Feature**: Helped add Vendor Command
+
+ * What it does: Allows users to choose a vendor to order from.
+ * Justification: Needed by the user to choose a vendor to order from.
+
+
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=&sort=groupTitle&sortWithin=title&since=2020-08-14&timeframe=commit&mergegroup=&groupSelect=groupByRepos&checkedFileTypes=docs~functional-code~test-code~other&tabOpen=true&tabType=authorship&tabAuthor=Ebolaeater&tabRepo=AY2021S1-CS2103-T16-1%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&reverseAuthorshipOrder=true)
+
+
+* **Enhancements to existing features**:
+
+ * Helped update GUI to enable the displaying of images for menu items (Pull requests [#196](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/194))
+ * Refactored AddCommand (Pull requests [#59](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/59))
+ * Add clipboard functionality for submit command (Pull requests [#187](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/187))
+ * Wrote tests to increase code coverage (Pull requests [#204](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/204), [\#220](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/220), [\#121](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/121), [\#126](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/126), [\#202](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/202), [\#198](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/198))
+ * Add actual vendors into SupperStrikers (Pull requests [#232](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/232))
+
+* **Documentation**:
+
+ * User Guide:
+ * Added documentation for `total` and `submit` command: [#69](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/69)
+
+ * Developer Guide:
+ * Added use case details for `vendor` and `add` command : [#13](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/13)
+ * Added use case details for `clear` and `submit` command : [#94](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/94)
+ * Added use case details for `total` command : [#20](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/20/files)
+ * Added implementation details of `tag` and `untag`: [#223](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/223)
+ * Added implementation details of features like friendly-syntax : [#121](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/121)
+
+* **Community**:
+
+ * PRs reviewed (with non-trivial review comments):[#222](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/222)
+ * Reported bugs for other teams: (examples: [#5](https://github.com/Ebolaeater/ped/issues/5), [#1](https://github.com/Ebolaeater/ped/issues/1))
diff --git a/docs/team/ernestlim8.md b/docs/team/ernestlim8.md
new file mode 100644
index 00000000000..9ffff8f123d
--- /dev/null
+++ b/docs/team/ernestlim8.md
@@ -0,0 +1,74 @@
+---
+layout: page
+title: Ernest Lim's Project Portfolio Page
+---
+
+## Project: SupperStrikers
+
+SupperStrikers is a food ordering application. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java.
+
+Given below are my contributions to the project.
+
+* **New Feature**: Added the ability to display and switch between vendors. (Pull requests [#78](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/78), [#86](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/86))
+
+ * What it does: Allows the user to select a vendor to order from. When a vendor has been successfully selected, the GUI portion will display the menu of the selected vendor.
+ * Justification: This feature is required to allow users to select a vendor so that they are able to view the menu corresponding to that vendor.
+ * Highlights: This enhancement creates a new vendor mode for SupperStrikers, where the menu based commands will return an error message in vendor mode. Corresponding commands such as VendorCommand and SwitchVendorCommand are implemented to switch between vendor mode and menu mode.
+
+* **New Feature**: Added the ability to display the menu of the selected vendor in menu mode. (Pull requests [#78](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/78), [#86](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/86))
+
+ * What it does: Allows the user to view the menu of a selected vendor in the GUI.
+
+ * Justification: This feature reduces clutter in the screen as the vendor list is not important to the user after the user has
+
+ selected a vendor.
+
+* **New Feature**: Added the ability for users to save and load their order items in their presets. (Pull request [#142](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/142))
+
+ * What it does: Allows the user to load their presets from a json file. Users are able to create a preset for that vendor and give the preset a name. The user is able to load the preset using its name and they can modify the order items after the preset is loaded before submitting.
+
+ * Highlights: If the preset is saved with an already existing name, it will be overwritten. Implemented execute portion of save and load preset commands.
+
+
+
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=ernestlim8&sort=groupTitle&sortWithin=title&since=2020-08-14&timeframe=commit&mergegroup=&groupSelect=groupByRepos&checkedFileTypes=docs~functional-code~test-code~other)
+
+* **Project management**:
+
+* Set up team repository for SupperStrikers
+
+ * Managed release `v1.2` by creating issues on GitHub
+
+ * Adapted AddressBook to create MenuManager, OrderManager and its related classes ([#43](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/43))
+
+ * Refactor Command classes (Pull Request [#124](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/124))
+
+ * Refactor AddressBook to VendorManager (Pull Request [#214](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/214))
+
+
+
+* **Enhancements to existing features**:
+
+ * Updated the GUI to display the list of vendors in vendor mode and display the menu in menu mode (Pull requests [#43](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/43))
+ * Updated the GUI to support images for the menu items (Pull requests [#196](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/196), [#205](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/205))
+ * Wrote additional tests for existing features to increase test coverage (Pull requests [#52](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/52), [#119](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/119), [#124](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/124), [#191](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/191),[#218](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/218) )
+ * Change Vendors in SupperStrikers to reflect actual vendors (Pull Request [#195](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/195))
+
+* **Documentation**:
+
+ * User Guide:
+ * Added documentation for the features `VendorCommand` (Pull Request [#135](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/135))
+
+ * Developer Guide:
+
+ * Added implementation details of the `VendorCommand` feature. (Pull Request [#92](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/92), [#95](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/95))
+ * Added implementation details of the `SwitchVendorCommand` feature. (Pull Request [#116](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/116))
+ * Added implementation details and use cases of the `LoadPresetCommand` and `SavePresetCommand`. (Pull Request [#226](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/226))
+ * Improved use cases portion of some commands (Pull Request [#122](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/122))
+ * Improved UI, Storage and Logic sections (Pull Request [#208](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/208))
+
+* **Community**:
+
+ * PRs reviewed (with non-trivial review comments [#13](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/13)):
+ * Reported bugs and suggestions for other teams in the class (examples: [6](https://github.com/ernestlim8/ped/issues/6), [10](https://github.com/ernestlim8/ped/issues/10), [15](https://github.com/ernestlim8/ped/issues/15))
+
diff --git a/docs/team/kendrewchan.md b/docs/team/kendrewchan.md
new file mode 100644
index 00000000000..52ad1276a15
--- /dev/null
+++ b/docs/team/kendrewchan.md
@@ -0,0 +1,31 @@
+---
+layout: page
+title: Kendrew's Project Portfolio Page
+---
+
+## Project: SupperStrikers
+
+SupperStrikers is a desktop food ordering application. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java.
+
+Given below are my contributions to the project.
+
+* **New Feature**: Added OrderItem, Order Class.
+ * What it does: Used to represent food items as items the user takes as orders.
+* **New Feature**: Added Sort Command
+ * What it does: Allows users to sort the menu items by name or price.
+ * Justification: Helps to improve user experience and make it easier to find particular food items.
+* **New Feature**: Added a profile command to allow user to create their profile
+ * What it does: Adds an address and phone number tagged to the user, which will be shown when user submits their order.
+ * Justification: Address and phone number required for shop owners to contact the user.
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=kendrewchan)
+* **Enhancements to existing features**:
+ * Refactored DeleteCommand (Pull requests [\#55](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/55))
+ * Wrote tests for Order and OrderManagerStorage (Pull requests [\#77](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/77))
+* **Documentation**:
+ * User Guide:
+ * Standardised UserGuide with Messages shown on GUI and added target audience: [\#190](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/190)
+ * Added UserGuide for `profile` command: [\#202](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/202)
+ * Developer Guide:
+ * Added implementation details of order commands such as `add`, `remove` and `clear`: [\#110](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/110)
+* **Community**:
+ * PRs reviewed (with non-trivial review comments): [\#199](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/199)
diff --git a/docs/team/morninglit.md b/docs/team/morninglit.md
new file mode 100644
index 00000000000..388f4670c66
--- /dev/null
+++ b/docs/team/morninglit.md
@@ -0,0 +1,36 @@
+---
+layout: page
+title: Ambrose Liew's Project Portfolio Page
+---
+
+## Project: SupperStrikers
+
+SupperStrikers is a desktop supper ordering application used for ordering supper from supper stretch easily. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java.
+
+Given below are my contributions to the project.
+
+* **New Feature**: Added preset delete command. (Pull request [#189](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/189))
+ * What it does: Used to delete a user's existing preset saved in their presets.json file.
+
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=morninglit)
+
+* **Enhancements to existing features**:
+ * Updated the GUI color scheme (Pull request [#201](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/201))
+ * Updated the functionality of JsonSerializablePresetManager (Pull request [#142](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/142))
+ * Finished the functionality of preset load command (Pull request [#142](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/142))
+ * Updated the Phone class to accept only valid phone numbers (Pull request [#210](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/210))
+ * Updated the functionality of sort command to be able to accept commands with no direction (toggle feature) (Pull request [#125](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/125))
+ * Updated the find command to work for our menu items and tags (Pull requests [#107](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/107), [#120](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/120))
+ * Wrote test cases for all preset commands (Pull requests [#212](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/212), [#217](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/217), [#219](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/219))
+ * Fixed saving storage bugs (Pull requests [#93](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/93), [#147](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/147))
+
+* **Documentation**:
+ * User Guide:
+ * Added documentation for preset commands (Pull request [#139](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/139))
+ * Helped standardise the entire document: (Pull requests [#16](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/16), [#138](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/138), [#189](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/189))
+ * Developer Guide:
+ * Standardise and fixed grammatical errors (Pull requests [#90](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/90), [#230](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/230))
+ * Added last few remaining use cases (Pull request [#239](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/239))
+
+* **Community**:
+ * PRs reviewed: (Pull requests [#144](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/144), [#234](https://github.com/AY2021S1-CS2103-T16-1/tp/pull/234))
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 44e7c4d1d7b..f520ff4bcf0 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,6 @@
+#Tue Oct 27 10:19:07 SGT 2020
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
-zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
diff --git a/src/main/java/seedu/address/MainApp.java b/src/main/java/seedu/address/MainApp.java
index e5cfb161b73..e2034a7769b 100644
--- a/src/main/java/seedu/address/MainApp.java
+++ b/src/main/java/seedu/address/MainApp.java
@@ -2,6 +2,8 @@
import java.io.IOException;
import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Optional;
import java.util.logging.Logger;
@@ -12,22 +14,31 @@
import seedu.address.commons.core.Version;
import seedu.address.commons.exceptions.DataConversionException;
import seedu.address.commons.util.ConfigUtil;
+import seedu.address.commons.util.FileUtil;
import seedu.address.commons.util.StringUtil;
import seedu.address.logic.Logic;
import seedu.address.logic.LogicManager;
-import seedu.address.model.AddressBook;
import seedu.address.model.Model;
import seedu.address.model.ModelManager;
-import seedu.address.model.ReadOnlyAddressBook;
import seedu.address.model.ReadOnlyUserPrefs;
import seedu.address.model.UserPrefs;
+import seedu.address.model.menu.MenuManager;
+import seedu.address.model.menu.ReadOnlyMenuManager;
+import seedu.address.model.order.OrderManager;
import seedu.address.model.util.SampleDataUtil;
-import seedu.address.storage.AddressBookStorage;
-import seedu.address.storage.JsonAddressBookStorage;
+import seedu.address.model.vendor.ReadOnlyVendorManager;
+import seedu.address.model.vendor.VendorManager;
+import seedu.address.storage.JsonPresetManagerStorage;
+import seedu.address.storage.JsonProfileManagerStorage;
import seedu.address.storage.JsonUserPrefsStorage;
+import seedu.address.storage.JsonVendorManagerStorage;
+import seedu.address.storage.MenuItemStorage;
+import seedu.address.storage.PresetManagerStorage;
+import seedu.address.storage.ProfileManagerStorage;
import seedu.address.storage.Storage;
import seedu.address.storage.StorageManager;
import seedu.address.storage.UserPrefsStorage;
+import seedu.address.storage.VendorManagerStorage;
import seedu.address.ui.Ui;
import seedu.address.ui.UiManager;
@@ -36,7 +47,7 @@
*/
public class MainApp extends Application {
- public static final Version VERSION = new Version(0, 6, 0, true);
+ public static final Version VERSION = new Version(1, 3, 0, true);
private static final Logger logger = LogsCenter.getLogger(MainApp.class);
@@ -48,7 +59,7 @@ public class MainApp extends Application {
@Override
public void init() throws Exception {
- logger.info("=============================[ Initializing AddressBook ]===========================");
+ logger.info("=============================[ Initializing VendorManager ]===========================");
super.init();
AppParameters appParameters = AppParameters.parse(getParameters());
@@ -56,9 +67,13 @@ public void init() throws Exception {
UserPrefsStorage userPrefsStorage = new JsonUserPrefsStorage(config.getUserPrefsFilePath());
UserPrefs userPrefs = initPrefs(userPrefsStorage);
- AddressBookStorage addressBookStorage = new JsonAddressBookStorage(userPrefs.getAddressBookFilePath());
- storage = new StorageManager(addressBookStorage, userPrefsStorage);
-
+ VendorManagerStorage vendorManagerStorage = new JsonVendorManagerStorage(userPrefs.getVendorManagerFilePath());
+ PresetManagerStorage presetManagerStorage = new JsonPresetManagerStorage(userPrefs.getOrderManagerFilePath());
+ ProfileManagerStorage profileManagerStorage = new JsonProfileManagerStorage(
+ userPrefs.getProfileManagerFilePath()
+ );
+ storage = new StorageManager(vendorManagerStorage, userPrefsStorage, presetManagerStorage,
+ profileManagerStorage);
initLogging(config);
model = initModelManager(storage, userPrefs);
@@ -69,28 +84,53 @@ public void init() throws Exception {
}
/**
- * Returns a {@code ModelManager} with the data from {@code storage}'s address book and {@code userPrefs}.
- * The data from the sample address book will be used instead if {@code storage}'s address book is not found,
- * or an empty address book will be used instead if errors occur when reading {@code storage}'s address book.
+ * Returns a {@code ModelManager} with the data from {@code storage}'s vendor book and {@code userPrefs}.
+ * The data from the sample vendor book will be used instead if {@code storage}'s vendor book is not found,
+ * or an empty vendor book will be used instead if errors occur when reading {@code storage}'s vendor book.
*/
private Model initModelManager(Storage storage, ReadOnlyUserPrefs userPrefs) {
- Optional addressBookOptional;
- ReadOnlyAddressBook initialData;
+ Optional vendorManagerOptional;
+ List> menuManagersOptional;
+ ReadOnlyVendorManager initialData;
+ List initialMenuManagers = new ArrayList<>();
+ OrderManager initialOrderManager = new OrderManager();
try {
- addressBookOptional = storage.readAddressBook();
- if (!addressBookOptional.isPresent()) {
- logger.info("Data file not found. Will be starting with a sample AddressBook");
+ vendorManagerOptional = storage.readVendorManager();
+ if (vendorManagerOptional.isEmpty()) {
+ logger.info("Data file not found. Will be starting with a sample VendorManager");
}
- initialData = addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);
+ initialData = vendorManagerOptional.orElseGet(SampleDataUtil::getSampleVendorManager);
+ menuManagersOptional = new MenuItemStorage().readMenuManagers(initialData.getVendorList());
+ menuManagersOptional.forEach(x -> x.ifPresentOrElse(y ->
+ initialMenuManagers.add(new MenuManager(y)), () -> {
+ logger.info("Data file not found. Will be starting with an empty menu");
+ initialMenuManagers.add(new MenuManager());
+ }
+ ));
} catch (DataConversionException e) {
- logger.warning("Data file not in the correct format. Will be starting with an empty AddressBook");
- initialData = new AddressBook();
+ logger.warning("Data file not in the correct format. Will be starting with an empty VendorManager");
+ initialData = new VendorManager();
+ } catch (IOException e) {
+ logger.warning("Problem while reading from the file. Will be starting with an empty VendorManager");
+ initialData = new VendorManager();
+ assert model != null;
+ }
+ try {
+ storage.saveVendorManager(initialData);
+ } catch (IOException e) {
+ logger.warning("Something unexpected occurred!");
+ assert false;
+ }
+ try {
+ if (!FileUtil.isFileExists(storage.getPresetManagerFilePath())) {
+ storage.savePresetManager(new ArrayList<>(new ArrayList<>()));
+ }
} catch (IOException e) {
- logger.warning("Problem while reading from the file. Will be starting with an empty AddressBook");
- initialData = new AddressBook();
+ logger.warning("Something unexpected occurred!");
+ assert false;
}
- return new ModelManager(initialData, userPrefs);
+ return new ModelManager(initialData, userPrefs, initialMenuManagers, initialOrderManager);
}
private void initLogging(Config config) {
@@ -151,7 +191,7 @@ protected UserPrefs initPrefs(UserPrefsStorage storage) {
+ "Using default user prefs");
initializedPrefs = new UserPrefs();
} catch (IOException e) {
- logger.warning("Problem while reading from the file. Will be starting with an empty AddressBook");
+ logger.warning("Problem while reading from the file. Will be starting with an empty VendorManager");
initializedPrefs = new UserPrefs();
}
@@ -167,13 +207,13 @@ protected UserPrefs initPrefs(UserPrefsStorage storage) {
@Override
public void start(Stage primaryStage) {
- logger.info("Starting AddressBook " + MainApp.VERSION);
+ logger.info("Starting VendorManager " + MainApp.VERSION);
ui.start(primaryStage);
}
@Override
public void stop() {
- logger.info("============================ [ Stopping Address Book ] =============================");
+ logger.info("============================ [ Stopping Supper Strikers ] =============================");
try {
storage.saveUserPrefs(model.getUserPrefs());
} catch (IOException e) {
diff --git a/src/main/java/seedu/address/commons/core/Messages.java b/src/main/java/seedu/address/commons/core/Messages.java
index 1deb3a1e469..0998ae9b7cd 100644
--- a/src/main/java/seedu/address/commons/core/Messages.java
+++ b/src/main/java/seedu/address/commons/core/Messages.java
@@ -4,10 +4,46 @@
* Container for user visible messages.
*/
public class Messages {
-
public static final String MESSAGE_UNKNOWN_COMMAND = "Unknown command";
- public static final String MESSAGE_INVALID_COMMAND_FORMAT = "Invalid command format! \n%1$s";
- public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX = "The person index provided is invalid";
- public static final String MESSAGE_PERSONS_LISTED_OVERVIEW = "%1$d persons listed!";
+ public static final String MESSAGE_INVALID_COMMAND_FORMAT = "Invalid command format!\n%1$s";
+ public static final String MESSAGE_INVALID_INDEX = "%s is not a non-zero unsigned integer.";
+ public static final String MESSAGE_INVALID_QUANTITY = "Quantity given is invalid.";
+ public static final String MESSAGE_INVALID_VENDOR_DISPLAYED_INDEX = "The vendor index provided is invalid";
+ public static final String MESSAGE_INVALID_ORDERITEM_DISPLAYED_INDEX = "The order item index provided is invalid";
+ public static final String MESSAGE_INVALID_ORDERITEM_DISPLAYED_QUANTITY = "The order item quantity "
+ + "provided is invalid";
+ public static final String MESSAGE_INVALID_PRICE = "%s is not a non-negative unsigned real number.";
+ public static final String MESSAGE_PRICE_GREATER_THAN_LIMIT = "$%.2f is too large of a price!";
+ public static final String MESSAGE_INVALID_INEQUALITY = "%s is not a valid inequality sign. It must be either "
+ + "\"<\", \"<=\", \">\", or \">=\" (without quotes). See User Guide for more info.";
+
+ public static final String MESSAGE_VENDOR_NOT_SELECTED = "A vendor has not been selected yet,"
+ + " please choose a vendor.";
+ public static final String MESSAGE_EMPTY_ORDER = "The order is currently empty,"
+ + " please add an order.";
+ public static final String MESSAGE_INSUFFICIENT_ARGUMENTS = "%s command requires at least %s argument(s).\n%s";
+ public static final String MESSAGE_TOO_MANY_ARGUMENTS = "%s command should not have more than %s arguments.\n%s";
+ public static final String MESSAGE_CHAIN =
+ "1. You can further chain the current filter with another `find` or `price` or `sort` command.\n"
+ + "2. Filters can be reset with the `menu` command.";
+ public static final String MESSAGE_FOOD_LISTED_OVERVIEW = "%1$d food listed!\n" + MESSAGE_CHAIN;
+ public static final String MESSAGE_FOOD_LISTED_PRICE_CONTEXT = "%1$d food with price %2$s listed!\n"
+ + MESSAGE_CHAIN;
+ public static final String MESSAGE_FOOD_SORTED = "Food successfully sorted!\n" + MESSAGE_CHAIN;
+ public static final String MESSAGE_MENU_LIST = "All food listed!";
+ public static final String MESSAGE_ORDERITEM_QUANTITY_EXCEED = "Cannot have more than 100 of the an order item.";
+ public static final String MESSAGE_EMPTY_PROFILE = "Please create a profile first before using the submit command.";
+ public static final String MESSAGE_AMBIGUOUS_COMMAND = "Ambiguous command. The following commands matches the "
+ + "prefix: %s";
+ public static final String MESSAGE_PRESET_SAVE_NO_ORDER = "You have not added any items to your order to be saved!";
+ public static final String MESSAGE_PRESET_NO_SAVED_PRESETS = "You have not saved any presets for this vendor!";
+ public static final String MESSAGE_PRESET_OVERWRITE_SUCCESS = "Preset %s has been overwritten.";
+ public static final String MESSAGE_PRESET_SAVE_SUCCESS = "Preset %s has been saved.";
+ public static final String MESSAGE_PRESET_LOAD_SUCCESS = "Preset %s has been loaded.";
+ public static final String MESSAGE_PRESET_DELETE_SUCCESS = "Preset %s has been deleted.";
+ public static final String MESSAGE_PRESET_LOAD_ERROR = "Presets cannot be read.";
+ public static final String MESSAGE_PRESET_NOT_FOUND = "Preset %s cannot be found.";
+ public static final String MESSAGE_NO_INPUT_NAME = "You must specify a preset name to delete!";
+ public static final String MESSAGE_EXISTING_TAG = "'%s' is already tagged to the order item!";
}
diff --git a/src/main/java/seedu/address/commons/exceptions/IllegalValueException.java b/src/main/java/seedu/address/commons/exceptions/IllegalValueException.java
index 19124db485c..1ab7f11e90c 100644
--- a/src/main/java/seedu/address/commons/exceptions/IllegalValueException.java
+++ b/src/main/java/seedu/address/commons/exceptions/IllegalValueException.java
@@ -11,11 +11,4 @@ public IllegalValueException(String message) {
super(message);
}
- /**
- * @param message should contain relevant information on the failed constraint(s)
- * @param cause of the main exception
- */
- public IllegalValueException(String message, Throwable cause) {
- super(message, cause);
- }
}
diff --git a/src/main/java/seedu/address/commons/util/JsonUtil.java b/src/main/java/seedu/address/commons/util/JsonUtil.java
index 8ef609f055d..313a82c5dcd 100644
--- a/src/main/java/seedu/address/commons/util/JsonUtil.java
+++ b/src/main/java/seedu/address/commons/util/JsonUtil.java
@@ -107,7 +107,7 @@ public static T fromJsonString(String json, Class instanceClass) throws I
* @return JSON data representation of the given class instance, in string
*/
public static String toJsonString(T instance) throws JsonProcessingException {
- return objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(instance);
+ return objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(instance) + "\n";
}
/**
diff --git a/src/main/java/seedu/address/commons/util/StringUtil.java b/src/main/java/seedu/address/commons/util/StringUtil.java
index 61cc8c9a1cb..7779a8fe4f8 100644
--- a/src/main/java/seedu/address/commons/util/StringUtil.java
+++ b/src/main/java/seedu/address/commons/util/StringUtil.java
@@ -7,6 +7,8 @@
import java.io.StringWriter;
import java.util.Arrays;
+import seedu.address.logic.commands.enums.Inequality;
+
/**
* Helper functions for handling strings.
*/
@@ -27,15 +29,14 @@ public static boolean containsWordIgnoreCase(String sentence, String word) {
requireNonNull(sentence);
requireNonNull(word);
- String preppedWord = word.trim();
+ String preppedWord = word.toLowerCase().trim();
checkArgument(!preppedWord.isEmpty(), "Word parameter cannot be empty");
checkArgument(preppedWord.split("\\s+").length == 1, "Word parameter should be a single word");
- String preppedSentence = sentence;
- String[] wordsInPreppedSentence = preppedSentence.split("\\s+");
+ String[] wordsInPreppedSentence = sentence.toLowerCase().split("\\s+");
return Arrays.stream(wordsInPreppedSentence)
- .anyMatch(preppedWord::equalsIgnoreCase);
+ .anyMatch(x -> x.contains(preppedWord));
}
/**
@@ -65,4 +66,31 @@ public static boolean isNonZeroUnsignedInteger(String s) {
return false;
}
}
+
+ /**
+ * Returns true if {@code s} represents a non-negative unsigned double
+ *
+ * @throws NullPointerException if {@code s} is null.
+ */
+ public static boolean isNonNegativeUnsignedDouble(String s) {
+ requireNonNull(s);
+
+ try {
+ double value = Double.parseDouble(s);
+ return value >= 0 && !s.startsWith("+");
+ } catch (NumberFormatException nfe) {
+ return false;
+ }
+ }
+
+ /**
+ * Returns true if {@code s} represents the symbol of inequality.
+ *
+ * @throws NullPointerException if {@code s} is null.
+ */
+ public static boolean isInequality(String s) {
+ requireNonNull(s);
+
+ return Inequality.get(s) != null;
+ }
}
diff --git a/src/main/java/seedu/address/logic/Logic.java b/src/main/java/seedu/address/logic/Logic.java
index 92cd8fa605a..2c001012c7c 100644
--- a/src/main/java/seedu/address/logic/Logic.java
+++ b/src/main/java/seedu/address/logic/Logic.java
@@ -7,8 +7,10 @@
import seedu.address.logic.commands.CommandResult;
import seedu.address.logic.commands.exceptions.CommandException;
import seedu.address.logic.parser.exceptions.ParseException;
-import seedu.address.model.ReadOnlyAddressBook;
-import seedu.address.model.person.Person;
+import seedu.address.model.food.MenuItem;
+import seedu.address.model.order.OrderItem;
+import seedu.address.model.vendor.Vendor;
+
/**
* API of the Logic component
@@ -23,20 +25,19 @@ public interface Logic {
*/
CommandResult execute(String commandText) throws CommandException, ParseException;
- /**
- * Returns the AddressBook.
- *
- * @see seedu.address.model.Model#getAddressBook()
- */
- ReadOnlyAddressBook getAddressBook();
+ /** Returns an unmodifiable view of the filtered list of vendors */
+ ObservableList getObservableVendorList();
- /** Returns an unmodifiable view of the filtered list of persons */
- ObservableList getFilteredPersonList();
+ /** Returns an unmodifiable view of the filtered list of foods */
+ ObservableList