diff --git a/.gitignore b/.gitignore
index 71c9194e8bd..90fdd61a111 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,6 @@ src/test/data/sandbox/
# MacOS custom attributes files created by Finder
.DS_Store
docs/_site/
+
+*.class
+bin/
diff --git a/README.md b/README.md
index 13f5c77403f..f7118ebc86e 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,23 @@
-[](https://github.com/se-edu/addressbook-level3/actions)

-* 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.
+# Trackr
+
+[](https://github.com/AY2223S2-CS2103T-W14-2/tp/actions)
+[](https://codecov.io/gh/AY2223S2-CS2103T-W15-2/tp)
+
+This repository contains the code base for a Java application for small online bakery businesses.
+
+## About The Project
+
+* The project is a desktop application (called _Trackr_) that targets users with a Command Line Interface (CLI), while providing the visuals using a Graphical User Interface (GUI).
+ * It is a software engineering project for a module (**CS2103T Software Engineering**) by National University of Singapore (NUS).
+ * It is **written in OOP fashion**.
* 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.
+* It is named `Trackr` because it was created to help users **track** their orders, suppliers contact information and tasks.
+* For the detailed documentation of this project, see the **[Trackr Product Website](https://ay2223s2-cs2103t-w15-2.github.io/tp/)**.
+
+## Acknowledgements
+
+* This project is based on the AddressBook-Level3 project created by the [SE-EDU initiative](https://se-education.org).
+* If you would like to contribute code to the parent project (AddressBook-Level3), 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 108397716bd..944376bccc6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,7 +6,7 @@ plugins {
id 'jacoco'
}
-mainClassName = 'seedu.address.Main'
+mainClassName = 'trackr.Main'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
@@ -66,7 +66,11 @@ dependencies {
}
shadowJar {
- archiveFileName = 'addressbook.jar'
+ archiveFileName = 'trackr.jar'
+}
+
+run {
+ enableAssertions = true
}
defaultTasks 'clean', 'test'
diff --git a/docs/AboutUs.md b/docs/AboutUs.md
index 1c9514e966a..60ad8411186 100644
--- a/docs/AboutUs.md
+++ b/docs/AboutUs.md
@@ -9,51 +9,52 @@ You can reach us at the email `seer[at]comp.nus.edu.sg`
## Project team
-### John Doe
+### Liu Muchen
-
+
-[[homepage](http://www.comp.nus.edu.sg/~damithch)]
-[[github](https://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+[[github](https://github.com/LiuMC-SG)]
+[[portfolio](team/liumc-sg.md)]
-* Role: Project Advisor
+* Role: Software Developer
+* Responsibilities: Team Lead (Documentation, Deliverables)
-### Jane Doe
+### Darren Chang
-
+
-[[github](http://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+[[github](http://github.com/ChangGittyHub)]
+[[portfolio](team/changgittyhub.md)]
-* Role: Team Lead
-* Responsibilities: UI
+* Role: Software Developer
+* Responsibilities: Scheduling & Tracking
-### Johnny Doe
+### Arkar Kyaw Aung
-
+
-[[github](http://github.com/johndoe)] [[portfolio](team/johndoe.md)]
+[[github](https://github.com/arkarsg)]
+[[portfolio](team/arkarsg.md)]
* Role: Developer
-* Responsibilities: Data
+* Responsibilities: UI & Testing
-### Jean Doe
+### Hmuu Myat Moe
-
+
-[[github](http://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+[[github](https://github.com/HmuuMyatMoe)]
+[[portfolio](team/hmuumyatmoe.md)]
* Role: Developer
-* Responsibilities: Dev Ops + Threading
+* Responsibilities: Documentation & Code Quality
-### James Doe
+### Chong Wei Guan
-
+
-[[github](http://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+[[github](https://github.com/chongweiguan)]
+[[portfolio](team/chongweiguan.md)]
* Role: Developer
-* Responsibilities: UI
+* Responsibilities: Deliverables & Deadlines
diff --git a/docs/DevOps.md b/docs/DevOps.md
index d2fd91a6001..c8033acae4a 100644
--- a/docs/DevOps.md
+++ b/docs/DevOps.md
@@ -73,7 +73,7 @@ Any warnings or errors will be printed out to the console.
Here are the steps to create a new release.
-1. Update the version number in [`MainApp.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/MainApp.java).
+1. Update the version number in [`MainApp.java`](https://github.com/AY2223S2-CS2103T-W15-2/tp/blob/master/src/main/java/trackr/MainApp.java).
1. Generate a fat JAR file using Gradle (i.e., `gradlew shadowJar`).
1. Tag the repo with the version number. e.g. `v0.1`
1. [Create a new release using GitHub](https://help.github.com/articles/creating-releases/). Upload the JAR file you created.
diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md
index 46eae8ee565..75659575557 100644
--- a/docs/DeveloperGuide.md
+++ b/docs/DeveloperGuide.md
@@ -2,246 +2,626 @@
layout: page
title: Developer Guide
---
-* Table of Contents
-{:toc}
---------------------------------------------------------------------------------------------------------------------
+# Overview
+
+Trackr is a desktop application catered towards home businesses to track their _suppliers_, _customers_, _orders_, _menu items_ and _tasks_. It is designed for users who are quick typers to accomplish their tasks through the _Command Line Interface (CLI)_ while reaping the benefits of a _Graphical User Interface (GUI)_.
+
+
+
+:bulb: **Tip**
-## **Acknowledgements**
+Texts that are in _italics_ are further explained in the [Glossary section](#46-glossary).
-* {list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}
+
+
+# About This Guide
+
+This guide is intended for developers who want to work on **Trackr** project, where the code base is available [here](https://github.com/AY2223S2-CS2103T-W15-2/tp).
+
+It explains the different components within the project and how they interact with each other.
+
+This is a guide for developers looking to contribute to the codebase. There are explanations as to how the project is setup and how each command works.
+
+You can click on the respective links below to read up on the relevant sections.
+
+# Table of Contents
+
+
+* [1 Introduction](#1-introduction)
+ * [1.1 Setting up, getting started](#11-setting-up-getting-started)
+ * [1.2 About Us](#12-about-us)
+ * [1.3 Acknowledgements](#13-acknowledgements)
+* [2 Design](#2-design)
+ * [2.1 Architecture](#21-architecture)
+ * [2.1.1 Main components of the architecture](#211-main-components-of-the-architecture)
+ * [2.1.2 How the architecture components interact with each other](#212-how-the-architecture-components-interact-with-each-other)
+ * [2.2 UI component](#22-ui-component)
+ * [2.3 Logic component](#23-logic-component)
+ * [2.4 Model component](#24-model-component)
+ * [2.4.1 Item](#241-item)
+ * [2.4.2 Supplier & Customer](#242-supplier--customer)
+ * [2.4.3 Task](#243-task)
+ * [2.4.4 Menu](#244-menu)
+ * [2.4.5 Order](#245-order)
+ * [2.5 Storage component](#25-storage-component)
+ * [2.6 Common classes](#26-common-classes)
+* [3 Implementation](#3-implementation)
+ * [3.1 AddXYZCommand](#31-addxyzcommand)
+ * [3.2 DeleteXYZCommand](#32-deletexyzcommand)
+ * [3.3 EditXYZCommand](#33-editxyzcommand)
+ * [3.4 FindXYZCommand](#34-findxyzcommand)
+ * [3.5 ListXYZCommand](#35-listxyzcommand)
+ * [3.6 SortXYZCommand](#36-sortxyzcommand)
+ * [3.7 ClearXYZCommand](#37-clearxyzcommand)
+ * [3.8 TabCommand](#38-tabcommand)
+ * [3.9 HelpCommand](#39-helpcommand)
+ * [3.10 ExitCommand](#310-exitcommand)
+* [4 Appendix](#4-appendix)
+ * [4.1 Documentation, logging, testing, configuration, dev-ops](#41-documentation-logging-testing-configuration-dev-ops)
+ * [4.2 Product scope](#42-product-scope)
+ * [4.3 User stories](#43-user-stories)
+ * [4.4 Use cases](#44-use-cases)
+ * [4.5 Non-Functional Requirements](#45-non-functional-requirements)
+ * [4.6 Glossary](#46-glossary)
+ * [4.7 Planned Enhancements](#47-planned-enhancements)
+ * [4.8 Instructions for manual testing](#48-instructions-for-manual-testing)
+ * [Launch and shutdown](#launch-and-shutdown)
+ * [Adding a supplier](#adding-a-supplier)
+ * [Adding a task](#adding-a-task)
+ * [Adding an order](#adding-an-order)
+ * [Adding a menu item](#adding-a-menu-item)
+ * [Editing supplier](#editing-supplier)
+ * [Editing task](#editing-task)
+ * [Editing order](#editing-order)
+ * [Editing menu item](#editing-menu-item)
+ * [Find supplier](#find-supplier)
+ * [Find task](#find-task)
+ * [Find order](#find-order)
+ * [Find menu item](#find-menu-item)
+ * [Delete supplier](#delete-supplier)
+ * [Delete task](#delete-task)
+ * [Delete order](#delete-order)
+ * [Delete menu item](#delete-menu-item)
+ * [Sort task](#sort-task)
+ * [Sort order](#sort-order)
+ * [List all suppliers](#list-all-suppliers)
+ * [List all tasks](#list-all-tasks)
+ * [List all orders](#list-all-orders)
+ * [List all menu items](#list-all-menu-items)
+ * [Clear all suppliers](#clear-all-suppliers)
+ * [Clear all tasks](#clear-all-tasks)
+ * [Clear all orders](#clear-all-orders)
+ * [Clear all menu items](#clear-all-menu-items)
+ * [Switch tabs](#switch-tabs)
+
--------------------------------------------------------------------------------------------------------------------
-## **Setting up, getting started**
+# 1 Introduction
+
+## 1.1 Setting up, getting started
+
+Refer to the guide [here](SettingUp.md) on how to set up your own version of our project.
-Refer to the guide [_Setting up and getting started_](SettingUp.md).
+## 1.2 About Us
+
+For more information about our team, you can refer to this webpage [here](AboutUs.md).
+
+## 1.3 Acknowledgements
+
+* This project is based on the AddressBook-Level3 (AB3) project created by the [SE-EDU initiative](https://se-education.org).
+* If you would like to contribute code to the parent project (AddressBook-Level3), see [se-education.org](https://se-education.org#https://se-education.org/#contributing) for more info.
--------------------------------------------------------------------------------------------------------------------
-## **Design**
+# 2 Design
+
+This section will show our design methodology on the different components and how they interact with each other.
-: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/AY2223S2-CS2103T-W15-2/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.
+
-### Architecture
+## 2.1 Architecture
-
+
+
+ Figure 1: Architecture Class Diagram
+
The ***Architecture Diagram*** given above explains the high-level design of the App.
Given below is a quick overview of main components and how they interact with each other.
-**Main components of the architecture**
+### 2.1.1 Main components of the architecture
-**`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,
-* 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.
+**`Main`** has two classes called [`Main`](https://github.com/AY2223S2-CS2103T-W15-2/tp/blob/master/src/main/java/trackr/Main.java) and [`MainApp`](https://github.com/AY2223S2-CS2103T-W15-2/tp/blob/master/src/main/java/trackr/MainApp.java). It is responsible for,
-[**`Commons`**](#common-classes) represents a collection of classes used by multiple other components.
+* At app launch: Initializing the components in the correct sequence, and connecting them up with each other.
+* At shut down: Shutting down the components and invoking cleanup methods where necessary.
-The rest of the App consists of four components.
+[**`Commons`**](#26-common-classes) represents a collection of classes used by multiple other components.
-* [**`UI`**](#ui-component): The UI of the App.
-* [**`Logic`**](#logic-component): The command executor.
-* [**`Model`**](#model-component): Holds the data of the App in memory.
-* [**`Storage`**](#storage-component): Reads data from, and writes data to, the hard disk.
+The rest of the App consists of four components.
+* [**`UI`**](#22-ui-component): The UI of the App.
+* [**`Logic`**](#23-logic-component): The command executor.
+* [**`Model`**](#24-model-component): Holds the data of the App in memory.
+* [**`Storage`**](#25-storage-component): Reads data from, and writes data to, the hard disk.
-**How the architecture components interact with each other**
+### 2.1.2 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 `delete_supplier 1`.
-
+
Each of the four main components (also shown in the diagram above),
-* defines its *API* in an `interface` with the same name as the Component.
-* implements its functionality using a concrete `{Component Name}Manager` class (which follows the corresponding API `interface` mentioned in the previous point.
+* defines its API in an `interface` with the same name as the Component.
+* implements its functionality using a concrete `{Component Name}Manager` class (which follows the corresponding API `interface` mentioned in the previous point).
-For example, the `Logic` component defines its API in the `Logic.java` interface and implements its functionality using the `LogicManager.java` class which follows the `Logic` interface. Other components interact with a given component through its interface rather than the concrete class (reason: to prevent outside component's being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.
+For example, the `Logic` component defines its API in the `Logic.java` interface and implements its functionality using the `LogicManager.java` class which follows the `Logic` interface. Other components interact with a given component through its interface rather than the concrete class (Reason: to prevent components outside from being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.
-
+
+
+ Figure 3: Logic Class Diagram
+
-The sections below give more details of each component.
+The sections below give more details of each component.
-### UI component
+## 2.2 UI component
-The **API** of this component is specified in [`Ui.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/Ui.java)
+The **API** of this component is specified in [`Ui.java`](https://github.com/AY2223S2-CS2103T-W15-2/tp/blob/master/src/main/java/trackr/ui/Ui.java)
-
+
+
+ Figure 4: UI Class Diagram
+
-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 which captures the commonalities between classes that represent parts of the visible GUI.
+The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `TabPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible GUI.
-The `UI` component uses the 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 the 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/AY2223S2-CS2103T-W15-2/tp/blob/master/src/main/java/trackr/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/AY2223S2-CS2103T-W15-2/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.
* keeps a reference to the `Logic` component, because the `UI` relies on the `Logic` to execute commands.
-* depends on some classes in the `Model` component, as it displays `Person` object residing in the `Model`.
+* depends on some classes in the `Model` component, as it displays `Order`, `Task` or `Menu` object residing in the `Model`.
-### Logic component
+## 2.3 Logic component
-**API** : [`Logic.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/logic/Logic.java)
+**API** : [`Logic.java`](https://github.com/AY2223S2-CS2103T-W15-2/tp/blob/master/src/main/java/trackr/logic/Logic.java)
Here's a (partial) class diagram of the `Logic` component:
-
+
+
+ Figure 5: Logic Class Diagram
+
How the `Logic` component works:
-1. When `Logic` is called upon to execute a command, it uses the `AddressBookParser` class to parse the user command.
-1. This results in a `Command` object (more precisely, an object of one of its subclasses e.g., `AddCommand`) which is executed by the `LogicManager`.
-1. The command can communicate with the `Model` when it is executed (e.g. to add a person).
-1. The result of the command execution is encapsulated as a `CommandResult` object which is returned back from `Logic`.
-The Sequence Diagram below illustrates the interactions within the `Logic` component for the `execute("delete 1")` API call.
+1. When `Logic` is called upon to execute a command, it uses the `TrackrParser` class to parse the user command.
+2. This results in a `Command` object, which is actually an object of one of its subclasses' (e.g. `AddItemCommand`'s) subclasses (e.g. `AddOrderCommand`). This specific command will then be executed by the `LogicManager`.
+3. The command can communicate with the `Model` when it is executed (e.g. to add an order).
+4. The result of the command execution is encapsulated as a `CommandResult` object which is returned by `Logic`.
+
+The Sequence Diagram below illustrates the interactions within the `Logic` component for the `execute("delete_order 1")` API call.
+
+
+
+:information_source: **Note:**
-
+The lifeline for `DeleteOrderCommandParser` 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 `DeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Here are the other classes in `Logic` (omitted from the class diagram above) that are used for parsing a user command:
-
+
+
+ Figure 7: Parser Class Diagram
+
How the parsing works:
-* When called upon to parse a user command, the `AddressBookParser` class creates an `XYZCommandParser` (`XYZ` is a placeholder for the specific command name e.g., `AddCommandParser`) which uses the other classes shown above to parse the user command and create a `XYZCommand` object (e.g., `AddCommand`) which the `AddressBookParser` returns back as a `Command` object.
-* All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing.
-### Model component
-**API** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java)
+* When called upon to parse a user command, the `TrackrParser` class creates an `XYZCommandParser` (`XYZ` is a placeholder for the specific command name e.g., `AddOrderCommandParser`) which uses the other classes shown above to parse the user command and create a `XYZCommand` object (e.g., `AddOrderCommand`) which the `TrackrParser` returns back as a `Command` object.
+* All `XYZCommandParser` classes (e.g., `AddOrderCommandParser`, `DeleteOrderCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing.
-
+## 2.4 Model component
+**API** : [`Model.java`](https://github.com/AY2223S2-CS2103T-W15-2/tp/blob/master/src/main/java/trackr/model/Model.java)
+
+
+
+ Figure 8: Model Class Diagram
+
The `Model` component,
-* stores the address book data i.e., all `Person` objects (which are contained in a `UniquePersonList` object).
-* stores the currently 'selected' `Person` objects (e.g., results of a search query) as a separate _filtered_ list which is exposed to outsiders as 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.
+* `XYZ` is a placeholder for the specific object (e.g., `Supplier`, `Task`), which are all `Item` objects.
+* stores trackr data (all `XYZ` objects which are contained in their respective `UniqueXYZList` object).
+* stores currently 'selected' `XYZ` objects (e.g., results of search query) as a **separate filtered list** which is exposed to outsiders as an unmodifiable `ObservableList` that can be viewed (e.g. UI is bound to this list so that the UI automatically updates when the data in the list changes).
* stores a `UserPref` object that represents the user’s preferences. This is exposed to the outside as a `ReadOnlyUserPref` objects.
-* does not depend on any of the other three components (as the `Model` represents data entities of the domain, they should make sense on their own without depending on other components)
+* does not depend on any of the other three components (as the `Model` represents data entities of the domain, they should make sense on their own without depending on other components).
-
: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` objects.
+### 2.4.1 Item
-
+Here is the `Item` class that is what all model objects depend on.
-
+
+
+ Figure 9: Item Class Diagram
+
+
+Each `ItemList` contains a `UniqueItemList` that stores a list of unique `Items`, which are defined by a model definition (e.g., `Supplier` or `Task` from `ModelEnum`).
+
+### 2.4.2 Supplier & Customer
+
+This is the class representation for the `Supplier` and `Customer` class.
+
+
+
+ Figure 10: Person Class Diagram
+
+
+Here is how `Supplier` and `Customer` works:
+* `Supplier` and `Customer` inherit off `Person` class, which depends on the `Item` class.
+* Each `Person` contains their name, phone number, deadline, email and _tags_. (e.g., `PersonAddress` represents the address)
+* The `Supplier` and `Customer` object have their corresponding `List` and `UniqueList` that stores their information.
-### Storage component
+### 2.4.3 Task
-**API** : [`Storage.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/storage/Storage.java)
+This is the class representation for the `Task` class.
-
+
+
+ Figure 11: Task Class Diagram
+
+
+Here is how `Task` works:
+
+* Each `Task` contains their name, deadline, _status_ and time added (e.g., `TaskName` for task name).
+* Each of the attributes inherits off the corresponding `common` classes (e.g., `TaskName` inherit off `Name`).
+* The `Task` object have its `List` and `UniqueList`.
+* The LocalDateTime object represents the time the task was added to the list (which is used when sorting tasks).
+
+### 2.4.4 Menu
+
+This is the class representation for the `Menu` class.
+
+
+
+ Figure 12: Menu Class Diagram
+
+
+Here is how `Menu` works:
+
+* Each `MenuItem` contains their name, selling price, cost and profit (e.g., `ItemName` for menu's item name).
+* The `MenuItem`'s `ItemName` attribute inherit off the corresponding `common` classes (e.g., `ItemName` inherit off `Name`).
+* The`ItemProfit` is obtained using `ItemSellingPrice` and `ItemCost`(i.e. `ItemProfit` depends on `ItemSellingPrice` and `ItemCost`).
+* `ItemSellingPrice` and `ItemCost` class inherits off the `ItemPrice` class.
+* The `MenuItem` object have its `List` called `Menu` and `UniqueList`.
+* The `MenuItem` is an attribute of `Order`.
+
+**Aspect: Choice to provide a menu package:**
+
+* **Option 1 (our choice):** Separating it into a separate `menu` package.
+ * Advantage 1: Ensure that the Order name added is a valid item on the menu, which prevents users from accidentally keying in a wrong order name.
+ * Advantage 2: Allows user to see more details of the menu item in a separate tab (e.g. users can see a selling price, cost price and profit for each item)
+ * Disadvantage: More time required to implement.
+
+* **Option 2:** Add item name as an attribute in the `Order` class.
+ * Advantage: Convenient to implement.
+ * Disadvantage: Higher chance of conflicts with another developer working on `Order` class.
+
+### 2.4.5 Order
+
+This is the class representation for the `Order` class.
+
+
+
+ Figure 13: Order Class Diagram
+
+
+Here is how `Order` works:
+
+* Each `Order` contains a menu item(from a locally stored menu), customer, quantity, status, deadline and time added (e.g., `OrderStatus` for order's status).
+* The menu item and customer each contains attributes as mentioned in their respective section above on how `Menu` and `Customer` works.
+* The `Order`'s `OrderDeadline` and `OrderStatus` attribute inherit off the corresponding `common` classes (e.g., `OrderDeadline` inherit off `Deadline`).
+* The `Order` object have its `List` called `OrderList` and `UniqueList`.
+* The LocalDateTime object represents the time the order was added to the list (which is used when sorting orders).
+
+## 2.5 Storage component
+
+**API** : [`Storage.java`](https://github.com/AY2223S2-CS2103T-W15-2/tp/blob/master/src/main/java/trackr/storage/Storage.java)
+
+
+
+ Figure 14: Storage Class Diagram
+
The `Storage` component,
-* can save both address book data and user preference data in json format, and read them back into corresponding objects.
-* inherits from both `AddressBookStorage` and `UserPrefStorage`, which means it can be treated as either one (if only the functionality of only one is needed).
+
+* can save both Trackr data and user preference data in json format, and read them back into corresponding objects.
+* inherits from both `TrackrStorage` and `UserPrefStorage`, which means it can be treated as either one (if only the functionality of only one is needed).
* depends on some classes in the `Model` component (because the `Storage` component's job is to save/retrieve objects that belong to the `Model`)
-### Common classes
+## 2.6 Common classes
-Classes used by multiple components are in the `seedu.addressbook.commons` package.
+Classes used by multiple components are in the `trackr.commons` package.
--------------------------------------------------------------------------------------------------------------------
-## **Implementation**
+# 3 Implementation
-This section describes some noteworthy details on how certain features are implemented.
+This section describes the details on how the commands are implemented. After every command, the new state of all of Trackr's data is saved into the data file.
-### \[Proposed\] Undo/redo feature
+
-#### Proposed Implementation
+:information_source: **Notes about the command format**
-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:
+* The commands below are in the format `Command`.
+* `` represents the action the user can do.
+ e.g. `add`, `edit`and `find`
+* `XYZ` represents the type of data the user can input.
+ e.g. `Supplier`, `Order` and `Task`
+ * Note: If there are specific instances where `XYZ` represents a limited number of types, it would be stated within the description.
-* `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.
+## 3.1 AddXYZCommand
-Given below is an example usage scenario and how the undo/redo mechanism behaves at each step.
+The `add` command creates a `XYZ` object and adds it into `XYZList` and `FilteredXYZList`. It also saves into the internal `XYZList`, which stores all the `XYZ` objects, that matches the provided keywords.
-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.
+The keywords that can be provided are the attributes as seen in the corresponding `XYZ`'s class diagram.
+For example, `n/` would be followed by a task name for `AddTaskCommand` and supplier name for `AddSupplierCommand`.
-
+The parser for the `add` command would extract out the arguments corresponding to each particular field.
-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.
+The following activity diagram summarizes what happens when the user executes the `add` command.
-
+
+
+ Figure 15: Add Command Activity Diagram
+
-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`.
+
-
+:information_source: **Information on parameters for add command**
-
: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`.
+* You can see the specific parameters allowed for [Supplier](UserGuide.md#211-adding-a-supplier-add_supplier), [Order](UserGuide.md#212-adding-an-order-add_order), [Task](UserGuide.md#213-adding-a-task-add_task) and [Menu Item](UserGuide.md#214-adding-a-menu-item-add_item).
+* For more information on the specifications of the different attributes, you can look [here](UserGuide.md#61-prefix-summary).
-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.
+**Why is it implemented this way**
+
+The `AddXYZCommand` is an improved version of the original AB3 `AddCommand` by implementing into an abstract class - `AddItemCommand`.
+This reduces repeated lines of code and improves ease of implementation for future commands that require adding an item to a list.
+
+## 3.2 DeleteXYZCommand
+
+The `delete` command removes a `XYZ` object from internal `FilteredXYZList` and `XYZList`.
+
+The command only accepts 1 argument without any prefixes. The argument corresponds to the index of `XYZ` in the `FilteredXYZList` that the user wishes to delete using a one-based index.
+
+The parser for `delete` command extracts the index found in the arguments. If the argument is valid, then zero-based index is used to remove `XYZ` from the `XYZList`.
+
+The following activity diagram summarizes what happens when the user executes the `delete` command.
+
+
+
+ Figure 16: Delete Command Activity Diagram
+
+
+**Why is it implemented this way**
+
+The `DeleteXYZCommand` is an improved version of the original _AB3_ `DeleteCommand` by implementing into an abstract class - `DeleteItemCommand`.
+This reduces repeated lines of code and improves ease of implementation for future commands that require removing an item from a list.
-
+## 3.3 EditXYZCommand
-
: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 `edit` command edits a `XYZ` item from the internal `XYZList`.
+
+This command requires user to key in the index of `XYZ` in the `FilteredXYZList` that the user wishes to edit using a one-based index.
+
+The keywords that can be provided are the attributes as seen in the corresponding `XYZ`'s class diagram.
+For example, `n/` would be followed by a task name for `AddTaskCommand` and supplier name for `AddSupplierCommand`.
+
+
+
+:information_source: **Information on parameters for edit command**
+
+* You can see the specific parameters allowed for [Supplier](UserGuide.md#221-editing-a-supplier-edit_supplier), [Order](UserGuide.md#222-editing-an-order-edit_order), [Task](UserGuide.md#223-editing-a-task-edit_task) and [Menu Item](UserGuide.md#224-editing-a-menu-item-edit_item).
+* For more information on the specifications of the different attributes, you can look [here](UserGuide.md#61-prefix-summary).
-The following sequence diagram shows how the undo operation works:
+The user is required to key in at least one keyword to be edited.
+
+The parser for `edit` command parses and extracts out the arguments corresponding to each particular field.
+
+The following activity diagram summarizes what happens when the user executes the `edit` command.
+(The rake symbol used in the Figure 17: Edit Command Activity Diagram has been implemented with reference to [this forum](https://forum.plantuml.net/195/is-there-any-support-for-subactivity-or-the-rake-symbol).)
+
+
+
+ Figure 17: Edit Command Activity Diagram
+
+
+
+
+ Figure 18: Edit Item XYZ Activity Diagram
+
+
+**Why is it implemented this way**
+
+The `EditXYZCommand` is an improved version of the original _AB3_ `EditCommand` by implementing into an abstract class - `EditItemCommand`.
+This reduces repeated lines of code and improves ease of implementation for future commands that require editing an item in a list.
+
+## 3.4 FindXYZCommand
+
+The `find` command finds `XYZ` objects from the internal `XYZList` (which stores all the `XYZ` objects) that matches the provided keywords.
+
+The keywords that can be provided varies for each command and can be found in the user guide.
+
+
-
+:information_source: **Information on parameters for add command**
-
: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.
+* You can see the specific parameters allowed for [Supplier](UserGuide.md#231-finding-a-supplier-find_supplier), [Order](UserGuide.md#232-finding-an-order-find_order), [Task](UserGuide.md#233-finding-a-task-find_task) and [Menu Item](UserGuide.md#234-finding-a-menu-item-find_item).
+* For more information on the specifications of the different attributes, you can look [here](UserGuide.md#61-prefix-summary).
-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.
+The parser for the `find` command would extract out the arguments corresponding to each particular field.
+
+A `XYZContainsKeywordPredicate` is built upon these fields, which is used to test each `XYZ` object in the `XYZList` on whether they match the keywords provided.
+
+The following activity diagram summarizes what happens when the user executes the `find` command.
+
+
+
+ Figure 19: Find Command Activity Diagram
+
+
+**Why is it implemented this way**
+
+The `FindXYZCommand` is an improved version of the original _AB3_ `FindCommand` by implementing into an abstract class - `FindItemCommand`.
+This reduces repeated lines of code and improves ease of implementation for future commands that require finding an item in a list.
+
+The abstract class `ItemDescriptor` stores the details of an item. It provides easier implementation for `XYZContainsKeywordPredicate` classes.
+
+## 3.5 ListXYZCommand
+
+The `list` command retrieves all the `XYZ` objects from the `XYZList` and lists them all in the internal `FilteredXYZList`.
+
+The `FilteredXYZList` is then updated to have all `XYZ` objects, after which it will then to shown to the user.
+
+The following activity diagram summarizes what happens when the user executes the `list` command.
+
+
+
+ Figure 20: List Command Activity Diagram
+
+
+**Why is it implemented this way**
+
+The `ListXYZCommand` is an improved version of the original _AB3_ `ListCommand` by implementing into an abstract class - `ListItemCommand`.
+This reduces repeated lines of code and improves ease of implementation for future commands that require listing all item of the same data type.
+
+
-
: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.
+## 3.6 SortXYZCommand
+
+
+
+:information_source: **Information on `XYZ`**
+
+* `XYZ` for `sort` only refers to tasks and orders.
-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.
+The `sort` command sorts `XYZ` objects in the internal `FilteredXYZList` according to a selected criteria.
+
+The command only accepts 1 argument without the prefix `c/`. This argument is optional, and it corresponds to the criteria the user wishes to sort the list by.
+
+The parser for the `sort` command would extract out the criteria. If no criteria is given, it will be defaulted to `Status and Deadline`.
+
+A `SortXYZComparator` is used to define how two `XYZ` objects should be compared and sorted.
+
+The following activity diagram summarizes what happens when the user executes the `sort` command.
+
+
+
+ Figure 21: Sort Command Activity Diagram
+
+
+**Why is it implemented this way**
+
+Unlike the other commands, the `SortXYZCommand` does not implement an abstract class like `SortItemCommand`.
+It simply extends Command as there are only two sort commands (one for orders and one for tasks).
+
+Although abstracting out an abstract class would ease implementation for future sort commands, it is not currently planned.
+However, this might be changed in the future to follow the syntax of the other commands.
+
+## 3.7 ClearXYZCommand
+
+The `clear` command removes **all** `XYZ` object from internal `FilteredXYZList` and `XYZList`.
+
+The following activity diagram summarizes what happens when the user executes the `delete` command.
-
+
+
+ Figure 22: Clear Command Activity Diagram
+
-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.
+**Why is it implemented this way**
-
+The `ClearXYZCommand` is an improved version of the original _AB3_ `ClearCommand` by implementing into an abstract class - `ClearItemCommand`.
+This reduces repeated lines of code and improves ease of implementation for future commands that require clearing all item from the list.
-The following activity diagram summarizes what happens when a user executes a new command:
+## 3.8 TabCommand
-
+`TabCommand` switches tabs on the application through CLI commnads. The user can switch tabs with the `TabCommand` or any of `ListXYZCommand` or `FindXYZCommand` which brings the user to the relevant `XYZ` tab.
-#### Design considerations:
+The following activity diagram summarizes what happens when the user executes the `tab` command.
-**Aspect: How undo & redo executes:**
+
+
+ Figure 23: Tab Command Activity Diagram
+
-* **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.
-_{more aspects and alternatives to be added}_
+**Why is it implemented this way**
-### \[Proposed\] Data archiving
+An `Observable` property of `JavaFx` is used so that an `ObservableTabIndex` class can be created. This reduces the coupling between `Logic` which executes the command and `Ui` components. The `Ui` listens for changes in the `ObservableTabIndex`. As `Ui` is only aware of `ObservableTabIndex` but not `Logic`, this also enforces principle of least knowledge.
-_{Explain here how the data archiving feature will be implemented}_
+## 3.9 HelpCommand
+The `help` command brings up a [HelpWindow](https://github.com/AY2223S2-CS2103T-W15-2/tp/blob/master/src/main/java/trackr/ui/HelpWindow.java), where there is a link to the User Guide of Trackr. The user can also press `F1` or click `Help` the menu bar to bring it up.
+
+This will allow the users to be able to have a reference to all the commands and explanation within a single webpage.
+
+**Why is it implemented this way**
+
+The `HelpCommand` is the same original command as from _AB3_, just with the link updated to this project.
+
+## 3.10 ExitCommand
+
+The `exit` command allows the users to exit Trackr via the command line.
+
+**Why is it implemented this way**
+
+The `ExitCommand` is the same original command as from _AB3_.
--------------------------------------------------------------------------------------------------------------------
-## **Documentation, logging, testing, configuration, dev-ops**
+# 4 Appendix
+
+## 4.1 Documentation, logging, testing, configuration, dev-ops
+
+Please refer to the respective guides below for other information.
* [Documentation guide](Documentation.md)
* [Testing guide](Testing.md)
@@ -249,88 +629,391 @@ _{Explain here how the data archiving feature will be implemented}_
* [Configuration guide](Configuration.md)
* [DevOps guide](DevOps.md)
---------------------------------------------------------------------------------------------------------------------
+## 4.2 Product scope
-## **Appendix: Requirements**
+**Target user profile**:
-### Product scope
+* Tech-savvy home businesses owners who:
+ * lists their products online or on their own website
+ * perform transactions manually without a Point-of-Sale (POS) system
+ * Lack manpower/ time to track orders and contacts manually
+ * Has a need to manage a significant number of contacts
+* Prefer desktop apps over other types
+* Can type fast
+* Prefers typing to mouse interactions
+* Is reasonably comfortable using CLI apps
-**Target user profile**:
+**Value proposition**:
+
+Our application:
+
+* allows for consolidation of orders, contacts & tasks information which makes it easier to manage them. (but no _real-time automation_)
+* serves as a user-friendly alternative to free applications such as Microsoft Excel which may not be catered to their needs and requires tedious formatting. (but no support for custom formatting of interface)
+* enables faster contact management compared to a typical mouse/GUI driven app
-* has a need to manage a significant number of contacts
-* prefer desktop apps over other types
-* can type fast
-* prefers typing to mouse interactions
-* is reasonably comfortable using CLI apps
+## 4.3 User stories
-**Value proposition**: manage contacts faster than a typical mouse/GUI driven app
+**High Priority (Must Have)**
+| As a / an … | I want to … | So that I can… |
+| ------------ | --------------------------- | ---------------------------------------------------------------------- |
+| new user | have an instruction guide | understand how to use the application |
+| user | add new orders | have a consolidated place to keep track of my orders |
+| user | view all my orders | track my progress in dealing with the orders |
+| user | edit my orders | update my order status |
+| user | find my orders by keywords | get a specific order without manually searching for it |
+| user | delete my orders | remove unwanted old orders |
+| user | add new suppliers | easily find them from a consolidated location |
+| user | find suppliers by keywords | get the relevant supplier information from a specific supplier contact |
+| user | edit my supplier contacts | update past supplier contacts with current information |
+| user | delete my supplier contacts | remove supplier contacts not used anymore |
+| user | add new tasks | keep track of business tasks from the same application |
+| user | find tasks by keywords | get all relevant tasks that are related to plan my schedule |
+| user | edit my tasks | update my progress on the task |
+| user | delete my tasks | remove old completed tasks |
-### User stories
+**Medium Priority (Nice to Have)**
-Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unlikely to have) - `*`
+| As a / an … | I want to … | So that I can… |
+| -------------- | ---------------------- | --------------------------------------------------------- |
+| business owner | add my menu items | add orders based on my menu items |
+| business owner | edit my menu items | update my price and cost based on current rates |
+| business owner | delete menu items | remove unpopular items that are not sold anymore |
+| user | have my orders sorted | view my upcoming orders that are not done yet |
+| user | have my tasks sorted | view the most pressing tasks at first glance |
+| expert user | be able to export data | keep track of past orders without lagging the application |
-| 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 |
+**Low Priority (Upcoming)**
-*{More to be added}*
+| As a / an … | I want to … | So that I can… |
+| ------------ | --------------------------- | ------------------------------------------------- |
+| expert user | be able to import past data | use the application easily when transferring data |
-### Use cases
+## 4.4 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 `Trackr` and the **Actor** is the `Home Business Owner`)
-**Use case: Delete a person**
+**Use case: UC01 - Add a new supplier**
**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. Actor chooses to add a supplier
+2. Actor enters the command to add a supplier with the required information.
+3. Trackr saves the new supplier to the system.
+4. Trackr display success message that a new supplier added to the list
+5. Actor can see the new supplier information in the contacts list.
+ Use case ends.
+
+**Extensions**
+
+* 2a. Not all the required information was given.
+
+ * 2a1. Trackr shows an error message.
+
+ Use case resumes at step 2.
+
+* 2b. The Actor adds a supplier that already exists in the list.
+
+ * 2b1. Trackr shows an error message.
+
+ Use case ends.
+
+**Use case: UC11 - Add a new task**
+
+(Similar to UC01 except it is for task)
+
+**Use case: UC21 - Add a new order**
+
+**MSS**
+
+1. Actor chooses to add an order.
+2. Actor enters the command to add an order with the required information.
+3. Trackr saves the new order to the system.
+4. Trackr display success message that a new order added to the list
+5. Actor can see the new order information in the orders list.
+
+ Use case ends.
+
+**Extensions**
+
+* 2a. Not all the required information was given.
+
+ * 4a1. Trackr shows an error message.
+
+ Use case resumes at step 2.
+
+* 2b. The Actor adds an order that already exists in the list.
+
+ * 4b1. Trackr shows an error message.
+
Use case ends.
+* 2c. The item does not exist in menu
+ * 2c1. Trackr displays error message.
+ * 2c2. Actor adds a new menu item(UC31).
+
+ Use case resumes at step 2.
+
+
+**Use case: UC31 - Add a new menu item**
+
+(Similar to UC01 except it is for menu item)
+
+**Use case: UC02 - Delete a supplier**
+
+**MSS**
+
+1. Actor chooses to delete a supplier.
+2. Actor enters the command to list contacts.
+3. Trackr shows a list of contacts.
+4. Actor enters the command to delete a specific indexed contact from the list.
+5. Trackr deletes the contact.
+
+ Use case ends.
+
**Extensions**
* 2a. The list is empty.
Use case ends.
-* 3a. The given index is invalid.
+* 4a. The given index is invalid.
- * 3a1. AddressBook shows an error message.
+ * 4a1. Trackr shows an error message.
- Use case resumes at step 2.
+ Use case resumes at step 4.
+
+* 4b. No index was given.
+ * 4b1. Trackr shows an error message.
+
+ Use case resumes at step 4.
+
+
+**Use case: UC12 - Delete a task**
+
+(Similar to UC02 except it is for task)
+
+**Use case: UC22 - Delete an order**
+
+(Similar to UC02 except it is for order)
+
+**Use case: UC32 - Delete a menu item**
+
+(Similar to UC02 except it is for menu item)
+
+**Use case: UC03 - Edit a supplier**
+
+**MSS**
+
+1. Actor chooses to edit a supplier
+2. Actor enters the command to list contacts.
+3. Trackr shows a list of contacts.
+4. Actor enters an edit contact command for a specific contact and the updated information.
+5. Trackr updates the contact details with the new information.
+
+ Use case ends.
+
+**Extensions**
+
+* 2a. The list is empty.
+
+ Use case ends.
+
+* 3a. The Actor enters an invalid index.
+
+ * 3a1. Trackr displays an error message.
+
+ Use case resumes at step 3.
-*{More to be added}*
+* 3b. The Actor enters invalid information.
-### Non-Functional Requirements
+ * 3b1. Trackr displays an error message.
-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.
-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.
+ Use case resumes at step 3.
-*{More to be added}*
+* 3c. The Actor does not enter any information.
-### Glossary
+ * 3c1. Trackr displays an error message.
+
+ Use case resumes at step 3.
+
+**Use case: UC13 - Edit a task**
+
+(Similar to UC03 except it is for task)
+
+**Use case: UC23 - Edit an order**
+
+(Similar to UC03 except it is for order)
+
+**Use case: UC33 - Edit a menu item**
+
+(Similar to UC03 except it is for menu item)
+
+**Use case: UC04 - Finding a supplier**
+
+**MSS**
+
+1. Actor chooses to find a supplier
+2. Actor enter the command to find a supplier with the desired search criteria.
+3. Trackr searches for suppliers that match the given criteria.
+4. Trackr displays a list of suppliers that match the criteria.
+
+ Use case ends.
+
+**Extensions**
+
+* 2a. No search criteria was given.
+
+ * 2a1. Trackr displays an error message.
+
+ * Use case resumes at step 2.
+
+* 4a. No supplier matches the given search criteria.
+
+ * 4a1. Trackr display an empty list.
+
+ Use case ends.
+
+**Use case: UC14 - Find a task**
+
+(Similar to UC04 except it is for task)
+
+**Use case: UC24 - Find an order**
+
+(Similar to UC04 except it is for order)
+
+**Use case: UC34 - Find a menu item**
+
+(Similar to UC04 except it is for menu item)
+
+**Use case: UC15 - Sort tasks**
+
+**MSS**
+
+1. Actor chooses to sort tasks.
+2. Actor enters the command with the desired sorting criteria.
+3. Trackr sorts tasks according to the criteria.
+4. Trackr displays a list of tasks that are sorted.
+
+ Use case ends.
+
+**Extensions**
+
+* 2a. No sorting criteria was given.
+
+ * 2a1. Trackr sorts tasks based on default criteria.
+
+ * Use case ends.
+* 2b. Invalid sorting criteria was given.
+ * 2b1. Trackr displays error message.
+
+ Use case resumes at step 2.
+
+**Use case: UC25 - Sort orders**
+
+(Similar to UC15 except it is for order)
+
+**Use case: UC50 - Switch to another tab**
+
+**MSS**
+
+1. Actor enters the command to switch to another tab.
+2. Actor interacts with the tab menu.
+3. Trackr switches to the target tab.
+
+ Use case ends.
+
+## 4.5 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 200 supplier and customer contacts without a noticeable sluggishness in performance for typical usage.
+3. Should be able to hold up to 1000 order details without a noticeable sluggishness in performance for typical usage.
+4. Should be able to hold up to 200 tasks without a noticeable sluggishness in performance for typical usage.
+5. 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.
+6. Should store data locally only.
+
+--------------------------------------------------------------------------------------------------------------------
+
+## 4.6 Glossary
* **Mainstream OS**: Windows, Linux, Unix, OS-X
-* **Private contact detail**: A contact detail that is not meant to be shared with others
+* **CLI**: Command-Line Interface
+* **GUI**: Graphical User Interface
+* **AB3**: AddressBook-Level3 (The parent project this is based off on)
+* **Real-time automation**: Automatically update tasks or orders with deadlines that have passed as done or overdue.
+* **Supplier**: Supplier refers to someone whom the user seasonally or frequently orders goods from
+* **Customer**: Customer refers to someone whom the user receives an order from
+* **Order**: Order refers to the customers' orders the user accepts
+* **Task**: Task refers to any to-dos the user may have, it need not be related to suppliers or orders (For instance, it can be about tidying inventory)
+* **Menu Item**: Menu Item refers to any inventory/ stock that the user is selling to customers
+* **Tag**: Tags are associated with suppliers, users can tag the supplier with any keyword they want, number of tags are not restricted
+* **Status**: Statuses are associated with tasks and orders, one entry of task/order can only have one status and the type of status that can be added is restricted
+
+--------------------------------------------------------------------------------------------------------------------
+
+## 4.7 Planned Enhancements
+
+**1.** Ensure all the commands follow the standard format so that it is easier for the user to remember.
+Currently, some commands do not follow the standard format which requires a prefix in front of each parameter.
+For instance, `find_supplier` is of the format `find_supplier NAME` instead of `find_supplier n/NAME`.
+The format is shown below.
+
+
+
+**2.** Provide better success messages for edit commands.
+Currently, the edit commands shows ambiguous success or error messages to the user.
+For example editing a task return the success message, `Edited task: task`.
+We suggest a clearer and more comprehensive message such as `Edited task: ` where `` represents the edited data.
+Specifically, `Edited task: Buy eggs; Deadline:01 January 2023; Status: Not Done`.
+
+Proposed implementation:
+Currently, all the EditXYZCommand extends from the EditItemCommand and uses the success message format (`Edited %s: %1$s`) defined in EditItemCommand class.
+When an edit command is executed successfully, we generate the success message by replacing `%s` with the item type and `%1$s` with the string representation of the edited item object.
+We plan to change the format of the success message (by replacing `%1$s` to `%s`) to print out the entire string of instead of only printing out the first word which is the item name.
+
+**3.** Fix error messages for commands.
+Currently, some commands have an issue with their error message.
+For example, if there is a duplicate from this command `add_order on/Chocolate Cookies q/10 d/10/10/2023 n/Ben p/11111111 a/Ben Street`,
+the error message should be `This Order already exists in the order list`.
+However, currently, this error message is shown instead: `This Order already exists in the Chocolate Cookies; 10; Deadline: 10 October 2023; Status: Not Delivered; Customer: Ben; Phone: 11111111; Address: Ben Street list`.
+
+**4.** Improve validity checks for menu item's `PRICE` and `COST`.
+Currently, there is no comprehensive validity check for these two parameters, which might result in bugs shown within the application.
+Both `ItemSellingPrice` class (which represents the `PRICE` and `ItemCost` class (representing the `COST`) extends from the `ItemPrice` class (as seen in this [Class Diagram](#244-menu)).
+Thus, both `PRICE` and `COST` are checked with the same `ItemPrice::isValidPrice(String)` method.
+We plan to improve on this feature flaw by modifying this `isValidPrice(String)` method to check and limit the price and cost entered to be `1000` or less,
+so as to prevent a situation where an issue with the calculation occurs when excessively large numbers are keyed in.
+
+**5.** Improve validity check for order's and task's `DEADLINE`.
+Currently, the validity check for deadlines is not strict enough.
+For example, users are able to enter deadlines that are far away in the past like `01/01/1800`.
+Therefore, we plan to improve on this by only allowing users to key in deadlines that falls within the past 10 years.
+Since both `OrderDeadline` and `TaskDeadline` extends the common class `Deadline` and `Deadline::isValidDeadline` is used to check the validity of both parameters,
+we plan to simply tweak the implementation of `Deadline::isValidDeadline` for stricter checks on deadlines entered.
+
+**6.** Fix error in `find_order`.
+Currently, `find_order` only works on the last field that is typed into the command. Hence, it is ignoring the other fields.
+We plan to improve this feature to match `find_task` command where it would match the multiple fields if they are present in an `AND` format.
+Specifically, `find_order q/2 d/01/01/2024` would list all orders that have quantity of `2` and a deadline of `01/01/2024`.
--------------------------------------------------------------------------------------------------------------------
-## **Appendix: Instructions for manual testing**
+## 4.8 Instructions for manual testing
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.
+
+
+:information_source: **Note**
+
+These instructions only provide a starting point for testers to work on and testers are expected to do more exploratory testing.
@@ -347,31 +1030,560 @@ testers are expected to do more *exploratory* testing.
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.
- Expected: The most recent window size and location is retained.
+ Expected: The most recent window size and location is retained.
+
+1. Shutdown
+
+ 1. Execute the command `exit` or close the window using GUI by clicking the cross on the top-right hand corner.
+ Expected: The window will close and all the data will be saved.
+
+### Adding a supplier
+
+**Test Case 1**
+
+Context: There is **no** contact with the phone number `11111111` in Trackr.
+
+Action: Execute command `add_supplier n/Ben p/11111111 a/Ben Street e/ben@gmail.com`
+
+Expected Outcome:
+
+* New supplier `Ben` is added into the supplier list.
+* Success message shown in command result box.
+ Specifically, `New Supplier added: Ben; Phone: 11111111; Email: ben@gmail.com; Address: Ben Street`
+
+**Test Case 2**
+
+Context: There **is** a contact with the phone number `11111111` in Trackr.
+
+Action: Execute command `add_supplier n/Ben p/11111111 a/Ben Street e/ben@gmail.com`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `This Supplier already exists in the Supplier list`
+
+### Adding a task
+
+**Test Case 1**
+
+Context: There is **no** task with the name `Buy yeast` and deadline `10/10/2023` in Trackr.
+
+Action: Execute command `add_task n/Buy yeast d/10/10/2023`
+
+Expected Outcome:
+
+* New task `Buy yeast` is added into the task list.
+* Success message shown in command result box.
+ Specifically, `New Task added: Buy yeast; Deadline: 10 October 2023; Status: Not Done`
+
+**Test Case 2**
+
+Context: There **is** a task with the name `Buy yeast` and deadline `10/10/2023` in Trackr.
+
+Action: Execute command `add_task n/Buy yeast d/10/10/2023`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `This Task already exists in the Task list`
+
+### Adding an order
+
+**Test Case 1**
+
+Context: There is **no** order with the same customer, order item, deadline and quantity in Trackr.
+
+Action: Execute command `add_order on/Chocolate Cookies q/10 d/10/10/2023 n/Ben p/11111111 a/Ben Street`
+
+Expected Outcome:
+
+* New order is added into the order list.
+* Success message shown in command result box.
+ Specifically, `New Order added: Chocolate Cookies; 10; Deadline: 10 October 2023; Status: Not Delivered; Customer: Ben; Phone: 11111111; Address: Ben Street`
+
+**Test Case 2**
+
+Context: There **is** an order with the same customer, order item, deadline and quantity in Trackr.
+
+Action: Execute command `add_order on/Chocolate Cookies q/10 d/10/10/2023 n/Ben p/11111111 a/Ben Street`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `This Order already exists in the Chocolate Cookies; 10; Deadline: 10 October 2023; Status: Not Delivered; Customer: Ben; Phone: 11111111; Address: Ben Street list`
+ Note that there is an issue with the error message now and will be fixed in the future update.
+
+### Adding a menu item
+
+**Test Case 1**
+
+Context: There is **no** menu item with the name `Vanilla Cake` in Trackr.
+
+Action: Execute command `add_item n/Vanilla Cake pr/40 c/25`
+
+Expected Outcome:
+
+* New menu item `Vanilla Cake` is added into the menu.
+* Success message shown in command result box.
+ Specifically, `New Menu Item added: Vanilla Cake; Selling Price: $40.00; Cost: $25.00; Profit: $15.00`
+
+**Test Case 2**
+
+Context: There **is** a menu item with the name `Vanilla Cake` in Trackr.
+
+Action: Execute command `add_item n/Vanilla Cake pr/40 c/25`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `This Menu Item already exists in the Menu Item list`
+
+### Editing supplier
+
+**Test Case 1**
+
+Context: There **is** a supplier at index `1` and **no** suppliers with the new phone number `11111111` in Trackr.
+
+Action: Execute command `edit_supplier 1 p/11111111`
+
+Expected Outcome:
+
+* Edited **first** supplier with phone number `11111111`.
+* Success message shown in command result box.
+ Specifically, `Edited supplier: supplier`
+
+**Test Case 2**
+
+Context: There **is** a supplier at index `1` and **a** supplier with the new phone number `11111111` in Trackr.
+
+Action: Execute command `edit_supplier 1 p/11111111`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `This supplier already exists in the supplier list.`
+
+**Test Case 3**
+
+Context: There **is** no supplier at index `5` in Trackr.
+
+Action: Execute command `edit_supplier 5 p/11111111`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `The supplier index provided is invalid`
+
+### Editing task
+
+**Test Case 1**
+
+Context: There **is** a task at index `1` and **no** supplier with the new name `Buy eggs` and deadline `10/10/2023` in Trackr.
+
+Action: Execute command `edit_task 1 n/Buy eggs d/10/10/2023`
+
+Expected Outcome:
+
+* Edited **first** task with name `Buy eggs` and deadline `10/10/2023`.
+* Success message shown in command result box.
+ Specifically, `Edited task: task`
+
+**Test Case 2**
+
+Context: There **is** a task at index `1` and **a** supplier with the new name `Buy eggs` and deadline `10/10/2023` in Trackr.
+
+Action: Execute command `edit_task 1 n/Buy eggs d/10/10/2023`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `This task already exists in the task list.`
+
+**Test Case 3**
+
+Context: There **is** no task at index `5` in Trackr.
+
+Action: Execute command `edit_task 5 n/Buy eggs d/10/10/2023`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `The task index provided is invalid`
+
+### Editing order
+
+**Test Case 1**
+
+Context: There **is** an order at index `1` and **no** same details as edited order in Trackr.
+
+Action: Execute command `edit_order 1 a/John Street`
+
+Expected Outcome:
+
+* Edited **first** order with customer address `John Street`.
+* Success message shown in command result box.
+ Specifically, `Edited order: order`
+
+**Test Case 2**
+
+Context: There **is** an order at index `1` and **an** order with the same details as the edited order in Trackr.
+
+Action: Execute command `edit_order 1 a/John Street`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `This order already exists in the order list.`
+
+**Test Case 3**
+
+Context: There **is** no order at index `5` in Trackr.
+
+Action: Execute command `edit_task 5 n/Buy eggs d/10/10/2023`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `The order index provided is invalid`
+
+### Editing menu item
+
+**Test Case 1**
+
+Context: There **is** a menu item at index `1` and **no** menu items with same name `Chocolate Cookies` in Trackr.
+
+Action: Execute command `edit_item 1 n/Chocolate Cookies`
+
+Expected Outcome:
+
+* Edited **first** menu item with name `Chocolate Cookies`.
+* Success message shown in command result box.
+ Specifically, `Edited menu item: menu item`
+
+**Test Case 2**
+
+Context: There **is** a menu item at index `1` and **a** menu item with the same name `Chocolate Cookies` in Trackr.
+
+Action: Execute command `edit_item 1 n/Chocolate Cookies`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `This menu item already exists in the menu item list.`
+
+**Test Case 3**
+
+Context: There **is** no menu item at index `5` in Trackr.
+
+Action: Execute command `edit_item 1 n/Chocolate Cookies`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `The menu item index provided is invalid`
+
+### Find supplier
+
+**Test Case 1**
+
+Context: There **is** a supplier with name containing `John` in Trackr.
+
+Action: Execute command `find_supplier John`
+
+Expected Outcome:
+
+* Shows the **1** supplier with name containing `John`.
+* Success message shown in command result box.
+ Specifically, `1 suppliers listed!`
+
+### Find task
+
+**Test Case 1**
+
+Context: There **is** a task with name containing `Buy` in Trackr.
+
+Action: Execute command `find_task n/Buy`
+
+Expected Outcome:
+
+* Shows the **1** task with name containing `Buy`.
+* Success message shown in command result box.
+ Specifically, `1 tasks listed!`
+
+### Find order
+
+**Test Case 1**
+
+Context: There **is** an order with customer name containing `John` in Trackr.
+
+Action: Execute command `find_order n/John`
+
+Expected Outcome:
+
+* Shows the **1** order with customer name containing `Buy`.
+* Success message shown in command result box.
+ Specifically, `1 orders listed!`
+
+### Find menu item
+
+**Test Case 1**
+
+Context: There **is** a menu item with name containing `Chocolate` in Trackr.
+
+Action: Execute command `find_item Chocolate`
+
+Expected Outcome:
+
+* Shows the **1** menu item with name containing `Chocolate`.
+* Success message shown in command result box.
+ Specifically, `1 menu items listed!`
+
+### Delete supplier
+
+**Test Case 1**
+
+Context: There **is** a supplier at index `1` in Trackr.
+
+Action: Execute command `delete_supplier 1`
+
+Expected Outcome:
+
+* Deleted the **first** supplier.
+* Success message shown in command result box.
+
+**Test Case 2**
+
+Context: There **is** no supplier at index `5` in Trackr.
+
+Action: Execute command `delete_supplier 5`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `The supplier index provided is invalid`
+
+### Delete task
+
+**Test Case 1**
+
+Context: There **is** a task at index `1` in Trackr.
+
+Action: Execute command `delete_task 1`
+
+Expected Outcome:
+
+* Deleted the **first** task.
+* Success message shown in command result box.
+
+**Test Case 2**
+
+Context: There **is** no task at index `5` in Trackr.
+
+Action: Execute command `delete_task 5`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `The task index provided is invalid`
+
+### Delete order
+
+**Test Case 1**
+
+Context: There **is** an order at index `1` in Trackr.
+
+Action: Execute command `delete_order 1`
+
+Expected Outcome:
+
+* Deleted the **first** order.
+* Success message shown in command result box.
+
+**Test Case 2**
+
+Context: There **is** no order at index `5` in Trackr.
+
+Action: Execute command `delete_order 5`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `The order index provided is invalid`
+
+### Delete menu item
+
+**Test Case 1**
+
+Context: There **is** a menu item at index `1` in Trackr.
+
+Action: Execute command `delete_item 1`
+
+Expected Outcome:
+
+* Deleted the **first** menu item.
+* Success message shown in command result box.
+
+**Test Case 2**
+
+Context: There **is** no menu item at index `5` in Trackr.
+
+Action: Execute command `delete_item 5`
+
+Expected Outcome:
+
+* Error message shown in command result box.
+ Specifically, `The menu item index provided is invalid`
+
+### Sort task
+
+**Test Case 1**
+
+Context: There are tasks not sorted by name in Trackr.
+
+Action: Execute command `sort_task c/Name`
+
+Expected Outcome:
+
+* Sorted tasks by name in alphabetical order (Task name starting with `A` at the top and `Z` at the bottom).
+* Success message shown in command result box.
+ Specifically, `Tasks sorted!`
+
+### Sort order
+
+**Test Case 1**
+
+Context: There are orders not sorted by order item name in Trackr.
+
+Action: Execute command `sort_order c/Name`
+
+Expected Outcome:
+
+* Sorted orders by menu item name in alphabetical order (Menu item name starting with `A` at the top and `Z` at the bottom).
+* Success message shown in command result box.
+ Specifically, `Orders sorted!`
+
+### List all suppliers
+
+**Test Case 1**
+
+Context: None.
+
+Action: Execute command `list_supplier`
+
+Expected Outcome:
+
+* List and shows all suppliers.
+* Success message shown in command result box.
+ Specifically, `Listed all suppliers`
+
+### List all tasks
+
+**Test Case 1**
+
+Context: None.
+
+Action: Execute command `list_task`
+
+Expected Outcome:
+
+* List and shows all tasks.
+* Success message shown in command result box.
+ Specifically, `Listed all tasks`
+
+### List all orders
+
+**Test Case 1**
+
+Context: None.
+
+Action: Execute command `list_order`
+
+Expected Outcome:
+
+* List and shows all orders.
+* Success message shown in command result box.
+ Specifically, `Listed all orders`
+
+### List all menu items
+
+**Test Case 1**
+
+Context: None.
+
+Action: Execute command `list_menu`
+
+Expected Outcome:
+
+* List and shows all menu items.
+* Success message shown in command result box.
+ Specifically, `Listed all menu items`
+
+### Clear all suppliers
+
+**Test Case 1**
+
+Context: None.
+
+Action: Execute command `clear_supplier`
+
+Expected Outcome:
+
+* Cleared all suppliers.
+* Success message shown in command result box.
+ Specifically, `Supplier list has been cleared!`
+
+### Clear all tasks
+
+**Test Case 1**
+
+Context: None.
+
+Action: Execute command `clear_task`
+
+Expected Outcome:
+
+* Cleared all tasks.
+* Success message shown in command result box.
+ Specifically, `Task list has been cleared!`
+
+### Clear all orders
+
+**Test Case 1**
+
+Context: None.
+
+Action: Execute command `clear_order`
+
+Expected Outcome:
+
+* Cleared all orders.
+* Success message shown in command result box.
+ Specifically, `Order list has been cleared!`
-1. _{ more test cases … }_
+### Clear all menu items
-### Deleting a person
+**Test Case 1**
-1. Deleting a person while all persons are being shown
+Context: None.
- 1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
+Action: Execute command `clear_menu`
- 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.
+Expected Outcome:
- 1. Test case: `delete 0`
- Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.
+* Cleared all menu items.
+* Success message shown in command result box.
+ Specifically, `Menu Item list has been cleared!`
- 1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)
- Expected: Similar to previous.
+### Switch tabs
-1. _{ more test cases … }_
+**Test Case 1**
-### Saving data
+Context: None.
-1. Dealing with missing/corrupted data files
+Action: Execute command `tab t/MENU`
- 1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_
+Expected Outcome:
-1. _{ more test cases … }_
+* Switched to the menu tab.
+* Success message shown in command result box.
+ Specifically, `Switched tab.`
diff --git a/docs/Documentation.md b/docs/Documentation.md
index 3e68ea364e7..599a0f24487 100644
--- a/docs/Documentation.md
+++ b/docs/Documentation.md
@@ -22,7 +22,7 @@ title: Documentation guide
**Diagrams:**
-* See the [_[se-edu/guides] **Using PlantUML**_](https://se-education.org/guides/tutorials/plantUml.html)
+* See the guide [_[se-edu/guides] **Using PlantUML**_](https://se-education.org/guides/tutorials/plantUml.html)
**Converting a document to the PDF format:**
diff --git a/docs/SettingUp.md b/docs/SettingUp.md
index 275445bd551..ae0f3848737 100644
--- a/docs/SettingUp.md
+++ b/docs/SettingUp.md
@@ -23,7 +23,7 @@ If you plan to use Intellij IDEA (highly recommended):
1. **Import the project as a Gradle project**: Follow the guide [_[se-edu/guides] IDEA: Importing a Gradle project_](https://se-education.org/guides/tutorials/intellijImportGradleProject.html) to import the project into IDEA.
:exclamation: Note: Importing a Gradle project is slightly different from importing a normal Java project.
1. **Verify the setup**:
- 1. Run the `seedu.address.Main` and try a few commands.
+ 1. Run the `trackr.Main` and try a few commands.
1. [Run the tests](Testing.md) to ensure they all pass.
--------------------------------------------------------------------------------------------------------------------
@@ -45,11 +45,4 @@ If you plan to use Intellij IDEA (highly recommended):
1. **Learn the design**
- When you are ready to start coding, we recommend that you get some sense of the overall design by reading about [AddressBook’s architecture](DeveloperGuide.md#architecture).
-
-1. **Do the tutorials**
- These tutorials will help you get acquainted with the codebase.
-
- * [Tracing code](tutorials/TracingCode.md)
- * [Adding a new command](tutorials/AddRemark.md)
- * [Removing fields](tutorials/RemovingFields.md)
+ When you are ready to start coding, we recommend that you get some sense of the overall design by reading about [Trackr’s architecture](DeveloperGuide.md#21-architecture).
diff --git a/docs/Testing.md b/docs/Testing.md
index 8a99e82438a..c5c8b249e62 100644
--- a/docs/Testing.md
+++ b/docs/Testing.md
@@ -29,8 +29,8 @@ There are two ways to run tests.
This project has three types of tests:
1. *Unit tests* targeting the lowest level methods/classes.
- e.g. `seedu.address.commons.StringUtilTest`
+ e.g. `trackr.commons.StringUtilTest`
1. *Integration tests* that are checking the integration of multiple code units (those code units are assumed to be working).
- e.g. `seedu.address.storage.StorageManagerTest`
-1. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together.
- e.g. `seedu.address.logic.LogicManagerTest`
+ e.g. `trackr.storage.StorageManagerTest`
+1. Hybrids of unit and integration tests. These test are checking multiple code units as well as how they are connected together.
+ e.g. `trackr.logic.LogicManagerTest`
diff --git a/docs/UserGuide.md b/docs/UserGuide.md
index e7df68b01ea..c7908a97caa 100644
--- a/docs/UserGuide.md
+++ b/docs/UserGuide.md
@@ -3,191 +3,1699 @@ 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.
-
-* Table of Contents
-{:toc}
+# Overview
+
+Introducing **Trackr - the ultimate desktop application** designed to simplify the delivery management process for your home business!
+
+With Trackr, you can seamlessly manage your suppliers, orders and tasks.
+
+It utilizes a Command Line Interface (CLI), while still enjoying the benefits of a user-friendly Graphical User Interface (GUI).
+
+Say goodbye to the hassle of Excel and the stress of time constraints! Whether you're a busy home business owner or simply looking for an efficient and streamlined solution, Trackr is the perfect fit for you.
+Experience the convenience of delivery management like never before with Trackr.
+
+# About This Guide
+
+This guide shows you the relevant information for setting up and using Trackr to manage your suppliers, orders and tasks.
+
+You can click on any of the links below to navigate to the respective sections for more information.
+
+# Table of Contents
+
+
+* [1 Quick start](#1-quick-start)
+ * [1.1 Prerequisites](#11-prerequisites)
+ * [1.1.1 Java](#111-java)
+ * [1.1.2 Glossary](#112-glossary)
+ * [1.2 Installation](#12-installation)
+ * [1.3 Utilisation](#13-utilisation)
+ * [1.4 Navigating the User Interface](#14-navigating-the-user-interface)
+ * [1.4.1 Home Page](#141-home-page)
+ * [1.4.2 Data Tab](#142-data-tab)
+* [2 Commands](#2-commands)
+ * [2.0 Checking for duplicates](#20-checking-for-duplicates)
+ * [2.1 Add](#21-add)
+ * [2.1.1 Adding a supplier: `add_supplier`](#211-adding-a-supplier-add_supplier)
+ * [2.1.2 Adding an order: `add_order`](#212-adding-an-order-add_order)
+ * [2.1.3 Adding a task: `add_task`](#213-adding-a-task-add_task)
+ * [2.1.4 Adding a menu item: `add_item`](#214-adding-a-menu-item-add_item)
+ * [2.2 Edit](#22-edit)
+ * [2.2.1 Editing a supplier: `edit_supplier`](#221-editing-a-supplier-edit_supplier)
+ * [2.2.2 Editing an order: `edit_order`](#222-editing-an-order-edit_order)
+ * [2.2.3 Editing a task: `edit_task`](#223-editing-a-task-edit_task)
+ * [2.2.4 Editing a menu item: `edit_item`](#224-editing-a-menu-item-edit_item)
+ * [2.3 Find](#23-find)
+ * [2.3.1 Finding a supplier: `find_supplier`](#231-finding-a-supplier-find_supplier)
+ * [2.3.2 Finding an order: `find_order`](#232-finding-an-order-find_order)
+ * [2.3.3 Finding a task: `find_task`](#233-finding-a-task-find_task)
+ * [2.3.4 Finding a menu item: `find_item`](#234-finding-a-menu-item-find_item)
+ * [2.4 Delete](#24-delete)
+ * [2.4.1 Deleting a supplier: `delete_supplier`](#241-deleting-a-supplier-delete_supplier)
+ * [2.4.2 Deleting an order: `delete_order`](#242-deleting-an-order-delete_order)
+ * [2.4.3 Deleting a task: `delete_task`](#243-deleting-a-task-delete_task)
+ * [2.4.4 Deleting a menu item: `delete_item`](#244-deleting-a-menu-item-delete_item)
+ * [2.5 Sort](#25-sort)
+ * [2.5.1 Sorting a task: `sort_task`](#251-sorting-a-task-sort_task)
+ * [2.5.2 Sorting a order: `sort_order`](#252-sorting-a-order-sort_order)
+ * [2.6 List](#26-list)
+ * [2.6.1 Listing all suppliers: `list_supplier`](#261-listing-all-suppliers-list_supplier)
+ * [2.6.2 Listing all orders: `list_order`](#262-listing-all-orders-list_order)
+ * [2.6.3 Listing all tasks: `list_task`](#263-listing-all-tasks-list_task)
+ * [2.6.4 Listing all menu items: `list_menu`](#264-listing-all-menu-items-list_menu)
+ * [2.7 Clear](#27-clear)
+ * [2.7.1 Clear all supplier entries: `clear_supplier`](#271-clear-all-supplier-entries-clear_supplier)
+ * [2.7.2 Clear all order entries: `clear_order`](#272-clear-all-order-entries-clear_order)
+ * [2.7.3 Clear all task entries: `clear_task`](#273-clear-all-task-entries-clear_task)
+ * [2.7.4 Clear all menu item entries: `clear_menu`](#274-clear-all-menu-item-entries-clear_menu)
+ * [2.8 Switch](#28-switch)
+ * [2.8.1 Switching tabs: `tab`](#281-switching-tabs-tab)
+ * [2.9 Others](#29-others)
+ * [2.9.1 Viewing help: `help`](#291-viewing-help-help)
+ * [2.9.2 Uploading a csv file](#292-uploading-a-csv-file)
+ * [2.9.3 Exiting the program: `exit`](#293-exiting-the-program-exit)
+* [3 Data](#3-data)
+ * [3.1 Saving of data](#31-saving-of-data)
+ * [3.2 Editing the data file](#32-editing-the-data-file)
+* [4 Upcoming features `[coming soon]`](#4-upcoming-features-coming-soon)
+* [5 FAQ](#5-faq)
+* [6 Summary](#6-summary)
+* [6.1 Prefix Summary](#61-prefix-summary)
+ * [6.2 Command Summary](#62-command-summary)
+
--------------------------------------------------------------------------------------------------------------------
-## Quick start
+# 1 Quick start
+
+## 1.1 Prerequisites
+
+### 1.1.1 Java
+
+Ensure you have [Java `11`](https://www.oracle.com/sg/java/technologies/javase/jdk11-archive-downloads.html) or above installed.
+Java is the language that your computer uses to understand Trackr.
+
+
+
+:bulb: **Tip**
+
+**How to check your current Java version:**
+
+**Step 1.** Open up **Command Prompt** (Windows) or **Terminal** (Mac and Linux).
+
+**Step 2.** Type and run the command `java -version`.
+
+**Step 3.** Check the version number provided (`xxx`) is at least `11`.
+
+An example is shown below.
+
+ ```
+ > java -version
+ java version "xxx"
+ ```
+
+
+
+
+
+### 1.1.2 Glossary
+
+* **Mainstream OS**: Windows, Linux, Mac
+* **CLI**: Command-Line Interface
+* **GUI**: Graphical User Interface
+* **Supplier**: Supplier refers to someone whom the user seasonally or frequently orders goods from
+* **Customer**: Customer refers to someone whom the user receives an order from
+* **Order**: Order refers to the customers' orders the user accepts
+* **Task**: Task refers to any to-dos the user may have, it need not be related to suppliers or orders (For instance, it can be about tidying inventory)
+* **Menu Item**: Menu Item refers to any inventory/ stock that the user is selling to customers.
+* **Tag**: Tags are associated with suppliers, users can tag the supplier with any keyword they want, number of tags are not restricted
+* **Status**: Statuses are associated with tasks and orders, one entry of task/order can only have one status and the type of status that can be added is restricted
+
+## 1.2 Installation
+
+**Step 1.** Download the latest `trackr.jar` file from [here](https://github.com/AY2223S2-CS2103T-W15-2/tp/releases).
+
+**Step 2.** Copy the file to the folder where you will use Trackr.
+
+**Step 3.** Double-click on the `trackr.jar` file.
+
+
+
+:bulb: **Tip**
+
+**Trackr does not open?**
+
+**Step 1.** Open a command terminal.
+
+**Step 2.** Type in `java -jar ` (Keep in mind of the space at the end).
+
+**Step 3.** Drag and drop `trackr.jar` into the command terminal.
+
+**Step 4.** Press enter and execute the command.
+
+An example of the final command is displayed below.
+
+ ```
+ > java -jar xxxx/xxxx/trackr.jar
+ ```
+
+
+
+A GUI similar to the below should appear in a few seconds.
+
+
+
+ Figure 1.2.1: Home Tab UI
+
+
+The UI has the following areas:
+
+* Tabs
+* Sales (Total Revenue and Profit)
+* Simplified Orders
+* Simplified Tasks
+* Simplified Menu
+* Command Result Screen
+* Command Input Box
+* Data List
+
+For more information on how to navigate the User Interface (UI), you can go [here](#14-navigating-the-user-interface)
+
+
+
+ Figure 1.2.2: Labeled Home Tab UI
+
+
+
+
+ Figure 1.2.3: Labeled Data Tab UI
+
+
+
+
+:warning: **Warning**
+
+When you open the application for the first time on your device, `Trackr` will create a `data` folder with `trackr.json` data file inside.
+
+If you are a _new_ user, do not edit this file.
+
+Otherwise, you can check out how to edit it [here](#32-editing-the-data-file)
+
+
+
+## 1.3 Utilisation
+
+**Step 1:** Enter your command into the Command Input Box.
+
+You can try the following commands to add a task:
+
+* `tab t/TASKS`
+* `add_task n/Buy eggs d/12/12/2040`
+
+**Step 2:** Observe the changes made to the Task list. Look at the message displayed inside the Command Result Screen to see the results of your command.
+
+
+
+:bulb: **Tip**
+
+You can find out all the usable commands [here](#2-commands) or return to the [Table of Contents](#table-of-contents) to find your desired command.
+
+
+
+## 1.4 Navigating the User Interface
+
+Here, we will explain how you can navigate around our application.
+
+**Command Input Box**
+
+You can input your commands into the command input box, press **Enter** to execute your commands. A result message would be shown at the Command Result Screen.
+
+If there is an error with the command, the input would turn **red** and you can refer to the Command Result Screen for help.
+
+**Command Result Screen**
+
+Command result screen shows the success message for your command that executed successfully.
+
+Otherwise, it would show an error message with hints on what was missing / invalid in the command that you have entered.
+Refer to the error message or look back at this User Guide for more information on how to correct your command input.
-1. Ensure you have Java `11` or above installed in your Computer.
+**Tabs**
-1. Download the latest `addressbook.jar` from [here](https://github.com/se-edu/addressbook-level3/releases).
+We provide multiple tabs for you to use. This includes the home page, with the data tabs that display your data for the respective information (i.e. Order, Tasks, Contacts, Menu).
-1. Copy the file to the folder you want to use as the _home folder_ for your AddressBook.
+You can navigate between them by clicking on the tab itself, or input the command `tab t/` followed with the respective tab name.
-1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar addressbook.jar` command to run the application.
- A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
- 
+For more information about the `tab` command, you can go [here](#281-switching-tabs-tab).
-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:
+### 1.4.1 Home Page
- * `list` : Lists all contacts.
+Upon starting the application, you will see a convenient dashboard with summarised information that you need for your business.
- * `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.
+**Sales (Total Revenue and Profit)**
- * `delete 3` : Deletes the 3rd contact shown in the current list.
+Trackr keeps track of all orders submitted and automatically updates the total revenue and profit that your business has generated with us.
- * `clear` : Deletes all contacts.
+**Simplified Orders**
- * `exit` : Exits the app.
+Order list shows a condensed preview of your outstanding orders, with their relevant details (i.e. customer name, promised delivery date and your progress).
-1. Refer to the [Features](#features) below for details of each command.
+**Simplified Tasks**
+
+Task list shows all outstanding miscellaneous tasks that you may have for your current operations.
+
+**Simplified Menu**
+
+Menu list shows all the items that you have up for sale currently, with their details (cost price, selling price and profit margin) at a glance.
+
+### 1.4.2 Data Tab
+
+**Data List**
+
+Data list contains all of your respective data labelled out in full. The layout of the respective data information can be seen below:
+
+* Orders
+
+`Orders` contains order information, with their data represented by their respective cards.
+
+Order Card consists of the following components:
+
+1. Index of the order
+2. Name of the order item (which should correspond to its respective Menu item name)
+3. Quantity of order item
+4. Deadline for delivery of the order
+5. Status of the order item
+6. Customer name
+7. Customer phone number
+8. Customer address
+
+
+
+ Figure 1.4.2.1: Labeled Order Card
+
+
+* Tasks
+
+`Tasks` contains task information, with their data represented by their respective cards.
+
+Task Card consists of the following components:
+
+1. Index of the task
+2. Name of the task
+3. Deadline of the task
+4. Status of the task
+
+
+
+ Figure 1.4.2.2: Labeled Task Card
+
+
+* Contacts
+
+`Contacts` contains supplier information, with their data represented by their respective cards.
+
+Supplier Contact Card consists of the following components:
+
+1. Index of the supplier
+2. Name of the supplier
+3. Tags related to the supplier
+4. Phone number of the supplier
+5. Address of the supplier
+6. Email of the supplier
+
+
+
+ Figure 1.4.2.3: Labeled Supplier Card
+
+
+* Menu
+
+`Menu` contains menu items, with their data represented by their respective cards.
+
+Menu Item Card consists of the following components:
+
+1. Index of the menu item
+2. Menu item name
+3. Selling price of the menu item
+4. Cost of making the menu item
+5. Profit from selling the menu item (Profit = Selling Price - Cost)
+
+
+
+ Figure 1.4.2.4: Labeled Menu Card
+
--------------------------------------------------------------------------------------------------------------------
-## Features
+
+
+# 2 Commands
-**:information_source: Notes about the command format:**
+:information_source: **Notes about the command format:**
+
+* All command keywords must be in lower-case and are case-sensitive.
+ e.g. For add supplier command:
+ :heavy_check_mark: `add_supplier` is valid.
+ :x: `ADD_SUPPLIER` and `Add_Supplier` are invalid.
-* 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`.
+* Prefixes of the parameters must be in lower-case and are case-sensitive.
+ e.g. `n/` in `add_s n/NAME` is case-sensitive
+ :heavy_check_mark: `n/` is a valid prefix.
+ :x: `N/` is an invalid prefix.
+
+* Words in `UPPER_CASE` are the parameters to be supplied by you.
+ e.g. in `add_supplier n/NAME`, you fill in the `NAME` parameter with the supplier name (i.e. `add_supplier n/John Doe`).
* 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`.
+ 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.
+* Items with `…` after them can be used any number of times within the command.
+ e.g. `[t/TAG]…` can be used as ` ` (omitted), `t/flour`, `t/flour t/sugar` etc.
* 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.
-* If a parameter is expected only once in the command but you specified it multiple times, only the last occurrence of the parameter will be taken.
+* If a parameter is expected only once in the command, but you specified it multiple times, only the **last** occurrence of the parameter will be taken.
e.g. if you specify `p/12341234 p/56785678`, only `p/56785678` will be taken.
-* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be ignored.
+* Extraneous parameters will be ignored.
e.g. if the command specifies `help 123`, it will be interpreted as `help`.
-### Viewing help : `help`
+
+
+
+
+:bulb: **Tip**
+
+* General format of commands:
+
+
+ * Index depends on the command.
+ * Number of parameters depend on the command.
+
+* All command keywords have shortcut alternatives. They are the command type and the first letter of the information type.
+ For example:
+ * `add_s` is the same as `add_supplier`
+ * `edit_o` is the same as `edit_order`
+ * `list_t` is the same as `list_task`
+
+* You can find out the constraints for the parameters with their corresponding prefix [here](#61-prefix-summary).
+
+
+
+## 2.0 Checking for duplicates
-Shows a message explaning how to access the help page.
+Duplicate data are not allowed. Hence, adding of duplicate data or editing of an existing data such that it matches
+with another existing data in the data list will not be successful. Here's how we check for duplicates:
-
+| Any two | are considered to be duplicates if |
+|------------|-------------------------------------------------------------------------------|
+| Suppliers | they have the same phone numbers |
+| Orders | all the parameters (excluding `STATUS`) are the same (with matching cases). |
+| Tasks | they have the same task names (with matching cases) and deadlines. |
+| Menu items | they have the same item names (with matching cases). |
-Format: `help`
+
+## 2.1 Add
-### Adding a person: `add`
+Adding of an information to the specific list. Below are the specific add commands for supplier, order, task and menu item.
-Adds a person to the address book.
+
-Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…`
+:pencil2: **Note**
+Adding of duplicate data is not allowed. Refer to this [table](#20-checking-for-duplicates) to see how duplicates are checked for.
-
:bulb: **Tip:**
-A person can have any number of tags (including 0)
-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`
+### 2.1.1 Adding a supplier: `add_supplier`
+
+Adds a supplier to the list of suppliers.
+
+Syntax: `add_supplier n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…`
-### Listing all persons : `list`
+
-Shows a list of all persons in the address book.
+:clipboard: **Example 1: Standard command without tags**
-Format: `list`
+* `add_supplier n/John Doe p/98765432 e/johnd@example.com a/John Street`
+ Adds a supplier with the following details:
+ * Supplier Name: `John Doe`
+ * Phone Number: `98765432`
+ * Email: `johnd@example.com`
+ * Address: `John Street`
+ * Tags: Empty
-### Editing a person : `edit`
+:clipboard: **Example 2: Shortcut command with tags**
-Edits an existing person in the address book.
+* `add_s n/Betsy Cow t/diary e/betsycow@example.com a/Betsy Street p/12345678 t/meat`
+ Adds a supplier with the following details:
+ * Supplier Name: `Betsy Cow`
+ * Phone Number: `12345678`
+ * Email: `betsycow@example.com`
+ * Address: `Betsy Street`
+ * Tags: `Diary`, `Meat`
-Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…`
+
-* 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.
+### 2.1.2 Adding an order: `add_order`
-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.
+Adds an order into the list of orders.
-### Locating persons by name: `find`
+Syntax: `add_order on/ORDER_ITEM q/QUANTITY d/DEADLINE n/CUSTOMER_NAME a/CUSTOMER_ADDRESS p/CUSTOMER_PHONE_NUMBER [s/STATUS]`
-Finds persons whose names contain any of the given keywords.
+
-Format: `find KEYWORD [MORE_KEYWORDS]`
+:information_source: **Information**
-* 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`
+* Statuses available for setting are
+ * `N` or `n` for `Not Delivered`
+ * `I` or `i` for `In Progress`
+ * `D` or `d` for `Delivered`
+* If no status is provided, it is defaulted to `Not Delivered`.
-Examples:
-* `find John` returns `john` and `John Doe`
-* `find alex david` returns `Alex Yeoh`, `David Li`
- 
+* All `ORDER_ITEM` **must** match (case-sensitive) a menu item in the menu. (e.g. `choclate` and `Chocolate` are considered different items).
+ i.e. If `ORDER_ITEM` does not match any of the existing menu items, you need to add it as a menu item first.
+ You can find out how to add a menu item [here](#214-adding-a-menu-item-add_item)
-### Deleting a person : `delete`
+
-Deletes the specified person from the address book.
+
-Format: `delete INDEX`
+
-* 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, …
+:clipboard: **Example 1: Standard command without status**
-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.
+* `add_order on/Cupcake q/5 d/01/12/2024 n/John Cat p/91234567 a/John Street`
+ Adds an order with the following details:
+ * Order Item: `Cupcake`
+ * Quantity: `5`
+ * Deadline: `01/12/2024`
+ * Name: `John Cat`
+ * Phone Number: `91234567`
+ * Address: `John Street`
+ * Status: `Not Delivered` (Default)
-### Clearing all entries : `clear`
+:clipboard: **Example 2: Shortcut command with status**
-Clears all entries from the address book.
+* `add_o on/Chocolate Cookies q/10 d/02/10/2024 n/Dolly Sheep p/91827364 a/Dolly Street s/I`
+ Adds a supplier with the following details:
+ * Order Item: `Chocolate Cookies`
+ * Quantity: `10`
+ * Deadline: `02/10/2024`
+ * Name: `Dolly Sheep`
+ * Phone Number: `91827364`
+ * Address: `Dolly Street`
+ * Status: `In Progress`
-Format: `clear`
+
-### Exiting the program : `exit`
+
-Exits the program.
+### 2.1.3 Adding a task: `add_task`
-Format: `exit`
+Adds a task to the list of tasks.
-### Saving the data
+Syntax: `add_task n/TASK_NAME d/DEADLINE [s/STATUS]`
-AddressBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
+
-### Editing the data file
+:information_source: **Information**
-AddressBook data are saved as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are welcome to update data directly by editing that data file.
+* Statuses available for setting are
+ * `N` or `n` for `Not Done`
+ * `D` or `d` for `Done`
+* If no status is provided, it is **defaulted** to `Not Done`.
-
:exclamation: **Caution:**
-If your changes to the data file makes its format invalid, AddressBook will discard all data and start with an empty data file at the next run.
-### Archiving data files `[coming in v2.0]`
+
-_Details coming soon ..._
+:clipboard: **Example 1: Standard command without status**
---------------------------------------------------------------------------------------------------------------------
+* `add_task n/Buy cookie cutter d/22/12/2024`
+ Adds a task with the following details:
+ * Task Name: `Buy cookie cutter`
+ * Deadline: `22/12/2024`
+ * Status: `Not Done` (Default)
-## FAQ
+:clipboard: **Example 2: Shortcut command with status**
-**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.
+* `add_t n/Buy a card d/23/12/2024 s/D`
+ Adds a task with the following details:
+ * Task Name: `Buy a card`
+ * Deadline: `23/12/2024`
+ * Status: `Done`
+
+
+
+
+
+### 2.1.4 Adding a menu item: `add_item`
+
+Adds a menu item to the menu.
+
+Syntax: `add_item n/ITEM_NAME pr/PRICE c/COST`
+
+
+
+:information_source: **Information**
+
+* When entering price and cost values, you may choose to
+ 1. input **positive** integer numbers
+ 2. input **positive** decimal numbers (up to 2 decimal point). For example:
+ :heavy_check_mark: `5.1` or `5.03`
+ :x: `5.034`
+
+* The item can have a positive or negative profit (Profit = Price - Cost). Specifically:
+ * Negative profit margin means you are making a **loss**
+ * Positive profit margin means you are making a **profit**
+* Note that profit calculated is only accurate when price and cost each have at most 16 digits.
+ * For example: 9283212222332323 and 92832122223323.55 are both 16 digits.
+* You cannot add an item if there is another item that has the same name in the menu. The item name is case-sensitive.
+ * For example, chocolate and Chocolate are considered as different item.
+
+
+
+
+
+:clipboard: **Example 1: Standard command with integer values**
+
+* `add_item n/Chocolate cake pr/5 c/2`
+ Adds an order item with the following details:
+ * Item Name: `Chocolate cake`
+ * Price: `5`
+ * Cost: `2`
+
+:clipboard: **Example 2: Shortcut command with decimal values**
+
+* `add_i n/Limited Time Strawberry Cake pr/20.55 c/25.2`
+ Adds an order item with the following details:
+ * Item Name: `Limited Time Strawberry Cake`
+ * Price: `20.55`
+ * Cost: `25.2`
+
+
+
+## 2.2 Edit
+
+Editing of an information in a specific list. Below are the specific edit commands for supplier, order, task and menu item.
+
+
+
+:information_source: **Information**
+
+* Edits the information at the specified `INDEX`.
+* The `INDEX` **must be a positive integer** 1, 2, 3, …
+* All existing values will be replaced with the new values given.
+* At least one of the fields (e.g. `n/NAME`) must be specified.
+* Editing of a data such that it matches with another existing data is not allowed. Check [this table](#20-checking-for-duplicates) to see how duplicates are checked for.
+
+
+
+
+
+:exclamation: **Danger**
+
+Editing of information is one-way (i.e. You cannot revert your command).
+
+We are working to have an undo feature in the future. Sorry for the inconvenience caused.
+
+
+
+### 2.2.1 Editing a supplier: `edit_supplier`
+
+Edits an existing supplier’s information.
+
+Syntax: `edit_supplier INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…`
+
+
+
+:information_source: **Information**
+
+* When editing tags:
+ * All existing tags will be replaced with the given tag (editing of tags is not accumulative).
+ * Typing `t/` removes all the existing tags.
+
+
+
+
+
+
+
+:clipboard: **Example 1: Standard command removing tags**
+
+* `edit_supplier 1 n/Johnny p/90138482 t/`
+ Edits the **first** supplier information (shown on screen) with the following details:
+ * Supplier Name: `Johnny`
+ * Phone Number: `90138482`
+ * Tags: Empty
+
+:clipboard: **Example 2: Shortcut command replacing tags**
+
+* `edit_s 3 t/flour e/mark@example.com`
+ Edits the **third** supplier information (shown on screen) with the following details:
+ * Email: `mark@example.com`
+ * Tags: `Supplies Flour`
+
+
+
+### 2.2.2 Editing an order: `edit_order`
+
+Edits an existing order’s information.
+
+Syntax: `edit_order INDEX [on/ORDER_ITEM] [q/QUANTITY] [d/DEADLINE] [n/CUSTOMER_NAME] [a/CUSTOMER_ADDRESS] [p/CUSTOMER_PHONE_NUMBER] [s/STATUS]`
+
+
+
+:information_source: **Information**
+
+* If a menu item is no longer your menu (i.e. you have deleted the menu item), the order details cannot be edited.
+
+* Statuses available for setting are
+ * `N` or `n` for `Not Delivered`
+ * `I` or `i` for `In Progress`
+ * `D` or `d` for `Delivered`
+* When editing the order name, the input for order name is case-sensitive.
+ * For example, if menu item you want edit order name to "chocolate", you should input `edit_o 1 on/chocolate` and not `edit_o 1 on/ChOcolAte`
+
+
+
+
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `edit_order 1 p/91234567 d/05/05/2024`
+ Edits the **first** order information (shown on screen) with the following details:
+ * Customer Phone Number: `91234567`
+ * Deadline: `05/05/2024`
+
+:clipboard: **Example 2: Shortcut command updating status**
+
+* `edit_o 3 q/20 s/I`
+ Edits the **third** order information (shown on screen) with the following details:
+ * Quantity: `3`
+ * Status: `In Progress`
+
+
+
+### 2.2.3 Editing a task: `edit_task`
+
+Edits an existing task’s information.
+
+Syntax: `edit_task INDEX [n/TASK_NAME] [d/DEADLINE] [s/STATUS]`
+
+
+
+:information_source: **Information**
+
+* Statuses available for setting are
+ * `N` or `n` for `Not Done`
+ * `D` or `d` for `Done`
+
+
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `edit_task 1 n/Get creamer`
+ Edits the **first** task information (shown on screen) with the following details:
+ * Task Name: `Get creamer`
+
+:clipboard: **Example 2: Shortcut command updating status**
+
+* `edit_t 3 d/31/12/2024 s/N`
+ Edits the **third** task information (shown on screen) with the following details:
+ * Deadline: `31/12/2024`
+ * Status: `Not Done`
+
+
+
+### 2.2.4 Editing a menu item: `edit_item`
+
+Edits an existing menu item’s information.
+
+Syntax: `edit_item INDEX [n/ITEM_NAME] [pr/PRICE] [c/COST]`
+
+
+
+:information_source: **Information**
+
+* Editing a menu item does not invalidate or update the orders with the same order item name.
+* Editing a menu item does not update and change the total revenue and profits on the home tab.
+
+* When entering price and cost values, you may choose to
+ 1. input **positive** integer numbers
+ 2. input **positive** decimal numbers (up to 2 decimal point). For example:
+ :heavy_check_mark: `5.1` or `5.03`
+ :x: `5.034`
+
+* The item can have a positive or negative profit margin (Profit Margin = Price - Cost). Specifically:
+ * Negative profit margin means you are making a **loss**
+ * Positive profit margin means you are making a **profit**
+* Note that profit calculated is only accurate when price and cost each have at most 16 digits.
+ * For example: 9283212222332323 and 92832122223323.55 are both 16 digits.
+
+
+
+
+
+:clipboard: **Example 1: Standard command with integer values**
+
+* `edit_item 1 n/Coffee pr/2 c/1`
+ Edits the **first** menu item information with the following details:
+ * Item Name: `Coffee`
+ * Price: `2`
+ * Cost: `1`
+
+:clipboard: **Example 2: Shortcut command with decimal values**
+
+* `edit_i 3 d/Signature burger pr/8.5 c/2.25`
+ Edits the **third** menu item information with the following details:
+ * Item Name: `Signature burger`
+ * Price: `8.5`
+ * Cost: `2.25`
+
+
+
+## 2.3 Find
+
+Finding of specific information with the provided parameters. Below are the specific find commands for supplier, order, task and menu item.
+
+### 2.3.1 Finding a supplier: `find_supplier`
+
+Finds suppliers whose information matches with any of the given parameters.
+
+Syntax: `find_supplier NAME`
+
+
+
+:information_source: **Information**
+
+* Search is case-insensitive (e.g. `mark` will match with `Mark`).
+* Order of the keywords does not matter (e.g. `Mark Lee` will match with `Lee Mark`).
+* Only full words will match (e.g. `Mar` will not match with `Mark`).
+* Suppliers matching with at least one keyword will be returned (i.e. `OR` search).
+ (e.g. `Mark Lee` will return `Mark Tan`, `Lee Chan`)
+
+
+
+
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `find_supplier Prima Flour`
+ Finds the supplier with the following details:
+ * Supplier Name contains either `Prima` or `Flour`.
+
+ :heavy_check_mark: Example of suppliers that match:
+ * `Prima`
+ * `Soon Flour Pte Ltd`
+ * `PRIMA CONFECTIONARY`
+
+ :x: Example of suppliers that do not match:
+ * `Prim`
+ * `PrimaFlour`
+
+:clipboard: **Example 2: Shortcut command**
+
+* `find_s Pte`
+ Finds the supplier with the following details:
+ * Supplier Name contains `Pte`.
+
+ :heavy_check_mark: Example of suppliers that match:
+ * `Soon Flour Pte Ltd`
+ * `Tech Leong PTE LTD`
+
+ :x: Example of suppliers that do not match:
+ * `Private`
+ * `Phoon Huat PteLtd`
+
+
+
+### 2.3.2 Finding an order: `find_order`
+
+Find orders whose information matches with any of the given parameters.
+
+Syntax: `find_order [on/ORDER_ITEM] [q/QUANTITY] [d/DEADLINE] [n/CUSTOMER_NAME] [a/CUSTOMER_ADDRESS] [p/CUSTOMER_PHONE_NUMBER] [s/STATUS]`
+
+
+
+
+
+:information_source: **Information**
+
+* At least one of the optional fields must be keyed in.
+
+* For `ORDER_ITEM` and `CUSTOMER_NAME`:
+ * Search is case-insensitive (e.g. `cookie` will match with `Cookie`).
+ * Order of the keywords does not matter (e.g. `Chocolate Cookie` will match with `Cookie Chocolate`).
+ * Only full words will match (e.g. `Chocolate` will not match with `Choco`).
+ * Orders matching with at least one keyword will be returned (i.e. `OR` search).
+ (e.g. `Chocolate Cake` will return `Chocolate Cookie`, `Strawberry Cake`).
+
+* For `STATUS`:
+ * Search is case-insensitive.
+ * Search
+ * `D` or `d` for `Delivered`
+ * `I` or `i` for `In Progress`
+ * `N` or `n` for `Not delivered`.
+ * e.g. `find_o s/D` will return orders marked as `Delivered`.
+
+* For `CUSTOMER_ADDRESS`:
+ * Search is case-sensitive.
+ (e.g. The search for orders with customer address `smith` will match with `smith` but not with `Smith`).
+ * Order of the keywords matter (e.g. `Amy Lee` will not match with `Lee Amy`).
+ * Only full words will match.
+ * Order's respective parameter must fully match with the given parameter.
+ (e.g. `Amy Lee` will only match with `Amy Lee` and not with `Amy Lee Tan`).
+
+
+
+
+
+
+
+:clipboard: **Example 1: Standard command with single fields**
+
+* `find_order on/Chocolate Cake`
+ Finds the order with the following details:
+ * Order Item contains `Chocolate` or `Cake`
+
+ :heavy_check_mark: Example of orders that match:
+ * `Chocolate Cookie`
+ * `Chocolate Cake`
+ * `CAKE WITH VANILLA`
+
+ :x: Example of orders that do not match:
+ * `Choco`
+ * `ChocolatePie`
+
+:clipboard: **Example 2: Shortcut command with multiple fields**
+
+* `find_o on/Cake d/01/01/2023`
+ Finds the order with the following details:
+ * Supplier Name contains `Cake`
+ * Deadline is on `01/01/2023`
+
+ :heavy_check_mark: Example of orders that match:
+ * `on/Chocolate Cake d/01/01/2023`
+ * `on/CAKE WITH VANILLA AND CHOCOLATE d/01/01/2023`
+
+ :x: Example of orders that do not match:
+ * `on/Chocolate Cake d/03/03/2024`
+ * `on/VANILLA CAKES d/01/01/2023`
+
+
+
+### 2.3.3 Finding a task: `find_task`
+
+Finds tasks with information that matches with any of the given parameters.
+
+Syntax: `find_task [n/TASK_NAME] [d/DEADLINE] [s/STATUS]`
+
+
+
+
+
+:information_source: **Information**
+
+* At least one of the optional fields must be keyed in.
+
+* For `TASK_NAME`:
+ * Search is case-insensitive (e.g. `sugar` will match with `Sugar`).
+ * Order of the keywords does not matter (e.g. `Flour Sugar` will match with `Sugar Flour`).
+ * Only full words will match (e.g. `Sugar` will not match with `Sugars`).
+ * Tasks matching with at least one keyword will be returned (i.e. `OR` search).
+ (e.g. `Order Flour` will return `Order Sugar`, `Order 10kg Flour`).
+
+* For `STATUS`:
+ * Search is case-insensitive.
+ * Search
+ * `D` or `d` for `Done`
+ * `N` or `n` for `Not delivered`.
+ * e.g. `find_o s/D` will return tasks marked as `Done`.
+
+
+
+
+
+:clipboard: **Example 1: Standard command with single fields**
+
+* `find_task s/N`
+ Finds all task that are `Not Done`.
+
+:clipboard: **Example 2: Shortcut command with multiple fields**
+
+* `find_t n/Buy eggs d/17/02/2023`
+ Finds the order with the following details:
+ * Task Name contains `Buy eggs`.
+ * Deadline is on `17/02/2023`
+
+ :heavy_check_mark: Example of tasks that match:
+ * `n/Buy eggs d/17/02/2023`
+ * `n/Buy flour d/17/02/2023`
+
+ :x: Example of tasks that do not match:
+ * `n/Make eggcream d/17/02/2023`
+ * `n/Buy flour d/30/03/2024`
+
+
+
+
+
+### 2.3.4 Finding a menu item: `find_item`
+
+Find tasks with information that matches with any of the given parameters.
+
+Syntax: `find_item ITEM_NAME`
+
+
+
+:information_source: **Information**
+
+* Search is case-insensitive (e.g. `cookie` will match with `Cookie`).
+* Order of the keywords does not matter (e.g. `Chocolate Cookie` will match with `Cookie Chocolate`).
+* Only full words will match (e.g. `Chocolate` will not match with `Choco`).
+* Menu items matching with at least one keyword will be returned (i.e. `OR` search).
+ (e.g. `Chocolate Cake` will return `Chocolate Cookie`, `Strawberry Cake`)
+
+
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `find_item vanilla cupcake`
+ Finds the menu item with the following details:
+ * Item Name contains either `vanilla` or `cake`.
+
+ :heavy_check_mark: Example of order items that match:
+ * `Strawberry cupcake`
+ * `CAKE WITH VANILLA`
+
+ :x: Example of order item that do not match:
+ * `chocolate cake`
+
+:clipboard: **Example 2: Shortcut command**
+
+* `find_i Cake`
+ Finds the menu item with the following details:
+ * Item Name contains `Cake`.
+
+ :heavy_check_mark: Example of order items that match:
+ * `Strawberry Cake`
+ * `CAKE WITH VANILLA`
+
+ :x: Example of order item that do not match:
+ * `Vanilla Cupcake`
+
+
+
+
+
+## 2.4 Delete
+
+Deleting of an information to the specific list. Below are the specific delete commands for supplier, order, task and menu item.
+
+
+
+:information_source: **Information**
+
+* Deletes the information at the specified `INDEX`.
+* The `INDEX` **must be a positive integer** 1, 2, 3, …
+* All values at the `INDEX` will be deleted.
+
+
+
+
+
+:exclamation: **Danger**
+
+Deleting of information is one-way (i.e. You cannot revert your command).
+
+We are working to have an undo feature in the future. Sorry for the inconvenience caused.
+
+
+
+### 2.4.1 Deleting a supplier: `delete_supplier`
+
+Deletes the specified supplier from the contact list.
+
+Syntax: `delete_supplier INDEX`
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `delete_supplier 2`
+ Deletes the **second** supplier from the visible contact list
+
+:clipboard: **Example 2: Shortcut command after using `find_supplier`**
+
+* `find_supplier John` followed by `delete_s 1`
+ * `find_supplier John` lists all suppliers with names that contain `John`
+ * `delete_s 1` deletes the **first** supplier with a name that contains `John` from the visible contact list
+
+
+
+
+
+### 2.4.2 Deleting an order: `delete_order`
+
+Deletes the specified order from the order list.
+
+Syntax: `delete_order INDEX`
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `delete_order 2`
+ Deletes the **second** order from the visible order list
+
+:clipboard: **Example 2: Shortcut command after using `find_order`**
+
+* `find_order on/Cake` followed by `delete_o 1`
+ * `find_order on/Cake` lists all orders with item names that contain `Cake`
+ * `delete_o 1` deletes the **first** order with an item name that contains `Cake` from the visible order list
+
+
+
+### 2.4.3 Deleting a task: `delete_task`
+
+Deletes the specified task from the task list.
+
+Syntax: `delete_task INDEX`
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `delete_task 2`
+ Deletes the **second** task from the visible task list
+
+:clipboard: **Example 2: Shortcut command after using `find_task`**
+
+* `find_task n/flour` followed by `delete_t 1`
+ * `find_task n/flour` lists all tasks with task names that contain `flour`
+ * `delete_t 1` deletes the **first** task with a task name that contains `flour` from the visible task list
+
+
+
+
+
+### 2.4.4 Deleting a menu item: `delete_item`
+
+Deletes the specified menu item from the menu.
+
+Syntax: `delete_item INDEX`
+
+
+
+:information_source: **Information**
+
+Deleting a menu item does not invalidate the orders with the same order item name.
+
+
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `delete_menu 2`
+ Deletes the **second** menu item from the visible menu
+
+:clipboard: **Example 2: Shortcut command after using `find_item`**
+
+* `find_item cupcake` followed by `delete_m 1`
+ * `find_item cupcake` lists all menu items with item names containing `cupcake`
+ * `delete_m 1` deletes the **first** menu item with an item name that contains `cupcake` from the visible menu
+
+
+
+
+
+## 2.5 Sort
+
+Sorting of information in the specific list. Below are the specific sort commands for task and order.
+
+
+
+:information_source: **Information**
+
+* Sorts all the data in the specific list according to a criteria.
+* Criteria is case-insensitive (i.e. `time_added`, `TIME_ADDED` `Time_Added` are all valid).
+* The default criteria (when no criteria is specified) is `Status_and_deadline`.
+
+* Criteria available are:
+ * `Time_added`
+ * Sorts data in ascending order.
+ * Data added **first** is at the **top** while data added the **latest** is at the **bottom**.
+ * `Deadline`
+ * Sorts data in ascending order.
+ * Data with the **earliest** deadline is at the **top** while those with the **latest** deadline is at the **bottom**.
+ * `Status`
+ * Refer to the specific command explanation below.
+ * `Name`
+ * Sorts data in lexicographical order (ignoring case) with respect to the name.
+ * Data with name starting with "**a**" will be placed **above** a data with name starting with "**B**".
+ * `Status_and_deadline` (Default)
+ * Sorts all data by their status first, followed by their deadline
+ (while preserving the relative ordering from the first sort, i.e. Stable sort)
+
+
+
+### 2.5.1 Sorting a task: `sort_task`
+
+Sorts tasks according to the criteria specified.
+
+Syntax: `sort_task [c/CRITERIA]`
+
+
+
+
+
+:information_source: **Information**
+
+* `Status` - Sorted in this order from top to bottom:
+ * `Not Done`
+ * `Done`
+* `Status_and_deadline` - Sorts all data by their status first, followed by their deadline
+ Specifically in this order from top to bottom:
+ * `Not Done` & `Earliest Deadline`
+ * `Not Done` & `Latest Deadline`
+ * `Done` & `Earliest Deadline`
+ * `Done` & `Latest Deadline`
+
+
+
+
+
+:clipboard: **Example 1: Standard command with default parameters**
+
+* `sort_task`
+ Sorts all tasks according to their `Status_and_deadline`
+
+:clipboard: **Example 2: Shortcut command with parameters**
+
+* `sort_t c/deadline`
+ Sorts all tasks according to their `deadline`
+
+:clipboard: **Example 3: Shortcut command after using `find_task`**
+
+* `find_task s/N` followed by `sort_t c/Deadline`
+ * `find_task s/N` first lists all tasks with status as `Not Done`
+ * `sort_t c/deadline` sorts all `Not Done` tasks found according to their `Deadline`
+
+
+
+### 2.5.2 Sorting a order: `sort_order`
+
+Sorts orders according to the criteria specified.
+
+Syntax: `sort_order [c/CRITERIA]`
+
+
+
+
+
+:information_source: **Information**
+
+* `Status` - Sorted in this order from top to bottom:
+ * `Not Delivered`
+ * `In Progress`
+ * `Delivered`
+* `Status_and_deadline` - Sorts all data by their status first, followed by their deadline
+ Specifically in this order from top to bottom:
+ * `Not Delivered` & `Earliest Deadline`
+ * `Not Delivered` & `Latest Deadline`
+ * `In Progress` & `Earliest Deadline`
+ * `In Progress` & `Latest Deadline`
+ * `Delivered` & `Earliest Deadline`
+ * `Delivered` & `Latest Deadline`
+
+
+
+
+
+:clipboard: **Example 1: Standard command with default parameters**
+
+* `sort_order`
+ Sorts all orders according to their `Status_and_deadline`
+
+:clipboard: **Example 2: Shortcut command with parameters**
+
+* `sort_o c/Status`
+ Sorts all orders according to their `Status`
+
+:clipboard: **Example 3: Shortcut command after using `find_order`**
+
+* `find_order s/N` followed by `sort_o c/Name`
+ * `find_order s/N` lists all orders with status as `Not Delievered`
+ * `sort_o c/Name` sorts all `Not Delivered` orders found according to their `Name`
+
+
+
+
+
+## 2.6 List
+
+Shows all data in the specific list. Below are the specific list commands for suppliers, order, tasks and menu.
+
+### 2.6.1 Listing all suppliers: `list_supplier`
+
+Shows a list of all suppliers in the contact list.
+
+Syntax: `list_supplier`
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `list_supplier`
+ Shows all suppliers.
+
+:clipboard: **Example 2: Shortcut command with parameters**
+
+* `list_s n/John`
+ Shows all suppliers.
+
+
+
+### 2.6.2 Listing all orders: `list_order`
+
+Shows a list of all orders in the order list.
+
+Syntax: `list_order`
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `list_order`
+ Shows all orders.
+
+:clipboard: **Example 2: Shortcut command with parameters**
+
+* `list_o on/Straberry`
+ Shows all orders.
+
+
+
+### 2.6.3 Listing all tasks: `list_task`
+
+Shows a list of all tasks in the task list.
+
+Syntax: `list_task`
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `list_task`
+ Shows all tasks.
+
+:clipboard: **Example 2: Shortcut command with parameters**
+
+* `list_t s/N`
+ Shows all tasks.
+
+
+
+### 2.6.4 Listing all menu items: `list_menu`
+
+Shows a list of all menu items in the menu.
+
+Syntax: `list_menu`
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `list_menu`
+ Shows all menu items.
+
+:clipboard: **Example 2: Shortcut command with parameters**
+
+* `list_m price`
+ Shows all menu items.
+
+
+
+
+
+## 2.7 Clear
+
+Clears all data in the specific list. Below are the specific clear commands for suppliers, order, tasks and menu.
+
+
+
+:exclamation: **Danger**
+
+Clearing of data is one-way (i.e. You cannot revert your command).
+
+We are working to have an undo feature in the future. Sorry for the inconvenience caused.
+
+
+
+### 2.7.1 Clear all supplier entries: `clear_supplier`
+
+Clears all supplier entries from the contact list.
+
+Syntax: `clear_supplier`
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `clear_supplier`
+ Clears all supplier data from contact list.
+
+:clipboard: **Example 2: Shortcut command with parameters**
+
+* `clear_s n/Name`
+ Clears all supplier data from contact list.
+
+
+
+### 2.7.2 Clear all order entries: `clear_order`
+
+Clears all order entries from the order list.
+
+Syntax: `clear_order`
+
+
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `clear_order`
+ Clears all order data from order list.
+
+:clipboard: **Example 2: Shortcut command with parameters**
+
+* `clear_o on/Chocolate`
+ Clears all order data from order list.
+
+
+
+### 2.7.3 Clear all task entries: `clear_task`
+
+Clears all task entries from the task list.
+
+Syntax: `clear_task`
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `clear_task`
+ Clears all task data from task list.
+
+:clipboard: **Example 2: Shortcut command with parameters**
+
+* `clear_t s/N`
+ Clears all task data from task list.
+
+
+
+### 2.7.4 Clear all menu item entries: `clear_menu`
+
+Clears all menu item entries from the menu.
+
+Syntax: `clear_menu`
+
+
+
+:information_source: **Information**
+
+Clearing all menu items does not invalidate the orders.
+
+
+
+
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `clear_menu`
+ Clears all menu item data from menu.
+
+:clipboard: **Example 2: Shortcut command with parameters**
+
+* `clear_m price`
+ Clears all menu item data from menu.
+
+
+
+## 2.8 Switch
+
+Allows for you to switch to the tab for view your respective information. You can use the GUI to navigate it as shown [here](#14-navigating-the-user-interface) or use the command shown here.
+
+### 2.8.1 Switching tabs: `tab`
+
+Switch to another tab.
+
+Syntax: `tab t/TAB`
+
+
+
+:information_source: **Information**
+
+* `TAB` needs to be in all-caps and is case-sensitive
+* The available tabs are `HOME`, `ORDERS`, `CONTACTS`, `MENU`, `TASKS`
+
+
+
+
+
+:clipboard: **Example 1: Standard command**
+
+* `tab t/HOME`
+ Navigates you to the home tab
+
+
+
+
+
+## 2.9 Others
+
+Here are other functionalities and commands that are available for you to utilise.
+
+### 2.9.1 Viewing help: `help`
+
+Shows a message with a link to the help page (this page).
+
+
+
+ Figure 2.9.1.1: Help Command Message
+
+
+Syntax: `help`
+
+### 2.9.2 Uploading a csv file
+
+Uploading of a valid csv file into Trackr allows Trackr to parse the data to `Task`, `Order`, `Supplier` and `Menu Items` and adds them to their respective lists.
+
+It is important to strictly follow the format specified below for your data to parse successfully.
+
+
+
+:information_source: **Information**
+
+**Step 1:** Start each row with the type of item you want to add (i.e. `Orders`)
+
+**Step 2:** List out on the next row all the respective item fields (i.e. `OrderName`, `Quantity`, ...)
+
+**Step 3:** Fill in the next few rows will all the corresponding data, without leaving any fields empty (i.e. `Chocolate Cookies`, `10`, ...)
+
+Note: For any **optional** fields, you can indicate it with a `-` to have it be taken as its default value.
+
+
+
+
+
+ Figure 2.9.2.1: Example of a valid csv file
+
+
+### 2.9.3 Exiting the program: `exit`
+
+Exits the program.
+
+Syntax: `exit`
+
+# 3 Data
+
+This section will inform you how the data is saved.
+
+## 3.1 Saving of data
+
+All data are saved after any command is executed successfully. There is no need for you to manually save.
+
+
+
+## 3.2 Editing the data file
+
+Trackr data are saved as a JSON file at `[JAR file location]/data/trackr.json`.
+
+Advanced users are welcome to update data directly by editing that data file.
+
+
+
+:warning: **Caution:**
+
+It is advised to make your changes through our application and not through editing the data file directly.
+
+Trackr does not have backup data if your edit corrupts the data.
+
+Please proceed with caution.
+
+
+
+
+
+:exclamation: **Danger**
+
+If your changes to the data file are invalid, Trackr will discard all data and start with an empty data file at the next run.
+
+
+
+Here is the layout of the data file:
+
+```json
+{
+ "suppliers": [],
+ "tasks": [],
+ "menuItems": [],
+ "orders": []
+}
+```
+
+Here are the respective formats for each of the data types:
+
+* Supplier
+ ```json
+ {
+ "name" : "Prima Flour",
+ "phone" : "87438807",
+ "email" : "sales.primaflour@prima.com.sg",
+ "address" : "Blk 30 Geylang Street 29, #06-40",
+ "tagged" : [ "flour" ]
+ }
+ ```
+
+
+
+* Task
+ ```json
+ {
+ "taskName" : "Buy flour",
+ "taskDeadline" : "01/01/2024",
+ "taskStatus" : "N",
+ "timeAdded" : "2023-04-04T16:35:55.858687"
+ }
+ ```
+* Menu Item
+ ```json
+ {
+ "itemName" : "Chocolate Cookies",
+ "itemCost" : "1.20",
+ "itemPrice" : "5.00",
+ "itemProfit" : "3.80"
+ }
+ ```
+* Order
+ ```json
+ {
+ "customerName" : "Amy",
+ "customerPhone" : "12345678",
+ "customerAddress" : "123 Smith Street",
+ "menuItem" : {
+ "itemName" : "Chocolate Cookies",
+ "itemCost" : "1.20",
+ "itemPrice" : "5.00",
+ "itemProfit" : "3.80"
+ },
+ "orderDeadline" : "01/01/2024",
+ "orderQuantity" : "2",
+ "orderStatus" : "N",
+ "timeAdded" : "2023-04-04T16:35:55.864688500"
+ }
+ ```
+
+# 4 Upcoming features `[coming soon]`
+
+* Highlight overdue orders.
+* Better representation of sales report (e.g. Pie charts or graphs) to track your business’s growth.
+* Ability to export your data as csv.
+
+--------------------------------------------------------------------------------------------------------------------
+
+# 5 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 Trackr home folder.
+
+**Q**: Can I search for `suppliers` by other fields such as `tags`?
+**A**: Currently it is not supported but will be added in the future. You can only find `suppliers` by their `names`. Sorry for the inconvenience caused.
+
+**Q**: Can I edit tags present in `suppliers`?
+**A**: This is not supported currently. You can just replace the tags directly using the [`edit_supplier`](#221-editing-a-supplier-edit_supplier) command. We will consider adding this as a feature in the future.
+
+**Q**: Do I require internet access to use Trackr?
+**A**: No, you can use Trackr without any internet access.
--------------------------------------------------------------------------------------------------------------------
-## Command summary
-
-Action | Format, Examples
---------|------------------
-**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`
-**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`
+
+
+# 6 Summary
+
+# 6.1 Prefix Summary
+
+| Parameter | Prefix | Rules |
+|--------------------------------------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Name (Task, Supplier, Customer, Menu Item) | n/ | - Should only contains alphanumeric characters and spaces |
+| Phone Number (Supplier, Customer) | p/ | - Should only contain digits - Should have least 3 digits |
+| Email | e/ | - Should only be of the form `local@domain` and only accept alphanumeric characters - `local` allows for special characters `+`, `_`, `.` and `-` as well. - `domain` must be at least 2 letters long. - `.com` is not required. |
+| Address (Supplier, Customer) | a/ | - Can contain any letters |
+| Tag | t/ | - Should only contain alphanumeric characters - Should not contain spaces |
+| Deadline (Task, Order) | d/ | - Should be of the format `dd/MM/yyyy` - Dates that have passed are allowed |
+| Status (Task, Order) | s/ | - Should only contain alphanumeric characters |
+| Order Name | on/ | - Should only contain alphanumeric characters - Order name should be a valid menu item name |
+| Order Quantity | q/ | - Should only contain positive integer values |
+| Price | pr/ | - Should only contain positive numeric values - Allows for integers or values up to 2 decimal places |
+| Cost | c/ | - Should only contain positive numeric values - Allows for integers or values up to 2 decimal places |
+| Tab | t/ | - Should only contain alphabetical characters - Should be in all caps |
+| Criteria | c/ | - Should only contain alphabetical characters |
+
+## 6.2 Command Summary
+
+| Action | Format, Examples |
+|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| **Add** | `add_supplier` / `add_s` e.g., `add_s n/Betsy Cow t/diary e/betsycow@example.com a/Betsy Street p/12345678 t/meat`
`add_order` / `add_o` e.g., `add_o n/John Doe l/John Street d/12/12/2023 q/10 on/Cupcakes`
`add_task` / `add_t` e.g., `add_t d/Buy a card d/23/12/2024 s/D`
`clear_menu` / `clear_m` |
+| **Tab** | `tab` e.g., `tab t/Home` |
+| **Help** | `help` |
+| **Exit** | `exit` |
diff --git a/docs/_config.yml b/docs/_config.yml
index 6bd245d8f4e..673af829067 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -1,4 +1,4 @@
-title: "AB-3"
+title: "Trackr"
theme: minima
header_pages:
@@ -8,7 +8,7 @@ header_pages:
markdown: kramdown
-repository: "se-edu/addressbook-level3"
+repository: "AY2223S2-CS2103T-W15-2/tp"
github_icon: "images/github-icon.png"
plugins:
diff --git a/docs/_sass/minima/_base.scss b/docs/_sass/minima/_base.scss
index 0d3f6e80ced..b66d018386e 100644
--- a/docs/_sass/minima/_base.scss
+++ b/docs/_sass/minima/_base.scss
@@ -288,7 +288,7 @@ table {
text-align: center;
}
.site-header:before {
- content: "AB-3";
+ content: "Trackr";
font-size: 32px;
}
}
diff --git a/docs/_sass/minima/_layout.scss b/docs/_sass/minima/_layout.scss
index ca99f981701..885a4128917 100644
--- a/docs/_sass/minima/_layout.scss
+++ b/docs/_sass/minima/_layout.scss
@@ -179,6 +179,14 @@
h1, h2, h3 { margin-top: $spacing-unit * 2 }
h4, h5, h6 { margin-top: $spacing-unit }
+ h1 {
+ @include relative-font-size(2);
+
+ @media screen and (min-width: $on-large) {
+ @include relative-font-size(2.25);
+ }
+ }
+
h2 {
@include relative-font-size(1.75);
diff --git a/docs/_sass/minima/custom-styles.scss b/docs/_sass/minima/custom-styles.scss
index 56b5d56b430..10fae147341 100644
--- a/docs/_sass/minima/custom-styles.scss
+++ b/docs/_sass/minima/custom-styles.scss
@@ -1,6 +1,6 @@
// Placeholder to allow defining custom styles that override everything else.
// (Use `_sass/minima/custom-variables.scss` to override variable defaults)
-h2, h3, h4, h5, h6 {
+h1, h2, h3, h4, h5, h6 {
color: #e46c0a;
}
diff --git a/docs/_sass/minima/custom-variables.scss b/docs/_sass/minima/custom-variables.scss
index a128970cbe7..075b2a0b924 100644
--- a/docs/_sass/minima/custom-variables.scss
+++ b/docs/_sass/minima/custom-variables.scss
@@ -37,8 +37,10 @@ $theme-colors: (
"secondary": $secondary,
"success": $success,
"info": $info,
+ "tip": $primary,
"warning": $warning,
"danger": $danger,
+ "example": $purple,
"light": $light,
"dark": $dark
) !default;
diff --git a/docs/diagrams/AddCommandActivityDiagram.puml b/docs/diagrams/AddCommandActivityDiagram.puml
new file mode 100644
index 00000000000..a1110b198b4
--- /dev/null
+++ b/docs/diagrams/AddCommandActivityDiagram.puml
@@ -0,0 +1,29 @@
+@startuml
+ !include style.puml
+
+ start
+ :User executes AddXYZCommand;
+ :AddXYZCommandParser extracts the relevant information
+ from the input argument;
+
+ 'Since the beta syntax does not support placing the condition outside the
+ 'diamond we place it as the true branch instead.
+
+ if () then ([Invalid Input Argument])
+ :Display error message
+ on invalid command argument;
+ stop
+ else ([else])
+ :Create XYZ object;
+ if() then ([List has Item])
+ :Display error message
+ on duplicate item;
+ stop
+ else ([else])
+ :Add XYZ to XYZ XYZList;
+ : Update XYZ in FilteredXYZList;
+ :Save XYZ to local data with internal XYZList;
+ endif
+ : Success message is returned;
+ stop
+ @enduml
diff --git a/docs/diagrams/ArchitectureDiagram.puml b/docs/diagrams/ArchitectureDiagram.puml
index 4c5cf58212e..47340c73df2 100644
--- a/docs/diagrams/ArchitectureDiagram.puml
+++ b/docs/diagrams/ArchitectureDiagram.puml
@@ -1,9 +1,10 @@
@startuml
-!include
!include
!include
!include style.puml
+skinparam BorderColor #FFFFFF
+
Package " "<>{
Class UI UI_COLOR
Class Logic LOGIC_COLOR
diff --git a/docs/diagrams/ArchitectureSequenceDiagram.puml b/docs/diagrams/ArchitectureSequenceDiagram.puml
index ef81d18c337..014ee6b5444 100644
--- a/docs/diagrams/ArchitectureSequenceDiagram.puml
+++ b/docs/diagrams/ArchitectureSequenceDiagram.puml
@@ -7,19 +7,19 @@ Participant ":Logic" as logic LOGIC_COLOR
Participant ":Model" as model MODEL_COLOR
Participant ":Storage" as storage STORAGE_COLOR
-user -[USER_COLOR]> ui : "delete 1"
+user -[USER_COLOR]> ui : "delete_supplier 1"
activate ui UI_COLOR
-ui -[UI_COLOR]> logic : execute("delete 1")
+ui -[UI_COLOR]> logic : execute("delete_supplier 1")
activate logic LOGIC_COLOR
-logic -[LOGIC_COLOR]> model : deletePerson(p)
+logic -[LOGIC_COLOR]> model : deleteItem(p, ModelEnum.SUPPLIER)
activate model MODEL_COLOR
model -[MODEL_COLOR]-> logic
deactivate model
-logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook)
+logic -[LOGIC_COLOR]> storage : saveTrackr(supplierList, taskList, orderList)
activate storage STORAGE_COLOR
storage -[STORAGE_COLOR]> storage : Save to file
diff --git a/docs/diagrams/BetterModelClassDiagram.puml b/docs/diagrams/BetterModelClassDiagram.puml
deleted file mode 100644
index 598474a5c82..00000000000
--- a/docs/diagrams/BetterModelClassDiagram.puml
+++ /dev/null
@@ -1,21 +0,0 @@
-@startuml
-!include style.puml
-skinparam arrowThickness 1.1
-skinparam arrowColor MODEL_COLOR
-skinparam classBackgroundColor MODEL_COLOR
-
-AddressBook *-right-> "1" UniquePersonList
-AddressBook *-right-> "1" UniqueTagList
-UniqueTagList -[hidden]down- UniquePersonList
-UniqueTagList -[hidden]down- UniquePersonList
-
-UniqueTagList -right-> "*" Tag
-UniquePersonList -right-> Person
-
-Person -up-> "*" Tag
-
-Person *--> Name
-Person *--> Phone
-Person *--> Email
-Person *--> Address
-@enduml
diff --git a/docs/diagrams/ClearCommandActivityDiagram.puml b/docs/diagrams/ClearCommandActivityDiagram.puml
new file mode 100644
index 00000000000..8d3269151aa
--- /dev/null
+++ b/docs/diagrams/ClearCommandActivityDiagram.puml
@@ -0,0 +1,15 @@
+@startuml
+skinparam activityFontSize 20
+skinparam activityArrowFontSize 18
+
+'Since the beta syntax does not support placing the condition outside the
+'diamond we place it as the true branch instead.
+
+start
+:User enters ClearXYZCommand;
+:Trackr removes all XYZ items from XYZList;
+:Save data into data file;
+:Shows success message;
+stop
+
+@enduml
diff --git a/docs/diagrams/CommitActivityDiagram.puml b/docs/diagrams/CommitActivityDiagram.puml
index 6a6b23a006f..5dba92b0fb2 100644
--- a/docs/diagrams/CommitActivityDiagram.puml
+++ b/docs/diagrams/CommitActivityDiagram.puml
@@ -7,8 +7,8 @@ start
if () then ([command commits AddressBook])
:Purge redundant states;
- :Save AddressBook to
- addressBookStateList;
+ :Save Trackr to
+ trackrStateList;
else ([else])
endif
stop
diff --git a/docs/diagrams/ComponentManagers.puml b/docs/diagrams/ComponentManagers.puml
index 5e907dc1115..bf5321da97d 100644
--- a/docs/diagrams/ComponentManagers.puml
+++ b/docs/diagrams/ComponentManagers.puml
@@ -1,31 +1,29 @@
@startuml
!include style.puml
skinparam arrowThickness 1.1
-skinparam arrowColor LOGIC_COLOR_T4
-skinparam classBackgroundColor LOGIC_COLOR
-package Logic {
-Class "<>\nLogic" as Logic
-Class LogicManager
+package "Logic " LOGIC_COLOR_T1 {
+Class "<>\nLogic" as Logic LOGIC_COLOR
+Class LogicManager LOGIC_COLOR
}
-package Model{
-Class "<>\nModel" as Model
-Class ModelManager
+package "Model " MODEL_COLOR_T1 {
+Class "<>\nModel" as Model MODEL_COLOR
+Class ModelManager MODEL_COLOR
}
-package Storage{
-Class "<>\nStorage" as Storage
-Class StorageManager
+package "Storage " STORAGE_COLOR_T1 {
+Class "<>\nStorage" as Storage STORAGE_COLOR
+Class StorageManager STORAGE_COLOR
}
Class HiddenOutside #FFFFFF
HiddenOutside ..> Logic
-LogicManager .up.|> Logic
-ModelManager .up.|> Model
-StorageManager .up.|> Storage
+LogicManager .[LOGIC_COLOR]up.|> Logic
+ModelManager .[MODEL_COLOR]up.|> Model
+StorageManager .[STORAGE_COLOR]up.|> Storage
-LogicManager --> Model
-LogicManager --> Storage
+LogicManager -[LOGIC_COLOR]-> Model
+LogicManager -[LOGIC_COLOR]-> Storage
@enduml
diff --git a/docs/diagrams/DeleteCommandActivityDiagram.puml b/docs/diagrams/DeleteCommandActivityDiagram.puml
new file mode 100644
index 00000000000..ff193f9f2d3
--- /dev/null
+++ b/docs/diagrams/DeleteCommandActivityDiagram.puml
@@ -0,0 +1,28 @@
+@startuml
+!include style.puml
+
+start
+:User executes DeleteXYZCommand;
+:DeleteXYZCommandParser extracts the relevant one-based index
+from the input argument;
+
+'Since the beta syntax does not support placing the condition outside the
+'diamond we place it as the true branch instead.
+
+if () then ([Invalid Index Argument])
+ :Display error message
+ on invalid command argument;
+ stop
+else ([else])
+ :Get zero-based index from one-based index;
+ :Check out-of-bounds condition for index on FilteredXYZList;
+ if () then ([true])
+ : Display invalid XYZ index error message;
+ stop
+ else ([false])
+ : Retrieve item to delete from FilteredXYZList;
+ : Item is deleted from XYZList;
+ : XYZList with XYZ removed is saved to local storage;
+ : Success message is returned;
+ stop
+@enduml
diff --git a/docs/diagrams/DeleteSequenceDiagram.puml b/docs/diagrams/DeleteSequenceDiagram.puml
index 1dc2311b245..e1aebaf7c15 100644
--- a/docs/diagrams/DeleteSequenceDiagram.puml
+++ b/docs/diagrams/DeleteSequenceDiagram.puml
@@ -3,9 +3,9 @@
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 ":TrackrParser" as TrackrParser LOGIC_COLOR
+participant ":DeleteOrder\nCommandParser" as DeleteOrderCommandParser LOGIC_COLOR
+participant "d:DeleteOrder\nCommand" as DeleteOrderCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
end box
@@ -13,56 +13,56 @@ box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
end box
-[-> LogicManager : execute("delete 1")
+[-> LogicManager : execute("delete_order 1")
activate LogicManager
-LogicManager -> AddressBookParser : parseCommand("delete 1")
-activate AddressBookParser
+LogicManager -> TrackrParser : parseCommand("delete_order 1")
+activate TrackrParser
-create DeleteCommandParser
-AddressBookParser -> DeleteCommandParser
-activate DeleteCommandParser
+create DeleteOrderCommandParser
+TrackrParser -> DeleteOrderCommandParser
+activate DeleteOrderCommandParser
-DeleteCommandParser --> AddressBookParser
-deactivate DeleteCommandParser
+DeleteOrderCommandParser --> TrackrParser
+deactivate DeleteOrderCommandParser
-AddressBookParser -> DeleteCommandParser : parse("1")
-activate DeleteCommandParser
+TrackrParser -> DeleteOrderCommandParser : parse("1")
+activate DeleteOrderCommandParser
-create DeleteCommand
-DeleteCommandParser -> DeleteCommand
-activate DeleteCommand
+create DeleteOrderCommand
+DeleteOrderCommandParser -> DeleteOrderCommand
+activate DeleteOrderCommand
-DeleteCommand --> DeleteCommandParser : d
-deactivate DeleteCommand
+DeleteOrderCommand --> DeleteOrderCommandParser : d
+deactivate DeleteOrderCommand
-DeleteCommandParser --> AddressBookParser : d
-deactivate DeleteCommandParser
+DeleteOrderCommandParser --> TrackrParser : d
+deactivate DeleteOrderCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
-DeleteCommandParser -[hidden]-> AddressBookParser
-destroy DeleteCommandParser
+DeleteOrderCommandParser -[hidden]-> TrackrParser
+destroy DeleteOrderCommandParser
-AddressBookParser --> LogicManager : d
-deactivate AddressBookParser
+TrackrParser --> LogicManager : d
+deactivate TrackrParser
-LogicManager -> DeleteCommand : execute()
-activate DeleteCommand
+LogicManager -> DeleteOrderCommand : execute()
+activate DeleteOrderCommand
-DeleteCommand -> Model : deletePerson(1)
+DeleteOrderCommand -> Model : deleteItem(1,\nModelEnum.ORDER)
activate Model
-Model --> DeleteCommand
+Model --> DeleteOrderCommand
deactivate Model
create CommandResult
-DeleteCommand -> CommandResult
+DeleteOrderCommand -> CommandResult
activate CommandResult
-CommandResult --> DeleteCommand
+CommandResult --> DeleteOrderCommand
deactivate CommandResult
-DeleteCommand --> LogicManager : result
-deactivate DeleteCommand
+DeleteOrderCommand --> LogicManager : result
+deactivate DeleteOrderCommand
[<--LogicManager
deactivate LogicManager
diff --git a/docs/diagrams/EditCommandActivityDiagram.puml b/docs/diagrams/EditCommandActivityDiagram.puml
new file mode 100644
index 00000000000..894434bce60
--- /dev/null
+++ b/docs/diagrams/EditCommandActivityDiagram.puml
@@ -0,0 +1,37 @@
+@startuml
+skinparam activityFontSize 20
+skinparam activityArrowFontSize 18
+
+'@@author HmuuMyatMoe-reused
+'Reused from https://forum.plantuml.net/195/is-there-any-support-for-subactivity-or-the-rake-symbol
+sprite $rake
+'@@author
+
+start
+:User enters command
+to edit XYZ in XYZ List;
+:EditXYZCommandParser
+ parses the user input;
+if () then ([Invalid command format])
+ :Display Invalid Command Format
+ error message;
+ stop
+else ([else])
+:Change one-based index
+ to zero-based index;
+:Check if index given is valid;
+
+if () then ([Index is out of bounds])
+ :Display Invalid Item
+ Index error message;
+ stop
+else ([else])
+:Edit item XYZ <$rake>;
+stop
+
+@enduml
diff --git a/docs/diagrams/EditItemXYZRakeActivityDiagram.puml b/docs/diagrams/EditItemXYZRakeActivityDiagram.puml
new file mode 100644
index 00000000000..f556989cc63
--- /dev/null
+++ b/docs/diagrams/EditItemXYZRakeActivityDiagram.puml
@@ -0,0 +1,28 @@
+@startuml
+skinparam activityFontSize 20
+skinparam activityArrowFontSize 18
+skinparam titleFontSize 25
+
+title Activity: Edit item XYZ\n
+
+start
+:Item XYZ at index (zero-based)
+retrieved from its FilteredXYZList;
+:Copy of the item XYZ is made and edited;
+
+if () then (
+[Edited item is considered to be the same as
+other items in the list or same as original item]
+)
+:Display duplicate item error message;
+stop
+
+else ([else]
+)
+:Item in XYZ List is edited;
+:FilteredXYZList is updated;
+:Changes made are saved to local data;
+:Edit Success Message is returned;
+stop
+
+@enduml
diff --git a/docs/diagrams/FindCommandActivityDiagram.puml b/docs/diagrams/FindCommandActivityDiagram.puml
new file mode 100644
index 00000000000..197ee930ccb
--- /dev/null
+++ b/docs/diagrams/FindCommandActivityDiagram.puml
@@ -0,0 +1,30 @@
+@startuml
+!include style.puml
+
+start
+:User executes FindXYZCommand;
+:FindXYZCommandParser extracts the relevant information
+from the input argument;
+
+'Since the beta syntax does not support placing the condition outside the
+'diamond we place it as the true branch instead.
+
+if () then ([Invalid Input Argument])
+ :Display error message
+ on invalid command argument;
+ stop
+else ([else])
+ :Create XYZContainsKeywordPredicate;
+ repeat;
+ :Check if current XYZ
+ matches predicate;
+ if () then ([true])
+ : Keep XYZ in filtered list;
+ else ([false])
+
+ endif
+ repeat while () is ([Have remaining XYZ in XYZList]) not ([else])
+: Show all filtered XYZ in FilteredXYZList;
+: Success message is returned;
+stop
+@enduml
diff --git a/docs/diagrams/ItemClassDiagram.puml b/docs/diagrams/ItemClassDiagram.puml
new file mode 100644
index 00000000000..93d9bd791f2
--- /dev/null
+++ b/docs/diagrams/ItemClassDiagram.puml
@@ -0,0 +1,23 @@
+@startuml
+!include style.puml
+skinparam arrowThickness 1.1
+skinparam arrowColor MODEL_COLOR
+skinparam classBackgroundColor MODEL_COLOR
+
+
+Enum "<>\nModelEnum" as ModelEnum{
+SUPPLIER
+TASK
+ORDER
+CUSTOMER
+}
+Abstract Class "{abstract}\nItem" as Item
+Class ItemList
+Class "UniqueItemList " as UniqueItemList
+
+
+Item -right-> "1 " ModelEnum
+UniqueItemList -up-> " *" Item
+ItemList -left-> " 1" UniqueItemList
+
+@enduml
diff --git a/docs/diagrams/ListCommandActivityDiagram.puml b/docs/diagrams/ListCommandActivityDiagram.puml
new file mode 100644
index 00000000000..9eca606c909
--- /dev/null
+++ b/docs/diagrams/ListCommandActivityDiagram.puml
@@ -0,0 +1,11 @@
+@startuml
+!include style.puml
+
+ start
+ :User executes ListXYZCommand;
+ :Retrieve FilteredXYZList;
+ :FilteredXYZList is updated to have all XYZ objects;
+ :XYZList is shown to the users;
+ :Success message is returned;
+ stop
+ @enduml
diff --git a/docs/diagrams/LogicClassDiagram.puml b/docs/diagrams/LogicClassDiagram.puml
index d4193173e18..3502e9fcd10 100644
--- a/docs/diagrams/LogicClassDiagram.puml
+++ b/docs/diagrams/LogicClassDiagram.puml
@@ -6,7 +6,7 @@ skinparam classBackgroundColor LOGIC_COLOR
package Logic {
-Class AddressBookParser
+Class TrackrParser
Class XYZCommand
Class CommandResult
Class "{abstract}\nCommand" as Command
@@ -27,8 +27,8 @@ Class HiddenOutside #FFFFFF
HiddenOutside ..> Logic
LogicManager .right.|> Logic
-LogicManager -right->"1" AddressBookParser
-AddressBookParser ..> XYZCommand : creates >
+LogicManager -right->"1" TrackrParser
+TrackrParser ..> XYZCommand : creates >
XYZCommand -up-|> Command
LogicManager .left.> Command : executes >
@@ -38,7 +38,7 @@ LogicManager --> Storage
Storage --[hidden] Model
Command .[hidden]up.> Storage
Command .right.> Model
-note right of XYZCommand: XYZCommand = AddCommand, \nFindCommand, etc
+note right of XYZCommand: XYZCommand = AddOrderCommand, \nFindOrderCommand, etc
Logic ..> CommandResult
LogicManager .down.> CommandResult
diff --git a/docs/diagrams/MenuClassDiagram.puml b/docs/diagrams/MenuClassDiagram.puml
new file mode 100644
index 00000000000..955c7bd4144
--- /dev/null
+++ b/docs/diagrams/MenuClassDiagram.puml
@@ -0,0 +1,49 @@
+@startuml
+!include style.puml
+skinparam arrowThickness 1.1
+skinparam arrowColor MODEL_COLOR
+skinparam classBackgroundColor MODEL_COLOR
+skinparam groupInheritance 1
+
+top to bottom direction
+
+Abstract Class "{abstract}\nItem" as Item
+Abstract Class "{abstract}\nName" as Name
+Class "UniqueItemList " as UniqueItemList
+Class ItemList
+
+
+Class MenuItem
+Class ItemSellingPrice
+Class ItemProfit
+Class ItemPrice
+Class ItemCost
+Class ItemName
+Class Menu extends ItemList
+Class UniqueMenuItemList extends UniqueItemList
+Class ItemSellingPrice extends ItemPrice
+Class ItemCost extends ItemPrice
+
+
+ItemList *--r> "1" UniqueItemList
+UniqueItemList -r>"*" Item
+
+Menu *--r> "1 " UniqueMenuItemList
+UniqueMenuItemList -r>"*" MenuItem
+
+MenuItem *--> " 1" ItemSellingPrice
+MenuItem *--> "1 " ItemProfit
+MenuItem *--> " 1" ItemCost
+MenuItem *--> "1" ItemName
+
+ItemProfit .left.> " 1 " ItemSellingPrice
+ItemProfit ..> " 1 " ItemCost
+
+
+
+
+MenuItem -u|> Item
+
+ItemName --|> Name
+
+@enduml
diff --git a/docs/diagrams/ModelClassDiagram.puml b/docs/diagrams/ModelClassDiagram.puml
index 4439108973a..b5f28f874be 100644
--- a/docs/diagrams/ModelClassDiagram.puml
+++ b/docs/diagrams/ModelClassDiagram.puml
@@ -4,47 +4,42 @@ skinparam arrowThickness 1.1
skinparam arrowColor MODEL_COLOR
skinparam classBackgroundColor MODEL_COLOR
-Package Model <>{
-Class "<>\nReadOnlyAddressBook" as ReadOnlyAddressBook
+top to bottom direction
+
+package "Model " MODEL_COLOR_T1 {
+Class "<>\nReadOnlyXYZList" as ReadOnlyXYZList
Class "<>\nReadOnlyUserPrefs" as ReadOnlyUserPrefs
Class "<>\nModel" as Model
-Class AddressBook
+Class XYZList
Class ModelManager
Class UserPrefs
-
-Class UniquePersonList
-Class Person
-Class Address
-Class Email
-Class Name
-Class Phone
-Class Tag
-
+Class UniqueXYZList
+Class XYZ
+Class "{abstract}\nItem" as Item
+Class ItemList
+Class "UniqueItemList " as UniqueItemList
}
Class HiddenOutside #FFFFFF
HiddenOutside ..> Model
-AddressBook .up.|> ReadOnlyAddressBook
+ModelManager ..u|> Model
+Model ..r> ReadOnlyUserPrefs
+Model ..l> ReadOnlyXYZList
+ModelManager --l> " 1" XYZList
+ModelManager --r> "1 " UserPrefs
+UserPrefs ..u> ReadOnlyUserPrefs
-ModelManager .up.|> Model
-Model .right.> ReadOnlyUserPrefs
-Model .left.> ReadOnlyAddressBook
-ModelManager -left-> "1" AddressBook
-ModelManager -right-> "1" UserPrefs
-UserPrefs .up.|> ReadOnlyUserPrefs
+XYZList ..u|> ReadOnlyXYZList
+XYZList *--d> " 1" UniqueXYZList
+UniqueXYZList --> "*" XYZ : contains all >
-AddressBook *--> "1" UniquePersonList
-UniquePersonList --> "~* all" Person
-Person *--> Name
-Person *--> Phone
-Person *--> Email
-Person *--> Address
-Person *--> "*" Tag
+ModelManager ----> "*" XYZ : contains filtered >
-Name -[hidden]right-> Phone
-Phone -[hidden]right-> Address
-Address -[hidden]right-> Email
+ItemList *-d> "1 " UniqueItemList
+UniqueItemList -d> " *" Item
-ModelManager -->"~* filtered" Person
+UniqueXYZList --l|> UniqueItemList
+XYZList --l|> ItemList
+XYZ --l|> Item
@enduml
diff --git a/docs/diagrams/OrderClassDiagram.puml b/docs/diagrams/OrderClassDiagram.puml
new file mode 100644
index 00000000000..c8e8a1398fe
--- /dev/null
+++ b/docs/diagrams/OrderClassDiagram.puml
@@ -0,0 +1,44 @@
+@startuml
+!include style.puml
+skinparam arrowThickness 1.1
+skinparam arrowColor MODEL_COLOR
+skinparam classBackgroundColor MODEL_COLOR
+skinparam groupInheritance 1
+
+top to bottom direction
+
+Abstract Class "{abstract}\nItem" as Item
+Abstract Class "{abstract}\nDeadline" as Deadline
+Abstract Class "{abstract}\nStatus" as Status
+Class "UniqueItemList " as UniqueItemList
+Class ItemList
+
+Class LocalDateTime
+Class Order
+Class MenuItem
+Class Customer
+Class OrderQuantity
+Class OrderStatus
+Class OrderDeadline
+Class OrderList extends ItemList
+Class UniqueOrderList extends UniqueItemList
+Class ItemList
+
+
+ItemList *--r> "1" UniqueItemList
+UniqueItemList -r>"*" Item
+
+OrderList *--r> "1 " UniqueOrderList
+UniqueOrderList ->"*" Order
+Order *--> "1" MenuItem
+Order *--> "1" OrderDeadline
+Order *--> "1 " OrderStatus
+Order *--> "1 " Customer
+Order *--> "1 " OrderQuantity
+Order *--> "1 " LocalDateTime
+Order -u|> Item
+
+OrderDeadline --|> Deadline
+OrderStatus --|> Status
+
+@enduml
diff --git a/docs/diagrams/PersonClassDiagram.puml b/docs/diagrams/PersonClassDiagram.puml
new file mode 100644
index 00000000000..430052a46f2
--- /dev/null
+++ b/docs/diagrams/PersonClassDiagram.puml
@@ -0,0 +1,49 @@
+@startuml
+!include style.puml
+skinparam arrowThickness 1.1
+skinparam arrowColor MODEL_COLOR
+skinparam classBackgroundColor MODEL_COLOR
+skinparam groupInheritance 1
+
+Abstract Class "{abstract}\nItem" as Item
+Abstract Class "{abstract}\nPerson" as Person
+Class Supplier
+Class Customer
+Abstract Class "{abstract}\nName" as Name
+
+together {
+Class PersonName
+Class PersonAddress
+Class PersonEmail
+Class PersonPhone
+Class Tag
+}
+
+Class ItemList
+Class "UniqueItemList " as UniqueItemList
+
+ItemList *--> "1" UniqueItemList
+UniqueItemList --> "*" Item
+
+SupplierList *--> "1" UniqueSupplierList
+UniqueSupplierList --> "*" Supplier
+SupplierList --l|> ItemList
+UniqueSupplierList --l|> UniqueItemList
+CustomerList *--d> "1" UniqueCustomerList
+UniqueCustomerList --d> " *" Customer
+CustomerList --r|> ItemList
+UniqueCustomerList --r|> UniqueItemList
+
+Person *--> "1" PersonName
+Person *--> "1" PersonPhone
+Person *--> "1" PersonEmail
+Person *--> "1" PersonAddress
+Person *--> "*" Tag
+Person --u|> Item
+
+Supplier --|> Person
+Customer --|> Person
+
+PersonName --|> Name
+
+@enduml
diff --git a/docs/diagrams/SortCommandActivityDiagram.puml b/docs/diagrams/SortCommandActivityDiagram.puml
new file mode 100644
index 00000000000..2b885843b0e
--- /dev/null
+++ b/docs/diagrams/SortCommandActivityDiagram.puml
@@ -0,0 +1,19 @@
+@startuml
+skinparam activityFontSize 18
+skinparam activityArrowFontSize 18
+
+start
+:User enters command to sort XYZ List;
+:SortXYZCommandParser
+ parses the user input;
+if () then ([Invalid command format])
+ :Display Invalid Command Format
+ error message;
+ stop
+else ([else])
+:Create SortXYZComparator;
+:Sort FilteredXYZList using SortXYZComparator;
+:Success message is returned;
+stop
+
+@enduml
diff --git a/docs/diagrams/StorageClassDiagram.puml b/docs/diagrams/StorageClassDiagram.puml
index 760305e0e58..1ec1baf4ca1 100644
--- a/docs/diagrams/StorageClassDiagram.puml
+++ b/docs/diagrams/StorageClassDiagram.puml
@@ -14,12 +14,14 @@ Class JsonUserPrefsStorage
Class "<>\nStorage" as Storage
Class StorageManager
-package "AddressBook Storage" #F4F6F6{
-Class "<>\nAddressBookStorage" as AddressBookStorage
-Class JsonAddressBookStorage
-Class JsonSerializableAddressBook
-Class JsonAdaptedPerson
+package "Trackr Storage" #F4F6F6{
+Class "<>\nTrackrStorage" as TrackrStorage
+Class JsonTrackrStorage
+Class JsonSerializableTrackr
+Class JsonAdaptedSupplier
Class JsonAdaptedTag
+Class JsonAdaptedTask
+Class JsonAdaptedOrder
}
}
@@ -29,15 +31,17 @@ HiddenOutside ..> Storage
StorageManager .up.|> Storage
StorageManager -up-> "1" UserPrefsStorage
-StorageManager -up-> "1" AddressBookStorage
+StorageManager -up-> "1" TrackrStorage
Storage -left-|> UserPrefsStorage
-Storage -right-|> AddressBookStorage
+Storage -right-|> TrackrStorage
JsonUserPrefsStorage .up.|> UserPrefsStorage
-JsonAddressBookStorage .up.|> AddressBookStorage
-JsonAddressBookStorage ..> JsonSerializableAddressBook
-JsonSerializableAddressBook --> "*" JsonAdaptedPerson
-JsonAdaptedPerson --> "*" JsonAdaptedTag
+JsonTrackrStorage .up.|> TrackrStorage
+JsonTrackrStorage ..> JsonSerializableTrackr
+JsonSerializableTrackr --> "*" JsonAdaptedSupplier
+JsonAdaptedSupplier --> "*" JsonAdaptedTag
+JsonSerializableTrackr --> "*" JsonAdaptedOrder
+JsonSerializableTrackr --> "*" JsonAdaptedTask
@enduml
diff --git a/docs/diagrams/TabCommandActivityDiagram.puml b/docs/diagrams/TabCommandActivityDiagram.puml
new file mode 100644
index 00000000000..c36055abdc1
--- /dev/null
+++ b/docs/diagrams/TabCommandActivityDiagram.puml
@@ -0,0 +1,27 @@
+@startuml
+!include style.puml
+
+start
+:User executes TabCommand;
+:TabCommandParser extracts the relevant zero-based index
+from the supplied Target Tab name from TabEnum;
+
+'Since the beta syntax does not support placing the condition outside the
+'diamond we place it as the true branch instead.
+
+if () then ([Invalid Index Argument])
+ :Display error message
+ on invalid command argument;
+ stop
+else ([else])
+ :Get zero-based index;
+ :Update ObservableTabIndex to the index;
+ :Listener in Ui observes the change;
+ if () then ([No change in
+ ObservableTabIndex])
+ :Same Tab is shown;
+ stop
+ else ([else])
+ :Target Tab is shown;
+ stop
+@enduml
diff --git a/docs/diagrams/TaskClassDiagram.puml b/docs/diagrams/TaskClassDiagram.puml
new file mode 100644
index 00000000000..af682d6472b
--- /dev/null
+++ b/docs/diagrams/TaskClassDiagram.puml
@@ -0,0 +1,40 @@
+@startuml
+!include style.puml
+skinparam arrowThickness 1.1
+skinparam arrowColor MODEL_COLOR
+skinparam classBackgroundColor MODEL_COLOR
+skinparam groupInheritance 1
+
+top to bottom direction
+
+Abstract Class "{abstract}\nItem" as Item
+Abstract Class "{abstract}\nName" as Name
+Abstract Class "{abstract}\nDeadline" as Deadline
+Abstract Class "{abstract}\nStatus" as Status
+Class "UniqueItemList " as UniqueItemList
+Class ItemList
+
+Class LocalDateTime
+Class Task
+Class TaskName
+Class TaskStatus
+Class TaskDeadline
+Class TaskList extends ItemList
+Class UniqueTaskList extends UniqueItemList
+
+ItemList *--r> "1" UniqueItemList
+UniqueItemList -r> "*" Item
+
+TaskList *--r> "1 " UniqueTaskList
+UniqueTaskList -r> "*" Task
+Task *--> "1" TaskName
+Task *--> " 1" TaskDeadline
+Task *--> "1 " TaskStatus
+Task *--> "1" LocalDateTime
+Task -u|> Item
+
+TaskName --|> Name
+TaskDeadline --|> Deadline
+TaskStatus --|> Status
+
+@enduml
diff --git a/docs/diagrams/UiClassDiagram.puml b/docs/diagrams/UiClassDiagram.puml
index 95473d5aa19..171f1ddf1b6 100644
--- a/docs/diagrams/UiClassDiagram.puml
+++ b/docs/diagrams/UiClassDiagram.puml
@@ -4,25 +4,28 @@ skinparam arrowThickness 1.1
skinparam arrowColor UI_COLOR_T4
skinparam classBackgroundColor UI_COLOR
-package UI <>{
+package UI <> UI_COLOR_T1 {
Class "<>\nUi" as Ui
Class "{abstract}\nUiPart" as UiPart
Class UiManager
Class MainWindow
Class HelpWindow
Class ResultDisplay
-Class PersonListPanel
-Class PersonCard
+Class TabPanel
+Class XYZListPanel
+Class XYZCard
+Class HomeView
+Class FinanceCard
Class StatusBarFooter
Class CommandBox
}
-package Model <> {
-Class HiddenModel #FFFFFF
+package Model <> MODEL_COLOR_T1 {
+Class " " as HiddenModel MODEL_COLOR_T1
}
-package Logic <> {
-Class HiddenLogic #FFFFFF
+package Logic <> LOGIC_COLOR_T1 {
+Class " " as HiddenLogic LOGIC_COLOR_T1
}
Class HiddenOutside #FFFFFF
@@ -32,29 +35,41 @@ UiManager .left.|> Ui
UiManager -down-> "1" MainWindow
MainWindow *-down-> "1" CommandBox
MainWindow *-down-> "1" ResultDisplay
-MainWindow *-down-> "1" PersonListPanel
+MainWindow *-down-> "1" TabPanel
MainWindow *-down-> "1" StatusBarFooter
MainWindow --> "0..1" HelpWindow
-PersonListPanel -down-> "*" PersonCard
+TabPanel -down-> "1" HomeView
+TabPanel -down-> "*" XYZListPanel
-MainWindow -left-|> UiPart
+XYZListPanel -down-> "*" XYZCard
+
+HomeView -down-> "*" XYZListPanel
+HomeView -down-> "1" FinanceCard
ResultDisplay --|> UiPart
CommandBox --|> UiPart
-PersonListPanel --|> UiPart
-PersonCard --|> UiPart
StatusBarFooter --|> UiPart
HelpWindow --|> UiPart
+XYZCard --|> UiPart
+FinanceCard --|> UiPart
+MainWindow -left-|> UiPart
+
+XYZCard ..> Model
+FinanceCard ..> Model
-PersonCard ..> Model
UiManager -right-> Logic
MainWindow -left-> Logic
-PersonListPanel -[hidden]left- HelpWindow
-HelpWindow -[hidden]left- CommandBox
+HomeView -[hidden]right- XYZListPanel
+
+note right of XYZListPanel: XYZListPanel = TaskListView, \n OrderListView, MenuItemListView etc.
+note right of XYZCard: XYZCard = TaskCard, OrderCard, \n MenuItemCard etc.
+
+TabPanel -[hidden]left- CommandBox
CommandBox -[hidden]left- ResultDisplay
ResultDisplay -[hidden]left- StatusBarFooter
+StatusBarFooter -[hidden]left- HelpWindow
MainWindow -[hidden]-|> UiPart
@enduml
diff --git a/docs/diagrams/UndoRedoState0.puml b/docs/diagrams/UndoRedoState0.puml
index 96e30744d24..e6094627e3c 100644
--- a/docs/diagrams/UndoRedoState0.puml
+++ b/docs/diagrams/UndoRedoState0.puml
@@ -6,15 +6,15 @@ skinparam ClassBorderColor #000000
title Initial state
package States {
- class State1 as "__ab0:AddressBook__"
- class State2 as "__ab1:AddressBook__"
- class State3 as "__ab2:AddressBook__"
+ class State1 as "__t0:Trackr__" STATE_COLOR
+ class State2 as "__t1:Trackr__" STATE_COLOR
+ class State3 as "__t2:Trackr__" STATE_COLOR
}
State1 -[hidden]right-> State2
State2 -[hidden]right-> State3
hide State2
hide State3
-class Pointer as "Current State" #FFFFF
+class Pointer as "Current State"
Pointer -up-> State1
@end
diff --git a/docs/diagrams/UndoRedoState1.puml b/docs/diagrams/UndoRedoState1.puml
index 01fcb9b2b96..4da3279210f 100644
--- a/docs/diagrams/UndoRedoState1.puml
+++ b/docs/diagrams/UndoRedoState1.puml
@@ -3,12 +3,12 @@
skinparam ClassFontColor #000000
skinparam ClassBorderColor #000000
-title After command "delete 5"
+title After command "delete_task 5"
package States <> {
- class State1 as "__ab0:AddressBook__"
- class State2 as "__ab1:AddressBook__"
- class State3 as "__ab2:AddressBook__"
+ class State1 as "__t0:Trackr__" STATE_COLOR
+ class State2 as "__t1:Trackr__" STATE_COLOR
+ class State3 as "__t2:Trackr__" STATE_COLOR
}
State1 -[hidden]right-> State2
@@ -16,7 +16,7 @@ State2 -[hidden]right-> State3
hide State3
-class Pointer as "Current State" #FFFFF
+class Pointer as "Current State"
Pointer -up-> State2
@end
diff --git a/docs/diagrams/UndoRedoState2.puml b/docs/diagrams/UndoRedoState2.puml
index bccc230a5d1..d38d23cb653 100644
--- a/docs/diagrams/UndoRedoState2.puml
+++ b/docs/diagrams/UndoRedoState2.puml
@@ -3,18 +3,18 @@
skinparam ClassFontColor #000000
skinparam ClassBorderColor #000000
-title After command "add n/David"
+title After command "add_task n/Sort Storage d/01/01/2024"
package States <> {
- class State1 as "__ab0:AddressBook__"
- class State2 as "__ab1:AddressBook__"
- class State3 as "__ab2:AddressBook__"
+ class State1 as "__t0:Trackr__" STATE_COLOR
+ class State2 as "__t1:Trackr__" STATE_COLOR
+ class State3 as "__t2:Trackr__" STATE_COLOR
}
State1 -[hidden]right-> State2
State2 -[hidden]right-> State3
-class Pointer as "Current State" #FFFFF
+class Pointer as "Current State"
Pointer -up-> State3
@end
diff --git a/docs/diagrams/UndoRedoState3.puml b/docs/diagrams/UndoRedoState3.puml
index ea29c9483e4..9e98d33ed2a 100644
--- a/docs/diagrams/UndoRedoState3.puml
+++ b/docs/diagrams/UndoRedoState3.puml
@@ -6,15 +6,15 @@ skinparam ClassBorderColor #000000
title After command "undo"
package States <> {
- class State1 as "__ab0:AddressBook__"
- class State2 as "__ab1:AddressBook__"
- class State3 as "__ab2:AddressBook__"
+ class State1 as "__t0:Trackr__" STATE_COLOR
+ class State2 as "__t1:Trackr__" STATE_COLOR
+ class State3 as "__t2:Trackr__" STATE_COLOR
}
State1 -[hidden]right-> State2
State2 -[hidden]right-> State3
-class Pointer as "Current State" #FFFFF
+class Pointer as "Current State"
Pointer -up-> State2
@end
diff --git a/docs/diagrams/UndoRedoState4.puml b/docs/diagrams/UndoRedoState4.puml
index 1b784cece80..f772010147a 100644
--- a/docs/diagrams/UndoRedoState4.puml
+++ b/docs/diagrams/UndoRedoState4.puml
@@ -6,15 +6,15 @@ skinparam ClassBorderColor #000000
title After command "list"
package States <> {
- class State1 as "__ab0:AddressBook__"
- class State2 as "__ab1:AddressBook__"
- class State3 as "__ab2:AddressBook__"
+ class State1 as "__t0:Trackr__" STATE_COLOR
+ class State2 as "__t1:Trackr__" STATE_COLOR
+ class State3 as "__t2:Trackr__" STATE_COLOR
}
State1 -[hidden]right-> State2
State2 -[hidden]right-> State3
-class Pointer as "Current State" #FFFFF
+class Pointer as "Current State"
Pointer -up-> State2
@end
diff --git a/docs/diagrams/UndoRedoState5.puml b/docs/diagrams/UndoRedoState5.puml
index 88927be32bc..2cf2749ada9 100644
--- a/docs/diagrams/UndoRedoState5.puml
+++ b/docs/diagrams/UndoRedoState5.puml
@@ -6,16 +6,16 @@ skinparam ClassBorderColor #000000
title After command "clear"
package States <> {
- class State1 as "__ab0:AddressBook__"
- class State2 as "__ab1:AddressBook__"
- class State3 as "__ab3:AddressBook__"
+ class State1 as "__t0:Trackr__" STATE_COLOR
+ class State2 as "__t1:Trackr__" STATE_COLOR
+ class State3 as "__t2:Trackr__" STATE_COLOR
}
State1 -[hidden]right-> State2
State2 -[hidden]right-> State3
-class Pointer as "Current State" #FFFFF
+class Pointer as "Current State"
Pointer -up-> State3
-note right on link: State ab2 deleted.
+note right on link #YELLOW : State ab2 deleted.
@end
diff --git a/docs/diagrams/UndoSequenceDiagram.puml b/docs/diagrams/UndoSequenceDiagram.puml
index 410aab4e412..e38e19935ab 100644
--- a/docs/diagrams/UndoSequenceDiagram.puml
+++ b/docs/diagrams/UndoSequenceDiagram.puml
@@ -3,42 +3,42 @@
box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
-participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
+participant ":TrackrParser" as TrackrParser LOGIC_COLOR
participant "u:UndoCommand" as UndoCommand LOGIC_COLOR
end box
box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
-participant ":VersionedAddressBook" as VersionedAddressBook MODEL_COLOR
+participant ":VersionedTrackr" as VersionedTrackr MODEL_COLOR
end box
[-> LogicManager : execute(undo)
activate LogicManager
-LogicManager -> AddressBookParser : parseCommand(undo)
-activate AddressBookParser
+LogicManager -> TrackrParser : parseCommand(undo)
+activate TrackrParser
create UndoCommand
-AddressBookParser -> UndoCommand
+TrackrParser -> UndoCommand
activate UndoCommand
-UndoCommand --> AddressBookParser
+UndoCommand --> TrackrParser
deactivate UndoCommand
-AddressBookParser --> LogicManager : u
-deactivate AddressBookParser
+TrackrParser --> LogicManager : u
+deactivate TrackrParser
LogicManager -> UndoCommand : execute()
activate UndoCommand
-UndoCommand -> Model : undoAddressBook()
+UndoCommand -> Model : undoTrackr()
activate Model
-Model -> VersionedAddressBook : undo()
-activate VersionedAddressBook
+Model -> VersionedTrackr : undo()
+activate VersionedTrackr
-VersionedAddressBook -> VersionedAddressBook :resetData(ReadOnlyAddressBook)
-VersionedAddressBook --> Model :
-deactivate VersionedAddressBook
+VersionedTrackr -> VersionedTrackr :resetData(ReadOnlyTrackr)
+VersionedTrackr --> Model :
+deactivate VersionedTrackr
Model --> UndoCommand
deactivate Model
diff --git a/docs/diagrams/style.puml b/docs/diagrams/style.puml
index fad8b0adeaa..04bdcecebe5 100644
--- a/docs/diagrams/style.puml
+++ b/docs/diagrams/style.puml
@@ -33,15 +33,19 @@
!define USER_COLOR #000000
+!define STATE_COLOR #FEFECE
+
+' Set White Background
skinparam BackgroundColor #FFFFFFF
+' Remove Shadows
skinparam Shadowing false
skinparam Class {
FontColor #FFFFFF
- BorderThickness 1
- BorderColor #FFFFFF
- StereotypeFontColor #FFFFFF
+ BorderThickness 0
+' BorderColor #FFFFFF
+' StereotypeFontColor #FFFFFF
FontName Arial
}
diff --git a/docs/images/AddCommandActivityDiagram.svg b/docs/images/AddCommandActivityDiagram.svg
new file mode 100644
index 00000000000..2a54482385f
--- /dev/null
+++ b/docs/images/AddCommandActivityDiagram.svg
@@ -0,0 +1,188 @@
+
+
diff --git a/docs/images/ArchitectureDiagram.png b/docs/images/ArchitectureDiagram.png
deleted file mode 100644
index 86c60246ccb..00000000000
Binary files a/docs/images/ArchitectureDiagram.png and /dev/null differ
diff --git a/docs/images/ArchitectureDiagram.svg b/docs/images/ArchitectureDiagram.svg
new file mode 100644
index 00000000000..d35bb2c73d3
--- /dev/null
+++ b/docs/images/ArchitectureDiagram.svg
@@ -0,0 +1,148 @@
+
+
diff --git a/docs/images/ArchitectureSequenceDiagram.png b/docs/images/ArchitectureSequenceDiagram.png
deleted file mode 100644
index 2f1346869d0..00000000000
Binary files a/docs/images/ArchitectureSequenceDiagram.png and /dev/null differ
diff --git a/docs/images/ArchitectureSequenceDiagram.svg b/docs/images/ArchitectureSequenceDiagram.svg
new file mode 100644
index 00000000000..5ea38b5dc0c
--- /dev/null
+++ b/docs/images/ArchitectureSequenceDiagram.svg
@@ -0,0 +1,116 @@
+
+
diff --git a/docs/images/BetterModelClassDiagram.png b/docs/images/BetterModelClassDiagram.png
deleted file mode 100644
index 94440f0ac4a..00000000000
Binary files a/docs/images/BetterModelClassDiagram.png and /dev/null differ
diff --git a/docs/images/ClearCommandActivityDiagram.svg b/docs/images/ClearCommandActivityDiagram.svg
new file mode 100644
index 00000000000..11e92c922a1
--- /dev/null
+++ b/docs/images/ClearCommandActivityDiagram.svg
@@ -0,0 +1,45 @@
+
+
diff --git a/docs/images/CommitActivityDiagram.png b/docs/images/CommitActivityDiagram.png
deleted file mode 100644
index c08c13f5c8b..00000000000
Binary files a/docs/images/CommitActivityDiagram.png and /dev/null differ
diff --git a/docs/images/CommitActivityDiagram.svg b/docs/images/CommitActivityDiagram.svg
new file mode 100644
index 00000000000..60492c11986
--- /dev/null
+++ b/docs/images/CommitActivityDiagram.svg
@@ -0,0 +1,39 @@
+
diff --git a/docs/images/ComponentManagers.png b/docs/images/ComponentManagers.png
deleted file mode 100644
index b5764ff9273..00000000000
Binary files a/docs/images/ComponentManagers.png and /dev/null differ
diff --git a/docs/images/ComponentManagers.svg b/docs/images/ComponentManagers.svg
new file mode 100644
index 00000000000..5678a024c9c
--- /dev/null
+++ b/docs/images/ComponentManagers.svg
@@ -0,0 +1,125 @@
+
+
diff --git a/docs/images/CorruptedData.png b/docs/images/CorruptedData.png
new file mode 100644
index 00000000000..fb2d2ba6cc3
Binary files /dev/null and b/docs/images/CorruptedData.png differ
diff --git a/docs/images/CorruptedOrderList.png b/docs/images/CorruptedOrderList.png
new file mode 100644
index 00000000000..9d56288c7e4
Binary files /dev/null and b/docs/images/CorruptedOrderList.png differ
diff --git a/docs/images/DeleteCommandActivityDiagram.svg b/docs/images/DeleteCommandActivityDiagram.svg
new file mode 100644
index 00000000000..f142410b9c9
--- /dev/null
+++ b/docs/images/DeleteCommandActivityDiagram.svg
@@ -0,0 +1 @@
+
diff --git a/docs/images/DeleteSequenceDiagram.png b/docs/images/DeleteSequenceDiagram.png
deleted file mode 100644
index fa327b39618..00000000000
Binary files a/docs/images/DeleteSequenceDiagram.png and /dev/null differ
diff --git a/docs/images/DeleteSequenceDiagram.svg b/docs/images/DeleteSequenceDiagram.svg
new file mode 100644
index 00000000000..b57e61622e7
--- /dev/null
+++ b/docs/images/DeleteSequenceDiagram.svg
@@ -0,0 +1,182 @@
+
+
diff --git a/docs/images/EditCommandActivityDiagram.svg b/docs/images/EditCommandActivityDiagram.svg
new file mode 100644
index 00000000000..635a9902eeb
--- /dev/null
+++ b/docs/images/EditCommandActivityDiagram.svg
@@ -0,0 +1,82 @@
+
diff --git a/docs/images/EditItemXYZRakeActivityDiagram.svg b/docs/images/EditItemXYZRakeActivityDiagram.svg
new file mode 100644
index 00000000000..d5eb5cfe702
--- /dev/null
+++ b/docs/images/EditItemXYZRakeActivityDiagram.svg
@@ -0,0 +1,38 @@
+
diff --git a/docs/images/FindCommandActivityDiagram.svg b/docs/images/FindCommandActivityDiagram.svg
new file mode 100644
index 00000000000..c682a08be07
--- /dev/null
+++ b/docs/images/FindCommandActivityDiagram.svg
@@ -0,0 +1,154 @@
+
+
diff --git a/docs/images/ItemClassDiagram.svg b/docs/images/ItemClassDiagram.svg
new file mode 100644
index 00000000000..591a5b396ba
--- /dev/null
+++ b/docs/images/ItemClassDiagram.svg
@@ -0,0 +1,74 @@
+
+
diff --git a/docs/images/ListCommandActivityDiagram.svg b/docs/images/ListCommandActivityDiagram.svg
new file mode 100644
index 00000000000..d139d085192
--- /dev/null
+++ b/docs/images/ListCommandActivityDiagram.svg
@@ -0,0 +1,79 @@
+
diff --git a/docs/images/LogicClassDiagram.png b/docs/images/LogicClassDiagram.png
deleted file mode 100644
index 9e9ba9f79e5..00000000000
Binary files a/docs/images/LogicClassDiagram.png and /dev/null differ
diff --git a/docs/images/LogicClassDiagram.svg b/docs/images/LogicClassDiagram.svg
new file mode 100644
index 00000000000..d183a3a48ec
--- /dev/null
+++ b/docs/images/LogicClassDiagram.svg
@@ -0,0 +1,173 @@
+
diff --git a/docs/images/MenuClassDiagram.svg b/docs/images/MenuClassDiagram.svg
new file mode 100644
index 00000000000..e2ae8c5cff6
--- /dev/null
+++ b/docs/images/MenuClassDiagram.svg
@@ -0,0 +1,326 @@
+
+
diff --git a/docs/images/ModelClassDiagram.png b/docs/images/ModelClassDiagram.png
deleted file mode 100644
index 04070af60d8..00000000000
Binary files a/docs/images/ModelClassDiagram.png and /dev/null differ
diff --git a/docs/images/ModelClassDiagram.svg b/docs/images/ModelClassDiagram.svg
new file mode 100644
index 00000000000..3a760a26773
--- /dev/null
+++ b/docs/images/ModelClassDiagram.svg
@@ -0,0 +1,258 @@
+
+
diff --git a/docs/images/OrderClassDiagram.svg b/docs/images/OrderClassDiagram.svg
new file mode 100644
index 00000000000..3061f49b5a6
--- /dev/null
+++ b/docs/images/OrderClassDiagram.svg
@@ -0,0 +1,326 @@
+
+
diff --git a/docs/images/ParserClasses.png b/docs/images/ParserClasses.png
deleted file mode 100644
index e7b4c8880cd..00000000000
Binary files a/docs/images/ParserClasses.png and /dev/null differ
diff --git a/docs/images/ParserClasses.svg b/docs/images/ParserClasses.svg
new file mode 100644
index 00000000000..eb50e857eb2
--- /dev/null
+++ b/docs/images/ParserClasses.svg
@@ -0,0 +1,159 @@
+
diff --git a/docs/images/PersonClassDiagram.svg b/docs/images/PersonClassDiagram.svg
new file mode 100644
index 00000000000..a29f9776333
--- /dev/null
+++ b/docs/images/PersonClassDiagram.svg
@@ -0,0 +1,317 @@
+
+
diff --git a/docs/images/SortCommandActivityDiagram.svg b/docs/images/SortCommandActivityDiagram.svg
new file mode 100644
index 00000000000..c59315f3c19
--- /dev/null
+++ b/docs/images/SortCommandActivityDiagram.svg
@@ -0,0 +1,29 @@
+
diff --git a/docs/images/SortOrdersExample.png b/docs/images/SortOrdersExample.png
new file mode 100644
index 00000000000..da14f5ec14b
Binary files /dev/null and b/docs/images/SortOrdersExample.png differ
diff --git a/docs/images/StorageClassDiagram.png b/docs/images/StorageClassDiagram.png
deleted file mode 100644
index 2533a5c1af0..00000000000
Binary files a/docs/images/StorageClassDiagram.png and /dev/null differ
diff --git a/docs/images/StorageClassDiagram.svg b/docs/images/StorageClassDiagram.svg
new file mode 100644
index 00000000000..8041daec164
--- /dev/null
+++ b/docs/images/StorageClassDiagram.svg
@@ -0,0 +1,180 @@
+
diff --git a/docs/images/TabCommandActivityDiagram.svg b/docs/images/TabCommandActivityDiagram.svg
new file mode 100644
index 00000000000..068dc6b68df
--- /dev/null
+++ b/docs/images/TabCommandActivityDiagram.svg
@@ -0,0 +1 @@
+
diff --git a/docs/images/TaskClassDiagram.svg b/docs/images/TaskClassDiagram.svg
new file mode 100644
index 00000000000..54bf596158d
--- /dev/null
+++ b/docs/images/TaskClassDiagram.svg
@@ -0,0 +1,250 @@
+
+
diff --git a/docs/images/Ui.png b/docs/images/Ui.png
index 5bd77847aa2..62da35198a1 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
deleted file mode 100644
index 785e04dbab4..00000000000
Binary files a/docs/images/UiClassDiagram.png and /dev/null differ
diff --git a/docs/images/UiClassDiagram.svg b/docs/images/UiClassDiagram.svg
new file mode 100644
index 00000000000..0c6da1c5718
--- /dev/null
+++ b/docs/images/UiClassDiagram.svg
@@ -0,0 +1 @@
+
diff --git a/docs/images/UndoRedoState0.png b/docs/images/UndoRedoState0.png
deleted file mode 100644
index 8f7538cd884..00000000000
Binary files a/docs/images/UndoRedoState0.png and /dev/null differ
diff --git a/docs/images/UndoRedoState0.svg b/docs/images/UndoRedoState0.svg
new file mode 100644
index 00000000000..282e6f14a8b
--- /dev/null
+++ b/docs/images/UndoRedoState0.svg
@@ -0,0 +1,107 @@
+
diff --git a/docs/images/UndoRedoState1.png b/docs/images/UndoRedoState1.png
deleted file mode 100644
index df9908d0948..00000000000
Binary files a/docs/images/UndoRedoState1.png and /dev/null differ
diff --git a/docs/images/UndoRedoState1.svg b/docs/images/UndoRedoState1.svg
new file mode 100644
index 00000000000..55fe1eb178b
--- /dev/null
+++ b/docs/images/UndoRedoState1.svg
@@ -0,0 +1,111 @@
+
diff --git a/docs/images/UndoRedoState2.png b/docs/images/UndoRedoState2.png
deleted file mode 100644
index 36519c1015b..00000000000
Binary files a/docs/images/UndoRedoState2.png and /dev/null differ
diff --git a/docs/images/UndoRedoState2.svg b/docs/images/UndoRedoState2.svg
new file mode 100644
index 00000000000..c9947ee9faa
--- /dev/null
+++ b/docs/images/UndoRedoState2.svg
@@ -0,0 +1,107 @@
+
diff --git a/docs/images/UndoRedoState3.png b/docs/images/UndoRedoState3.png
deleted file mode 100644
index 19959d01712..00000000000
Binary files a/docs/images/UndoRedoState3.png and /dev/null differ
diff --git a/docs/images/UndoRedoState3.svg b/docs/images/UndoRedoState3.svg
new file mode 100644
index 00000000000..ec448fddfcf
--- /dev/null
+++ b/docs/images/UndoRedoState3.svg
@@ -0,0 +1,107 @@
+
diff --git a/docs/images/UndoRedoState4.png b/docs/images/UndoRedoState4.png
deleted file mode 100644
index 4c623e4f2c5..00000000000
Binary files a/docs/images/UndoRedoState4.png and /dev/null differ
diff --git a/docs/images/UndoRedoState4.svg b/docs/images/UndoRedoState4.svg
new file mode 100644
index 00000000000..0ab9e4b73bc
--- /dev/null
+++ b/docs/images/UndoRedoState4.svg
@@ -0,0 +1,107 @@
+
diff --git a/docs/images/UndoRedoState5.png b/docs/images/UndoRedoState5.png
deleted file mode 100644
index 84ad2afa6bd..00000000000
Binary files a/docs/images/UndoRedoState5.png and /dev/null differ
diff --git a/docs/images/UndoRedoState5.svg b/docs/images/UndoRedoState5.svg
new file mode 100644
index 00000000000..4861d33b158
--- /dev/null
+++ b/docs/images/UndoRedoState5.svg
@@ -0,0 +1,109 @@
+
diff --git a/docs/images/UndoSequenceDiagram.png b/docs/images/UndoSequenceDiagram.png
deleted file mode 100644
index 6addcd3a8d9..00000000000
Binary files a/docs/images/UndoSequenceDiagram.png and /dev/null differ
diff --git a/docs/images/UndoSequenceDiagram.svg b/docs/images/UndoSequenceDiagram.svg
new file mode 100644
index 00000000000..b0fe7b72b86
--- /dev/null
+++ b/docs/images/UndoSequenceDiagram.svg
@@ -0,0 +1,165 @@
+
diff --git a/docs/images/arkarsg.png b/docs/images/arkarsg.png
new file mode 100644
index 00000000000..d29ab5cdfd1
Binary files /dev/null and b/docs/images/arkarsg.png differ
diff --git a/docs/images/changgittyhub.png b/docs/images/changgittyhub.png
new file mode 100644
index 00000000000..632c9128d66
Binary files /dev/null and b/docs/images/changgittyhub.png differ
diff --git a/docs/images/chongweiguan.png b/docs/images/chongweiguan.png
new file mode 100644
index 00000000000..503712b220e
Binary files /dev/null and b/docs/images/chongweiguan.png differ
diff --git a/docs/images/hmuumyatmoe.png b/docs/images/hmuumyatmoe.png
new file mode 100644
index 00000000000..e8235801a3a
Binary files /dev/null and b/docs/images/hmuumyatmoe.png differ
diff --git a/docs/images/liumc-sg.png b/docs/images/liumc-sg.png
new file mode 100644
index 00000000000..899caaf07d1
Binary files /dev/null and b/docs/images/liumc-sg.png differ
diff --git a/docs/images/ug/DataTabUILabeled.png b/docs/images/ug/DataTabUILabeled.png
new file mode 100644
index 00000000000..ae75a86082a
Binary files /dev/null and b/docs/images/ug/DataTabUILabeled.png differ
diff --git a/docs/images/ug/HelpMessage.png b/docs/images/ug/HelpMessage.png
new file mode 100644
index 00000000000..394759b53d7
Binary files /dev/null and b/docs/images/ug/HelpMessage.png differ
diff --git a/docs/images/ug/HomePageUI.png b/docs/images/ug/HomePageUI.png
new file mode 100644
index 00000000000..d1f230d770b
Binary files /dev/null and b/docs/images/ug/HomePageUI.png differ
diff --git a/docs/images/ug/HomePageUILabeled.png b/docs/images/ug/HomePageUILabeled.png
new file mode 100644
index 00000000000..734e8354f4f
Binary files /dev/null and b/docs/images/ug/HomePageUILabeled.png differ
diff --git a/docs/images/ug/MenuCardLabeled.png b/docs/images/ug/MenuCardLabeled.png
new file mode 100644
index 00000000000..d1815f0613b
Binary files /dev/null and b/docs/images/ug/MenuCardLabeled.png differ
diff --git a/docs/images/ug/OrderCardLabeled.png b/docs/images/ug/OrderCardLabeled.png
new file mode 100644
index 00000000000..14c65d00bda
Binary files /dev/null and b/docs/images/ug/OrderCardLabeled.png differ
diff --git a/docs/images/ug/SupplierCardLabeled.png b/docs/images/ug/SupplierCardLabeled.png
new file mode 100644
index 00000000000..bfb49f584a1
Binary files /dev/null and b/docs/images/ug/SupplierCardLabeled.png differ
diff --git a/docs/images/ug/TaskCardLabeled.png b/docs/images/ug/TaskCardLabeled.png
new file mode 100644
index 00000000000..c75077cddbd
Binary files /dev/null and b/docs/images/ug/TaskCardLabeled.png differ
diff --git a/docs/images/ug/ValidCsvFile.png b/docs/images/ug/ValidCsvFile.png
new file mode 100644
index 00000000000..9528d9b8cb2
Binary files /dev/null and b/docs/images/ug/ValidCsvFile.png differ
diff --git a/docs/img.png b/docs/img.png
new file mode 100644
index 00000000000..445449ca210
Binary files /dev/null and b/docs/img.png differ
diff --git a/docs/index.md b/docs/index.md
index 7601dbaad0d..b6fb06d545c 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,19 +1,20 @@
---
layout: page
-title: AddressBook Level-3
+title: Trackr
---
-[](https://github.com/se-edu/addressbook-level3/actions)
-[](https://codecov.io/gh/se-edu/addressbook-level3)
+[](https://github.com/ay2223s2-cs2103t-w15-2/tp/actions)
+[](https://codecov.io/gh/ay2223s2-cs2103t-w15-2/tp)

-**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).
+**Trackr is a desktop application for managing your supplier contact details, orders and tasks.** 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 Trackr, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start).
+* If you are interested about developing Trackr, the [**Developer Guide**](DeveloperGuide.html) is a good place to start.
**Acknowledgements**
* Libraries used: [JavaFX](https://openjfx.io/), [Jackson](https://github.com/FasterXML/jackson), [JUnit5](https://github.com/junit-team/junit5)
+* Based upon: [Address Book Product Website](https://se-education.org/addressbook-level3)
diff --git a/docs/team/arkarsg.md b/docs/team/arkarsg.md
new file mode 100644
index 00000000000..bbf83fcbadf
--- /dev/null
+++ b/docs/team/arkarsg.md
@@ -0,0 +1,52 @@
+---
+layout: page
+title: Arkar's Portfolio Page
+---
+
+### Project: Trackr
+
+Trackr is a desktop application used to keep track of order, menu, suppliers and tasks. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC.
+
+Given below are my contributions to the project.
+
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2223s2.github.io/tp-dashboard/?search=arkarsg&breakdown=true)
+
+* **Contribution to code base**
+ * Initial refactoring of `Supplier` from `Person`
+ * Justification: This improves the product because the differentiation between `Supplier` and `Person` fits the use case of our product.
+ * Refactor `Order` to have a reference to `MenuItem`
+ * Justification: This association is needed as users should only be able to create orders from pre-existing `MenuItem`.
+ * Highlight:
+ * Adapt `Storage` and `JSON` files to support `MenuItem` nested within `Order`
+ * Generate total profits and sales from each order and all orders
+ * Profits and sales responsive to changes in `OrderQuantity` and `OrderItem`
+ * Rewrite relevant test cases for Order
+ * Overhauls Ui
+ * Highlights:
+ * Refactor into packages
+ * Cosmetic changes using CSS
+ * Added tabbed views for different data
+ * New feature: `TabCommand` that allows users to switch between tabs
+ * Justification: Like most applications, users can use `CTRL + TAB` or `ARROW KEYS` to cycle through area of focus. This added feature allow users to skip tabs while using a verbose command. This also further optimises the product for CLI use.
+ * Highlight: Used the `Observer / Observable` pattern with JavaFX `SimpleIntegerProperty` to listen to changes in the selected tab index. This decouples `TabCommand` in `Logic` from `Ui` and enforces Law of Demeter. Some commands such as `list`/`find` also snaps to relevant tab for better user experience.
+ * Improve test coverage
+ * Spotted bugs and improved test coverage [\#271](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/271), [\#285](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/285), [\#297](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/297)
+
+* **Review / Peer Help**
+ * Helped teammates with debugging and test cases
+
+* **Documentation**:
+ * User Guide:
+ * Drafted command syntax and examples
+ * Provided overall feedback [\#267](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/267)
+ * Developer Guide:
+ * Updated UML diagram for `Ui` and its description
+ * Added activity diagram for `DeleteCommand`
+ * Updated user stories and use cases.
+
+* **Community**:
+ * PRs reviewed (with non-trivial review comments): [\#267](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/267), [\#177](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/177)
+
+* **Tools**:
+ * Java 11, JavaFx, Jekyll
+
diff --git a/docs/team/changgittyhub.md b/docs/team/changgittyhub.md
new file mode 100644
index 00000000000..bd015b88853
--- /dev/null
+++ b/docs/team/changgittyhub.md
@@ -0,0 +1,60 @@
+---
+layout: page
+title: Darren Chang's Project Portfolio Page
+---
+
+### Project: Trackr
+
+Trackr is a desktop tracking application used to keep track of order, menu, suppliers and tasks. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC.
+
+Given below are my contributions to the project.
+
+* Added `Menu` Model including all field classes [\#177](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/177)
+* Updated Storage related classes to allow for the storage of `Menu` objects [\#177](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/177)
+* Completed `add`, `delete`, `edit`, `clear`, `list` and `find` commands for `Menu` objects [\#177](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/177)
+* Completed `edit` and `find` commands for `Order` objects [\#134](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/134)
+* Contributed to `Calculate Menu Item Profit` feature [\#177](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/177)
+ * Justification: Allow users to view their profit for each item on the menu.This sets up the foundation for the `Homepage Profit` feature that allows to view total profit from all orders.
+* Maintain code quality - Refactor methods to obey OOP principles [\#281](https://github.com/AY2223S2-CS2103T-W15-2/tp/issues/281)
+* Improve test coverage and fixed test cases. [\#288](https://github.com/AY2223S2-CS2103T-W15-2/tp/issues/288) [\#140](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/140)
+* Updated and fixed `find_order` related bug [\#291](https://github.com/AY2223S2-CS2103T-W15-2/tp/issues/291) and `Menu` related bugs [\#235](https://github.com/AY2223S2-CS2103T-W15-2/tp/issues/235) [\#188](https://github.com/AY2223S2-CS2103T-W15-2/tp/issues/188)
+* Contributed to the demo video.
+
+* **New Feature**: Implemented a `Calculate Menu Item Profit` feature to get profit from item cost and item selling price.
+ * What it does:
+ * Allows users to see the profit of their item after adding their menu item to the menu.
+ * Justification: This feature allows home business owners to see their profit for each menu item at one glance.This feature allows the total profit seen on the homepage to work as expected.
+ * Highlights: Users are able to see the profit from each menu item without calculating manually.
+
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2223s2.github.io/tp-dashboard/?search=changgittyhub&breakdown=true&sort=groupTitle%20dsc&sortWithin=title&since=2023-02-17&timeframe=commit&mergegroup=&groupSelect=groupByRepos&checkedFileTypes=docs~functional-code~test-code~other)
+* All _reused_ code are adapted from the [AB3](https://github.com/nus-cs2103-AY2223S2/tp) code base (both functional and test code).
+ * The code could be refractored out to be a more standard format for repeated use.
+
+* **Project management**:
+ * Managed project documentation (UG & DG)
+ * Checked and updated UG to match with actual product [\#274](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/274)
+ * Helped to do minutes during meetings and send important information into Telegram group chat.
+ * Assisted in assigning Issues [\#146](https://github.com/AY2223S2-CS2103T-W15-2/tp/issues/146) [\#143](https://github.com/AY2223S2-CS2103T-W15-2/tp/issues/143)
+
+* **Documentation**:
+ * User Guide (UG):
+ * Drafted out documentation for some order features [\#142](https://github.com/AY2223S2-CS2103T-W15-2/tp/issues/142) and all menu item features.[\#176](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/176)
+ * Updated the introduction for the user guide [\#176](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/176)
+ * Helped reorganise the guide for commands with similar functionality [\#176](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/176)
+ * Fix documentation bugs for UG features to match real-life functionality.[\#168](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/168)
+
+ * Developer Guide:
+ * Added and update use cases [\#31](https://github.com/AY2223S2-CS2103T-W15-2/tp/issues/31) [\#90](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/90) [\#292](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/292)
+ * Added and updated UML Class Diagram and documentation for Order and Menu [\#142](https://github.com/AY2223S2-CS2103T-W15-2/tp/issues/142)
+ * Added documentation and activity diagram for "Add" functionality features [\#168](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/168)
+ * Introduced a "Why we implemented this way" portion for features [\#176](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/176)
+ * Update Javadocs [\#287](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/287)
+
+* **Community**:
+ * PRs reviewed (with non-trivial review comments): [\#193](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/193) [\#267](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/267)
+ * Communicate professionally with Professor Damith on Outlook to change UG details
+ * Clarify questions on behalf of the team on MSTeams with Tutor.
+ * Communicate thoroughly with team members to reduce double work, fix bugs together when needed and raise doubt in group chat.
+
+* **Tools**:
+ * Java 11, JavaFx, Jekyll
diff --git a/docs/team/chongweiguan.md b/docs/team/chongweiguan.md
new file mode 100644
index 00000000000..1e8b7cfe5ad
--- /dev/null
+++ b/docs/team/chongweiguan.md
@@ -0,0 +1,39 @@
+---
+layout: page
+title : Wei Guan's Portfolio Page
+---
+
+### Project: AddressBook Level 3
+
+Trackr is a desktop application used to keep track of order, menu, suppliers and tasks. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC.
+
+Given below are my contributions to the project.
+
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2223s2.github.io/tp-dashboard/?search=chognweiguan&breakdown=true)
+ * All _reused_ code are adapted from the [AB3](https://github.com/nus-cs2103-AY2223S2/tp) code base (both functional and test code).
+ * The code could be refractored out to be a more standard format for repetitive use in our project.
+ * The code could be adapted to fit the different models that we have.
+
+* **Contributions to code base**:
+ * Added `Order` and `Customer` Models including all field classes [\#100] (https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/100), [#107] (https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/107)
+ * Updated Storage related classes to allow for the storage of `Order` objects [\#114] (https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/114)
+ * Completed `add` and `delete` commands for `Order` objects [#120] (https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/120)
+ * Completed `upload csv` feature [\178] (https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/178)
+ * Justification: Allow users to transfer existing data from their excel sheet to trackr efficiently.
+ * Updated and fixed `Order` related bugs [#272] (https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/272)
+
+* **Review / Peer Help**:
+ * Helped teammates with debugging and implementation issues.
+
+* **Documentation**:
+ * User Guide:
+ * Documented `upload csv` feature [#185] (https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/185)
+ * Developer Guide:
+ * Updated UML Diagrams for `Logic` component [\#154] (https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/154)
+ * Added activity diagram for `ListCommand` [\#171] (https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/171)
+
+* **Community**:
+ * Approved a number of PRs
+
+* **Tools**:
+ * Java 11, JavaFx, JUnit
diff --git a/docs/team/hmuumyatmoe.md b/docs/team/hmuumyatmoe.md
new file mode 100644
index 00000000000..2a9d79e7cd7
--- /dev/null
+++ b/docs/team/hmuumyatmoe.md
@@ -0,0 +1,65 @@
+---
+layout: page
+title: Hmuu Myat Moe's Project Portfolio Page
+---
+
+### Project: Trackr
+
+Trackr is a desktop address book application used for teaching Software Engineering principles.
+The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC.
+
+Given below are my contributions to the project.
+
+* **Added the ability to add tasks to a task list and list tasks.**
+ * What it does:
+ * Allows users to add tasks with task description, deadline of task and completion status (DONE / NOT DONE) of task.
+ * Justification: This feature is made to cater to the needs of home business owners as they usually have a lot of tasks (such as ordering supplies, making deliveries) to deal with
+ and the app provides a convenient way to record down and get an overview of their tasks.
+ * Credits: Code is adapted from [AddressBook-Level3 project](https://github.com/nus-cs2103-AY2223S2/tp) created by the [SE-EDU initiative](https://se-education.org)
+
+* **Added the ability to edit existing tasks.**
+ * What it does:
+ * Allows users to edit existing tasks so that they can keep tasks details correct and up to date.
+ * Justification: This feature improves the product because users may sometimes key in the wrong info
+ and this feature allows users to modify wrong task details easily.
+ * Credits: Code is adapted from [AddressBook-Level3 project](https://github.com/nus-cs2103-AY2223S2/tp) created by the [SE-EDU initiative](https://se-education.org)
+
+* **New Feature: Added the ability to sort orders and tasks according to a given criteria.**
+ * What it does:
+ * Allows users to sort tasks or orders according to a given criteria.
+ * Justification: This feature improves the product significantly because home business owners has a lot of orders and tasks
+ and may wish to quickly find out which orders or tasks are more urgent at one glance.
+ This feature provides a convenient way for the home business owners to do so.
+ * Highlights: Users are able to sort the tasks or orders based on various criterias (Task Name, Task Deadline, Task Status, Time added, Task Status and Deadline)
+ * Credits: Code is adapted from [AddressBook-Level3 project](https://github.com/nus-cs2103-AY2223S2/tp) created by the [SE-EDU initiative](https://se-education.org)
+
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2223s2.github.io/tp-dashboard/?search=hmuumyatmoe&breakdown=true)
+ All the functional and test codes reused or adapted are reused from and adapated from [AddressBook-Level3 project](https://github.com/nus-cs2103-AY2223S2/tp) created by the [SE-EDU initiative](https://se-education.org).
+ Code used for rake symbol used in Edit Command Activity Diagram in the DG is reused from [this Plant Uml forum](https://forum.plantuml.net/195/is-there-any-support-for-subactivity-or-the-rake-symbol).
+
+* **Project management**:
+ * Managed project documentation (UG & DG)
+ * Checked and updated UG to match with actual product [\#276](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/276)
+ * Checked and standardise format of UG & DG [\#85](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/85) [\#86](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/86)
+ * Add and edit comments for code [\#295](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/295)
+ * Add test cases to improve test coverage [\#89](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/89)
+ * Update site-wide settings [#52](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/52)
+
+* **Documentation**:
+ * User Guide (UG):
+ * Drafted out documentation for the features `tag_supplier`, `edit_supplier`, `edit_task`, `delete` and `find`
+ * Updated actual UG documentation for the features `add_task` and `edit_task` [\#54](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/54)
+ * Added UG documentation for the features `sort_tasks` and `sort_orders` [\#183](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/183), [\#193](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/193)
+ * Checked that UG matches with the actual product and updated UG accordingly [\#276](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/276)
+
+ * Developer Guide:
+ * Updated Glossary to include definitions of meaningful words and phrases [\#70](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/70)
+ * Updated Product Scope (Target User Profile & Value Proposition) and Acknowledgements [\#57](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/57)
+ * Added user stories [\#57](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/57), [\#152](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/152)
+ * Added UML Class Diagram and updated documentation for Storage [\#152](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/152)
+ * Added documentation and activity diagram for Edit and Sort features [\#173](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/173), [\#286](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/286)
+
+* **Community**:
+ * PRs reviewed (with non-trivial review comments): [\#47](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/47), [\#91](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/91) [\#154](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/154) [\#157](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/157)
+* **Tools**:
+ * Java 11, JavaFx, Jekyll
diff --git a/docs/team/johndoe.md b/docs/team/johndoe.md
deleted file mode 100644
index 773a07794e2..00000000000
--- a/docs/team/johndoe.md
+++ /dev/null
@@ -1,46 +0,0 @@
----
-layout: page
-title: John Doe's Project Portfolio Page
----
-
-### Project: AddressBook Level 3
-
-AddressBook - Level 3 is a desktop address book application used for teaching Software Engineering principles. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC.
-
-Given below are my contributions to the project.
-
-* **New Feature**: Added the ability to undo/redo previous commands.
- * What it does: allows the user to undo all previous commands one at a time. Preceding undo commands can be reversed by using the redo command.
- * Justification: This feature improves the product significantly because a user can make mistakes in commands and the app should provide a convenient way to rectify them.
- * Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis of design alternatives. The implementation too was challenging as it required changes to existing commands.
- * Credits: *{mention here if you reused any code/ideas from elsewhere or if a third-party library is heavily used in the feature so that a reader can make a more accurate judgement of how much effort went into the feature}*
-
-* **New Feature**: Added a history command that allows the user to navigate to previous commands using up/down keys.
-
-* **Code contributed**: [RepoSense link]()
-
-* **Project management**:
- * Managed releases `v1.3` - `v1.5rc` (3 releases) on GitHub
-
-* **Enhancements to existing features**:
- * Updated the GUI color scheme (Pull requests [\#33](), [\#34]())
- * Wrote additional tests for existing features to increase coverage from 88% to 92% (Pull requests [\#36](), [\#38]())
-
-* **Documentation**:
- * User Guide:
- * Added documentation for the features `delete` and `find` [\#72]()
- * Did cosmetic tweaks to existing documentation of features `clear`, `exit`: [\#74]()
- * Developer Guide:
- * Added implementation details of the `delete` feature.
-
-* **Community**:
- * PRs reviewed (with non-trivial review comments): [\#12](), [\#32](), [\#19](), [\#42]()
- * Contributed to forum discussions (examples: [1](), [2](), [3](), [4]())
- * Reported bugs and suggestions for other teams in the class (examples: [1](), [2](), [3]())
- * Some parts of the history feature I added was adopted by several other class mates ([1](), [2]())
-
-* **Tools**:
- * Integrated a third party library (Natty) to the project ([\#42]())
- * Integrated a new Github plugin (CircleCI) to the team repo
-
-* _{you can add/remove categories in the list above}_
diff --git a/docs/team/liumc-sg.md b/docs/team/liumc-sg.md
new file mode 100644
index 00000000000..7b8bbc0933e
--- /dev/null
+++ b/docs/team/liumc-sg.md
@@ -0,0 +1,62 @@
+---
+layout: page
+title: Liu Muchen's Project Portfolio Page
+---
+
+### Project: Trackr
+
+Trackr is a desktop tracking application used to keep track of order, menu, suppliers and tasks. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC.
+
+Given below are my contributions to the project.
+
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2223s2.github.io/tp-dashboard/?search=liumc-sg&breakdown=true)
+
+* All _reused_ code are adapted from the [AB3](https://github.com/nus-cs2103-AY2223S2/tp) code base (both functional and test code).
+ * The code could be refractored out to be a more standard format for repetitive use in our project (i.e. Modifying `UniquePersonList` to `UniqueItemList`).
+ * The code could be adapted to fit the different models that we have. (i.e. Modifying `Person` to be suitable for `Task`)
+
+* **Contributions to code base**:
+ * Enabled assertions in gradle. [\#156](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/156)
+ * Updated link in help command. [\#80](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/80)
+ * Completed `find` and `delete` command for task, together with the respective descriptor and predicate. [\#98](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/98)
+ * Justification: Allows the user to be able to find tasks by multiple fields instead of only the name.
+ * Highlights: Was used to make the predicate and command for find command for order.
+ * Credit: Code is adapted from [AddressBook-Level3](https://github.com/nus-cs2103-AY2223S2/tp) created by [SE-EDU initiative](https://se-education.org)
+ * Completed `clear` command for task. [\#102](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/102)
+ * Justification: Allows the user to be able to delete all tasks in one command.
+ * Credit: Code is adapted from [AddressBook-Level3](https://github.com/nus-cs2103-AY2223S2/tp) created by [SE-EDU initiative](https://se-education.org)
+ * Refactored models and commands, together with abstracting out certain components. [\#138](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/138), [\#139](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/139), [\#187](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/187)
+ * Justification: There were a lot of repeated code for commands (such as `add`, `edit` and `delete`) for each model (such as `Supplier` and `Task`) and . Hence, this would reduce duplicate code for similar functionality just for different models.
+ * Abstracted out common models (such as `Name` and `Deadline`). [\#138](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/138)
+ * Justification: There are repeated use of similar classes with the same functionality. Hence, this reduces duplicate code.
+ * Add in missing test cases. [\#283](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/283)
+ * Justification: Improve test coverage
+
+* **Contributions to the User Guide**:
+ * Drafted initial documentation for `tab`, `delete_task`, `delete_supplier`, `find_task`, `find_supplier`, `edit_task`. [\#47](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/47)
+ * Drafted initial documentation for `add_supplier`, `edit_supplier`. [\#72](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/72)
+ * Drafted initial documentation for `list_supplier`, `list_order`, `list_task`, `list_item`, `clear_supplier`, `clear_order`, `clear_task`, `clear_item`, `find_order`. [\#198](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/198)
+ * Overhaul of the structure of how the User Guide is designed and implemented. [\#267](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/267)
+ * Added in figures and tips to allow for better user experience. [\#267](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/267)
+ * Fix formatting and informational errors in the entire User Guide. [\#267](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/267)
+
+* **Contributions to the Developer Guide**:
+ * Added UML diagrams and wrote the content for `Model`, `Item`, `Person-Supplier-Customer`, `Task` and `FindXYZCommand`. [\#150](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/150)
+ * Updated diagrams to svg for better readability and quality, together with labelling of the diagrams. [\#157](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/157), [\#166](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/166)
+ * Updated target user profile, user stories and use cases. [\#166](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/166)
+ * Added manual test cases. [\#294](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/294)
+
+* **Review/Mentoring contributions**:
+ * Provided recommendations on how to implement respective features.
+ * Help teammates with issues with their code base.
+
+* **Project management**:
+ * Initialised GitHub Project, issues tracking and flow of PRs.
+ * Lead weekly meetings and work delegation.
+ * Keep track of datelines and give timely reminders.
+
+* **Community**:
+ * PRs reviewed (with non-trivial review comments): [\#89](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/89), [\#97](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/97), [\#105](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/105), [\#120](https://github.com/AY2223S2-CS2103T-W15-2/tp/pull/120)
+
+* **Tools**:
+ * Java 11, JavaFX, Grade, JUnit
diff --git a/docs/tutorials/AddRemark.md b/docs/tutorials/AddRemark.md
index 880c701042f..7f8624d2804 100644
--- a/docs/tutorials/AddRemark.md
+++ b/docs/tutorials/AddRemark.md
@@ -25,7 +25,7 @@ For now, let’s keep `RemarkCommand` as simple as possible and print some outpu
``` java
package seedu.address.logic.commands;
-import seedu.address.model.Model;
+import trackr.model.Model;
/**
* Changes the remark of an existing person in the address book.
@@ -91,7 +91,7 @@ Let’s change `RemarkCommand` to parse input from the user.
We start by modifying the constructor of `RemarkCommand` to accept an `Index` and a `String`. While we are at it, let’s change the error message to echo the values. While this is not a replacement for tests, it is an obvious way to tell if our code is functioning as intended.
``` java
-import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;
+import static trackr.commons.util.CollectionUtil.requireAllNonNull;
//...
public class RemarkCommand extends Command {
//...
@@ -242,7 +242,7 @@ Let’s change `RemarkCommand` and `RemarkCommandParser` to use the new `Remark`
Without getting too deep into `fxml`, let’s go on a 5 minute adventure to get some placeholder text to show up for each person.
-Simply add the following to [`seedu.address.ui.PersonCard`](https://github.com/se-edu/addressbook-level3/commit/850b78879582f38accb05dd20c245963c65ea599#diff-639834f1e05afe2276a86372adf0fe5f69314642c2d93cfa543d614ce5a76688).
+Simply add the following to [`trackr.ui.PersonCard`](https://github.com/se-edu/addressbook-level3/commit/850b78879582f38accb05dd20c245963c65ea599#diff-639834f1e05afe2276a86372adf0fe5f69314642c2d93cfa543d614ce5a76688).
**`PersonCard.java`:**
diff --git a/docs/tutorials/RemovingFields.md b/docs/tutorials/RemovingFields.md
index f29169bc924..b15f6ba682a 100644
--- a/docs/tutorials/RemovingFields.md
+++ b/docs/tutorials/RemovingFields.md
@@ -28,7 +28,7 @@ IntelliJ IDEA provides a refactoring tool that can identify *most* parts of a re
### Assisted refactoring
-The `address` field in `Person` is actually an instance of the `seedu.address.model.person.Address` class. Since removing the `Address` class will break the application, we start by identifying `Address`'s usages. This allows us to see code that depends on `Address` to function properly and edit them on a case-by-case basis. Right-click the `Address` class and select `Refactor` \> `Safe Delete` through the menu.
+The `address` field in `Person` is actually an instance of the `trackr.model.person.Address` class. Since removing the `Address` class will break the application, we start by identifying `Address`'s usages. This allows us to see code that depends on `Address` to function properly and edit them on a case-by-case basis. Right-click the `Address` class and select `Refactor` \> `Safe Delete` through the menu.
* :bulb: To make things simpler, you can unselect the options `Search in comments and strings` and `Search for text occurrences`

diff --git a/docs/tutorials/TracingCode.md b/docs/tutorials/TracingCode.md
index 4fb62a83ef6..bd9697218a7 100644
--- a/docs/tutorials/TracingCode.md
+++ b/docs/tutorials/TracingCode.md
@@ -16,11 +16,11 @@ When trying to understand an unfamiliar code base, one common strategy used is t
Before we jump into the code, it is useful to get an idea of the overall structure and the high-level behavior of the application. This is provided in the 'Architecture' section of the developer guide. In particular, the architecture diagram (reproduced below), tells us that the App consists of several components.
-
+
It also has a sequence diagram (reproduced below) that tells us how a command propagates through the App.
-
+
Note how the diagram shows only the execution flows _between_ the main components. That is, it does not show details of the execution path *inside* each component. By hiding those details, the diagram aims to inform the reader about the overall execution path of a command without overwhelming the reader with too much details. In this tutorial, you aim to find those omitted details so that you get a more in-depth understanding of how the code works.
@@ -37,9 +37,9 @@ As you know, the first step of debugging is to put in a breakpoint where you wan
In our case, we would want to begin the tracing at the very point where the App start processing user input (i.e., somewhere in the UI component), and then trace through how the execution proceeds through the UI component. However, the execution path through a GUI is often somewhat obscure due to various *event-driven mechanisms* used by GUI frameworks, which happens to be the case here too. Therefore, let us put the breakpoint where the `UI` transfers control to the `Logic` component.
-
+
-According to the sequence diagram you saw earlier (and repeated above for reference), the `UI` component yields control to the `Logic` component through a method named `execute`. Searching through the code base for an `execute()` method that belongs to the `Logic` component yields a promising candidate in `seedu.address.logic.Logic`.
+According to the sequence diagram you saw earlier (and repeated above for reference), the `UI` component yields control to the `Logic` component through a method named `execute`. Searching through the code base for an `execute()` method that belongs to the `Logic` component yields a promising candidate in `trackr.logic.Logic`.
@@ -48,7 +48,7 @@ According to the sequence diagram you saw earlier (and repeated above for refere
:bulb: **Intellij Tip:** The ['**Search Everywhere**' feature](https://www.jetbrains.com/help/idea/searching-everywhere.html) can be used here. In particular, the '**Find Symbol**' ('Symbol' here refers to methods, variables, classes etc.) variant of that feature is quite useful here as we are looking for a _method_ named `execute`, not simply the text `execute`.
-A quick look at the `seedu.address.logic.Logic` (an extract given below) confirms that this indeed might be what we’re looking for.
+A quick look at the `trackr.logic.Logic` (an extract given below) confirms that this indeed might be what we’re looking for.
```java
public interface Logic {
@@ -67,7 +67,7 @@ public interface Logic {
But apparently, this is an interface, not a concrete implementation.
That should be fine because the [Architecture section of the Developer Guide](../DeveloperGuide.html#architecture) tells us that components interact through interfaces. Here's the relevant diagram:
-
+
Next, let's find out which statement(s) in the `UI` code is calling this method, thus transferring control from the `UI` to the `Logic`.
diff --git a/src/main/java/seedu/address/MainApp.java b/src/main/java/seedu/address/MainApp.java
deleted file mode 100644
index 4133aaa0151..00000000000
--- a/src/main/java/seedu/address/MainApp.java
+++ /dev/null
@@ -1,183 +0,0 @@
-package seedu.address;
-
-import java.io.IOException;
-import java.nio.file.Path;
-import java.util.Optional;
-import java.util.logging.Logger;
-
-import javafx.application.Application;
-import javafx.stage.Stage;
-import seedu.address.commons.core.Config;
-import seedu.address.commons.core.LogsCenter;
-import seedu.address.commons.core.Version;
-import seedu.address.commons.exceptions.DataConversionException;
-import seedu.address.commons.util.ConfigUtil;
-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.util.SampleDataUtil;
-import seedu.address.storage.AddressBookStorage;
-import seedu.address.storage.JsonAddressBookStorage;
-import seedu.address.storage.JsonUserPrefsStorage;
-import seedu.address.storage.Storage;
-import seedu.address.storage.StorageManager;
-import seedu.address.storage.UserPrefsStorage;
-import seedu.address.ui.Ui;
-import seedu.address.ui.UiManager;
-
-/**
- * Runs the application.
- */
-public class MainApp extends Application {
-
- public static final Version VERSION = new Version(0, 2, 0, true);
-
- private static final Logger logger = LogsCenter.getLogger(MainApp.class);
-
- protected Ui ui;
- protected Logic logic;
- protected Storage storage;
- protected Model model;
- protected Config config;
-
- @Override
- public void init() throws Exception {
- logger.info("=============================[ Initializing AddressBook ]===========================");
- super.init();
-
- AppParameters appParameters = AppParameters.parse(getParameters());
- config = initConfig(appParameters.getConfigPath());
-
- UserPrefsStorage userPrefsStorage = new JsonUserPrefsStorage(config.getUserPrefsFilePath());
- UserPrefs userPrefs = initPrefs(userPrefsStorage);
- AddressBookStorage addressBookStorage = new JsonAddressBookStorage(userPrefs.getAddressBookFilePath());
- storage = new StorageManager(addressBookStorage, userPrefsStorage);
-
- initLogging(config);
-
- model = initModelManager(storage, userPrefs);
-
- logic = new LogicManager(model, storage);
-
- ui = new UiManager(logic);
- }
-
- /**
- * 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.
- */
- private Model initModelManager(Storage storage, ReadOnlyUserPrefs userPrefs) {
- Optional addressBookOptional;
- ReadOnlyAddressBook initialData;
- try {
- addressBookOptional = storage.readAddressBook();
- if (!addressBookOptional.isPresent()) {
- logger.info("Data file not found. Will be starting with a sample AddressBook");
- }
- initialData = addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);
- } catch (DataConversionException e) {
- logger.warning("Data file not in the correct format. Will be starting with an empty AddressBook");
- initialData = new AddressBook();
- } catch (IOException e) {
- logger.warning("Problem while reading from the file. Will be starting with an empty AddressBook");
- initialData = new AddressBook();
- }
-
- return new ModelManager(initialData, userPrefs);
- }
-
- private void initLogging(Config config) {
- LogsCenter.init(config);
- }
-
- /**
- * Returns a {@code Config} using the file at {@code configFilePath}.
- * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead
- * if {@code configFilePath} is null.
- */
- protected Config initConfig(Path configFilePath) {
- Config initializedConfig;
- Path configFilePathUsed;
-
- configFilePathUsed = Config.DEFAULT_CONFIG_FILE;
-
- if (configFilePath != null) {
- logger.info("Custom Config file specified " + configFilePath);
- configFilePathUsed = configFilePath;
- }
-
- logger.info("Using config file : " + configFilePathUsed);
-
- try {
- Optional configOptional = ConfigUtil.readConfig(configFilePathUsed);
- initializedConfig = configOptional.orElse(new Config());
- } catch (DataConversionException e) {
- logger.warning("Config file at " + configFilePathUsed + " is not in the correct format. "
- + "Using default config properties");
- initializedConfig = new Config();
- }
-
- //Update config file in case it was missing to begin with or there are new/unused fields
- try {
- ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);
- } catch (IOException e) {
- logger.warning("Failed to save config file : " + StringUtil.getDetails(e));
- }
- return initializedConfig;
- }
-
- /**
- * Returns a {@code UserPrefs} using the file at {@code storage}'s user prefs file path,
- * or a new {@code UserPrefs} with default configuration if errors occur when
- * reading from the file.
- */
- protected UserPrefs initPrefs(UserPrefsStorage storage) {
- Path prefsFilePath = storage.getUserPrefsFilePath();
- logger.info("Using prefs file : " + prefsFilePath);
-
- UserPrefs initializedPrefs;
- try {
- Optional prefsOptional = storage.readUserPrefs();
- initializedPrefs = prefsOptional.orElse(new UserPrefs());
- } catch (DataConversionException e) {
- logger.warning("UserPrefs file at " + prefsFilePath + " is not in the correct format. "
- + "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");
- initializedPrefs = new UserPrefs();
- }
-
- //Update prefs file in case it was missing to begin with or there are new/unused fields
- try {
- storage.saveUserPrefs(initializedPrefs);
- } catch (IOException e) {
- logger.warning("Failed to save config file : " + StringUtil.getDetails(e));
- }
-
- return initializedPrefs;
- }
-
- @Override
- public void start(Stage primaryStage) {
- logger.info("Starting AddressBook " + MainApp.VERSION);
- ui.start(primaryStage);
- }
-
- @Override
- public void stop() {
- logger.info("============================ [ Stopping Address Book ] =============================");
- try {
- storage.saveUserPrefs(model.getUserPrefs());
- } catch (IOException e) {
- logger.severe("Failed to save preferences " + StringUtil.getDetails(e));
- }
- }
-}
diff --git a/src/main/java/seedu/address/commons/core/Messages.java b/src/main/java/seedu/address/commons/core/Messages.java
deleted file mode 100644
index 1deb3a1e469..00000000000
--- a/src/main/java/seedu/address/commons/core/Messages.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package seedu.address.commons.core;
-
-/**
- * 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!";
-
-}
diff --git a/src/main/java/seedu/address/logic/Logic.java b/src/main/java/seedu/address/logic/Logic.java
deleted file mode 100644
index 92cd8fa605a..00000000000
--- a/src/main/java/seedu/address/logic/Logic.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package seedu.address.logic;
-
-import java.nio.file.Path;
-
-import javafx.collections.ObservableList;
-import seedu.address.commons.core.GuiSettings;
-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;
-
-/**
- * API of the Logic component
- */
-public interface Logic {
- /**
- * Executes the command and returns the result.
- * @param commandText The command as entered by the user.
- * @return the result of the command execution.
- * @throws CommandException If an error occurs during command execution.
- * @throws ParseException If an error occurs during parsing.
- */
- 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 persons */
- ObservableList getFilteredPersonList();
-
- /**
- * Returns the user prefs' address book file path.
- */
- Path getAddressBookFilePath();
-
- /**
- * Returns the user prefs' GUI settings.
- */
- GuiSettings getGuiSettings();
-
- /**
- * Set the user prefs' GUI settings.
- */
- void setGuiSettings(GuiSettings guiSettings);
-}
diff --git a/src/main/java/seedu/address/logic/LogicManager.java b/src/main/java/seedu/address/logic/LogicManager.java
deleted file mode 100644
index 9d9c6d15bdc..00000000000
--- a/src/main/java/seedu/address/logic/LogicManager.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package seedu.address.logic;
-
-import java.io.IOException;
-import java.nio.file.Path;
-import java.util.logging.Logger;
-
-import javafx.collections.ObservableList;
-import seedu.address.commons.core.GuiSettings;
-import seedu.address.commons.core.LogsCenter;
-import seedu.address.logic.commands.Command;
-import seedu.address.logic.commands.CommandResult;
-import seedu.address.logic.commands.exceptions.CommandException;
-import seedu.address.logic.parser.AddressBookParser;
-import seedu.address.logic.parser.exceptions.ParseException;
-import seedu.address.model.Model;
-import seedu.address.model.ReadOnlyAddressBook;
-import seedu.address.model.person.Person;
-import seedu.address.storage.Storage;
-
-/**
- * The main LogicManager of the app.
- */
-public class LogicManager implements Logic {
- public static final String FILE_OPS_ERROR_MESSAGE = "Could not save data to file: ";
- private final Logger logger = LogsCenter.getLogger(LogicManager.class);
-
- private final Model model;
- private final Storage storage;
- private final AddressBookParser addressBookParser;
-
- /**
- * Constructs a {@code LogicManager} with the given {@code Model} and {@code Storage}.
- */
- public LogicManager(Model model, Storage storage) {
- this.model = model;
- this.storage = storage;
- addressBookParser = new AddressBookParser();
- }
-
- @Override
- public CommandResult execute(String commandText) throws CommandException, ParseException {
- logger.info("----------------[USER COMMAND][" + commandText + "]");
-
- CommandResult commandResult;
- Command command = addressBookParser.parseCommand(commandText);
- commandResult = command.execute(model);
-
- try {
- storage.saveAddressBook(model.getAddressBook());
- } catch (IOException ioe) {
- throw new CommandException(FILE_OPS_ERROR_MESSAGE + ioe, ioe);
- }
-
- return commandResult;
- }
-
- @Override
- public ReadOnlyAddressBook getAddressBook() {
- return model.getAddressBook();
- }
-
- @Override
- public ObservableList getFilteredPersonList() {
- return model.getFilteredPersonList();
- }
-
- @Override
- public Path getAddressBookFilePath() {
- return model.getAddressBookFilePath();
- }
-
- @Override
- public GuiSettings getGuiSettings() {
- return model.getGuiSettings();
- }
-
- @Override
- public void setGuiSettings(GuiSettings guiSettings) {
- model.setGuiSettings(guiSettings);
- }
-}
diff --git a/src/main/java/seedu/address/logic/commands/AddCommand.java b/src/main/java/seedu/address/logic/commands/AddCommand.java
deleted file mode 100644
index 71656d7c5c8..00000000000
--- a/src/main/java/seedu/address/logic/commands/AddCommand.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package seedu.address.logic.commands;
-
-import static java.util.Objects.requireNonNull;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;
-
-import seedu.address.logic.commands.exceptions.CommandException;
-import seedu.address.model.Model;
-import seedu.address.model.person.Person;
-
-/**
- * Adds a person to the address book.
- */
-public class AddCommand extends Command {
-
- public static final String COMMAND_WORD = "add";
-
- public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a person to the address book. "
- + "Parameters: "
- + PREFIX_NAME + "NAME "
- + PREFIX_PHONE + "PHONE "
- + PREFIX_EMAIL + "EMAIL "
- + PREFIX_ADDRESS + "ADDRESS "
- + "[" + PREFIX_TAG + "TAG]...\n"
- + "Example: " + COMMAND_WORD + " "
- + PREFIX_NAME + "John Doe "
- + PREFIX_PHONE + "98765432 "
- + PREFIX_EMAIL + "johnd@example.com "
- + PREFIX_ADDRESS + "311, Clementi Ave 2, #02-25 "
- + PREFIX_TAG + "friends "
- + PREFIX_TAG + "owesMoney";
-
- public static final String MESSAGE_SUCCESS = "New person added: %1$s";
- public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in the address book";
-
- private final Person toAdd;
-
- /**
- * Creates an AddCommand to add the specified {@code Person}
- */
- public AddCommand(Person person) {
- requireNonNull(person);
- toAdd = person;
- }
-
- @Override
- public CommandResult execute(Model model) throws CommandException {
- requireNonNull(model);
-
- if (model.hasPerson(toAdd)) {
- throw new CommandException(MESSAGE_DUPLICATE_PERSON);
- }
-
- model.addPerson(toAdd);
- return new CommandResult(String.format(MESSAGE_SUCCESS, toAdd));
- }
-
- @Override
- public boolean equals(Object other) {
- return other == this // short circuit if same object
- || (other instanceof AddCommand // instanceof handles nulls
- && toAdd.equals(((AddCommand) other).toAdd));
- }
-}
diff --git a/src/main/java/seedu/address/logic/commands/ClearCommand.java b/src/main/java/seedu/address/logic/commands/ClearCommand.java
deleted file mode 100644
index 9c86b1fa6e4..00000000000
--- a/src/main/java/seedu/address/logic/commands/ClearCommand.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package seedu.address.logic.commands;
-
-import static java.util.Objects.requireNonNull;
-
-import seedu.address.model.AddressBook;
-import seedu.address.model.Model;
-
-/**
- * Clears the address book.
- */
-public class ClearCommand extends Command {
-
- public static final String COMMAND_WORD = "clear";
- public static final String MESSAGE_SUCCESS = "Address book has been cleared!";
-
-
- @Override
- public CommandResult execute(Model model) {
- requireNonNull(model);
- model.setAddressBook(new AddressBook());
- return new CommandResult(MESSAGE_SUCCESS);
- }
-}
diff --git a/src/main/java/seedu/address/logic/commands/DeleteCommand.java b/src/main/java/seedu/address/logic/commands/DeleteCommand.java
deleted file mode 100644
index 02fd256acba..00000000000
--- a/src/main/java/seedu/address/logic/commands/DeleteCommand.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package seedu.address.logic.commands;
-
-import static java.util.Objects.requireNonNull;
-
-import java.util.List;
-
-import seedu.address.commons.core.Messages;
-import seedu.address.commons.core.index.Index;
-import seedu.address.logic.commands.exceptions.CommandException;
-import seedu.address.model.Model;
-import seedu.address.model.person.Person;
-
-/**
- * Deletes a person identified using it's displayed index from the address book.
- */
-public class DeleteCommand extends Command {
-
- public static final String COMMAND_WORD = "delete";
-
- public static final String MESSAGE_USAGE = COMMAND_WORD
- + ": Deletes the person identified by the index number used in the displayed person list.\n"
- + "Parameters: INDEX (must be a positive integer)\n"
- + "Example: " + COMMAND_WORD + " 1";
-
- public static final String MESSAGE_DELETE_PERSON_SUCCESS = "Deleted Person: %1$s";
-
- private final Index targetIndex;
-
- public DeleteCommand(Index targetIndex) {
- this.targetIndex = targetIndex;
- }
-
- @Override
- public CommandResult execute(Model model) throws CommandException {
- requireNonNull(model);
- List lastShownList = model.getFilteredPersonList();
-
- if (targetIndex.getZeroBased() >= lastShownList.size()) {
- throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);
- }
-
- Person personToDelete = lastShownList.get(targetIndex.getZeroBased());
- model.deletePerson(personToDelete);
- return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));
- }
-
- @Override
- public boolean equals(Object other) {
- return other == this // short circuit if same object
- || (other instanceof DeleteCommand // instanceof handles nulls
- && targetIndex.equals(((DeleteCommand) other).targetIndex)); // state check
- }
-}
diff --git a/src/main/java/seedu/address/logic/commands/EditCommand.java b/src/main/java/seedu/address/logic/commands/EditCommand.java
deleted file mode 100644
index 7e36114902f..00000000000
--- a/src/main/java/seedu/address/logic/commands/EditCommand.java
+++ /dev/null
@@ -1,226 +0,0 @@
-package seedu.address.logic.commands;
-
-import static java.util.Objects.requireNonNull;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;
-import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Optional;
-import java.util.Set;
-
-import seedu.address.commons.core.Messages;
-import seedu.address.commons.core.index.Index;
-import seedu.address.commons.util.CollectionUtil;
-import seedu.address.logic.commands.exceptions.CommandException;
-import seedu.address.model.Model;
-import seedu.address.model.person.Address;
-import seedu.address.model.person.Email;
-import seedu.address.model.person.Name;
-import seedu.address.model.person.Person;
-import seedu.address.model.person.Phone;
-import seedu.address.model.tag.Tag;
-
-/**
- * Edits the details of an existing person in the address book.
- */
-public class EditCommand extends Command {
-
- public static final String COMMAND_WORD = "edit";
-
- public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the details of the person identified "
- + "by the index number used in the displayed person list. "
- + "Existing values will be overwritten by the input values.\n"
- + "Parameters: INDEX (must be a positive integer) "
- + "[" + PREFIX_NAME + "NAME] "
- + "[" + PREFIX_PHONE + "PHONE] "
- + "[" + PREFIX_EMAIL + "EMAIL] "
- + "[" + PREFIX_ADDRESS + "ADDRESS] "
- + "[" + PREFIX_TAG + "TAG]...\n"
- + "Example: " + COMMAND_WORD + " 1 "
- + PREFIX_PHONE + "91234567 "
- + PREFIX_EMAIL + "johndoe@example.com";
-
- public static final String MESSAGE_EDIT_PERSON_SUCCESS = "Edited Person: %1$s";
- public static final String MESSAGE_NOT_EDITED = "At least one field to edit must be provided.";
- public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in the address book.";
-
- private final Index index;
- private final EditPersonDescriptor editPersonDescriptor;
-
- /**
- * @param index of the person in the filtered person list to edit
- * @param editPersonDescriptor details to edit the person with
- */
- public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {
- requireNonNull(index);
- requireNonNull(editPersonDescriptor);
-
- this.index = index;
- this.editPersonDescriptor = new EditPersonDescriptor(editPersonDescriptor);
- }
-
- @Override
- public CommandResult execute(Model model) throws CommandException {
- requireNonNull(model);
- List lastShownList = model.getFilteredPersonList();
-
- if (index.getZeroBased() >= lastShownList.size()) {
- throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);
- }
-
- Person personToEdit = lastShownList.get(index.getZeroBased());
- Person editedPerson = createEditedPerson(personToEdit, editPersonDescriptor);
-
- if (!personToEdit.isSamePerson(editedPerson) && model.hasPerson(editedPerson)) {
- throw new CommandException(MESSAGE_DUPLICATE_PERSON);
- }
-
- model.setPerson(personToEdit, editedPerson);
- model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);
- return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));
- }
-
- /**
- * Creates and returns a {@code Person} with the details of {@code personToEdit}
- * edited with {@code editPersonDescriptor}.
- */
- private static Person createEditedPerson(Person personToEdit, EditPersonDescriptor editPersonDescriptor) {
- assert personToEdit != null;
-
- Name updatedName = editPersonDescriptor.getName().orElse(personToEdit.getName());
- Phone updatedPhone = editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());
- Email updatedEmail = editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());
- Address updatedAddress = editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());
- Set updatedTags = editPersonDescriptor.getTags().orElse(personToEdit.getTags());
-
- return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedTags);
- }
-
- @Override
- public boolean equals(Object other) {
- // short circuit if same object
- if (other == this) {
- return true;
- }
-
- // instanceof handles nulls
- if (!(other instanceof EditCommand)) {
- return false;
- }
-
- // state check
- EditCommand e = (EditCommand) other;
- return index.equals(e.index)
- && editPersonDescriptor.equals(e.editPersonDescriptor);
- }
-
- /**
- * Stores the details to edit the person with. Each non-empty field value will replace the
- * corresponding field value of the person.
- */
- public static class EditPersonDescriptor {
- private Name name;
- private Phone phone;
- private Email email;
- private Address address;
- private Set tags;
-
- public EditPersonDescriptor() {}
-
- /**
- * Copy constructor.
- * A defensive copy of {@code tags} is used internally.
- */
- public EditPersonDescriptor(EditPersonDescriptor toCopy) {
- setName(toCopy.name);
- setPhone(toCopy.phone);
- setEmail(toCopy.email);
- setAddress(toCopy.address);
- setTags(toCopy.tags);
- }
-
- /**
- * Returns true if at least one field is edited.
- */
- public boolean isAnyFieldEdited() {
- return CollectionUtil.isAnyNonNull(name, phone, email, address, tags);
- }
-
- public void setName(Name name) {
- this.name = name;
- }
-
- public Optional getName() {
- return Optional.ofNullable(name);
- }
-
- public void setPhone(Phone phone) {
- this.phone = phone;
- }
-
- public Optional getPhone() {
- return Optional.ofNullable(phone);
- }
-
- public void setEmail(Email email) {
- this.email = email;
- }
-
- public Optional getEmail() {
- return Optional.ofNullable(email);
- }
-
- public void setAddress(Address address) {
- this.address = address;
- }
-
- public Optional getAddress() {
- return Optional.ofNullable(address);
- }
-
- /**
- * Sets {@code tags} to this object's {@code tags}.
- * A defensive copy of {@code tags} is used internally.
- */
- public void setTags(Set tags) {
- this.tags = (tags != null) ? new HashSet<>(tags) : null;
- }
-
- /**
- * Returns an unmodifiable tag set, which throws {@code UnsupportedOperationException}
- * if modification is attempted.
- * Returns {@code Optional#empty()} if {@code tags} is null.
- */
- public Optional> getTags() {
- return (tags != null) ? Optional.of(Collections.unmodifiableSet(tags)) : Optional.empty();
- }
-
- @Override
- public boolean equals(Object other) {
- // short circuit if same object
- if (other == this) {
- return true;
- }
-
- // instanceof handles nulls
- if (!(other instanceof EditPersonDescriptor)) {
- return false;
- }
-
- // state check
- EditPersonDescriptor e = (EditPersonDescriptor) other;
-
- return getName().equals(e.getName())
- && getPhone().equals(e.getPhone())
- && getEmail().equals(e.getEmail())
- && getAddress().equals(e.getAddress())
- && getTags().equals(e.getTags());
- }
- }
-}
diff --git a/src/main/java/seedu/address/logic/commands/FindCommand.java b/src/main/java/seedu/address/logic/commands/FindCommand.java
deleted file mode 100644
index d6b19b0a0de..00000000000
--- a/src/main/java/seedu/address/logic/commands/FindCommand.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package seedu.address.logic.commands;
-
-import static java.util.Objects.requireNonNull;
-
-import seedu.address.commons.core.Messages;
-import seedu.address.model.Model;
-import seedu.address.model.person.NameContainsKeywordsPredicate;
-
-/**
- * Finds and lists all persons in address book whose name contains any of the argument keywords.
- * Keyword matching is case insensitive.
- */
-public class FindCommand extends Command {
-
- public static final String COMMAND_WORD = "find";
-
- public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all persons whose names contain any of "
- + "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n"
- + "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
- + "Example: " + COMMAND_WORD + " alice bob charlie";
-
- private final NameContainsKeywordsPredicate predicate;
-
- public FindCommand(NameContainsKeywordsPredicate predicate) {
- this.predicate = predicate;
- }
-
- @Override
- public CommandResult execute(Model model) {
- requireNonNull(model);
- model.updateFilteredPersonList(predicate);
- return new CommandResult(
- String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, model.getFilteredPersonList().size()));
- }
-
- @Override
- public boolean equals(Object other) {
- return other == this // short circuit if same object
- || (other instanceof FindCommand // instanceof handles nulls
- && predicate.equals(((FindCommand) other).predicate)); // state check
- }
-}
diff --git a/src/main/java/seedu/address/logic/commands/ListCommand.java b/src/main/java/seedu/address/logic/commands/ListCommand.java
deleted file mode 100644
index 84be6ad2596..00000000000
--- a/src/main/java/seedu/address/logic/commands/ListCommand.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package seedu.address.logic.commands;
-
-import static java.util.Objects.requireNonNull;
-import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;
-
-import seedu.address.model.Model;
-
-/**
- * Lists all persons in the address book to the user.
- */
-public class ListCommand extends Command {
-
- public static final String COMMAND_WORD = "list";
-
- public static final String MESSAGE_SUCCESS = "Listed all persons";
-
-
- @Override
- public CommandResult execute(Model model) {
- requireNonNull(model);
- model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);
- return new CommandResult(MESSAGE_SUCCESS);
- }
-}
diff --git a/src/main/java/seedu/address/logic/parser/AddCommandParser.java b/src/main/java/seedu/address/logic/parser/AddCommandParser.java
deleted file mode 100644
index 3b8bfa035e8..00000000000
--- a/src/main/java/seedu/address/logic/parser/AddCommandParser.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package seedu.address.logic.parser;
-
-import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;
-
-import java.util.Set;
-import java.util.stream.Stream;
-
-import seedu.address.logic.commands.AddCommand;
-import seedu.address.logic.parser.exceptions.ParseException;
-import seedu.address.model.person.Address;
-import seedu.address.model.person.Email;
-import seedu.address.model.person.Name;
-import seedu.address.model.person.Person;
-import seedu.address.model.person.Phone;
-import seedu.address.model.tag.Tag;
-
-/**
- * Parses input arguments and creates a new AddCommand object
- */
-public class AddCommandParser implements Parser {
-
- /**
- * Parses the given {@code String} of arguments in the context of the AddCommand
- * and returns an AddCommand object for execution.
- * @throws ParseException if the user input does not conform the expected format
- */
- public AddCommand parse(String args) throws ParseException {
- ArgumentMultimap argMultimap =
- ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_TAG);
-
- if (!arePrefixesPresent(argMultimap, PREFIX_NAME, PREFIX_ADDRESS, PREFIX_PHONE, PREFIX_EMAIL)
- || !argMultimap.getPreamble().isEmpty()) {
- throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));
- }
-
- Name name = ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get());
- Phone phone = ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE).get());
- Email email = ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL).get());
- Address address = ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS).get());
- Set tagList = ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));
-
- Person person = new Person(name, phone, email, address, tagList);
-
- return new AddCommand(person);
- }
-
- /**
- * Returns true if none of the prefixes contains empty {@code Optional} values in the given
- * {@code ArgumentMultimap}.
- */
- private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {
- return Stream.of(prefixes).allMatch(prefix -> argumentMultimap.getValue(prefix).isPresent());
- }
-
-}
diff --git a/src/main/java/seedu/address/logic/parser/AddressBookParser.java b/src/main/java/seedu/address/logic/parser/AddressBookParser.java
deleted file mode 100644
index 1e466792b46..00000000000
--- a/src/main/java/seedu/address/logic/parser/AddressBookParser.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package seedu.address.logic.parser;
-
-import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
-import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import seedu.address.logic.commands.AddCommand;
-import seedu.address.logic.commands.ClearCommand;
-import seedu.address.logic.commands.Command;
-import seedu.address.logic.commands.DeleteCommand;
-import seedu.address.logic.commands.EditCommand;
-import seedu.address.logic.commands.ExitCommand;
-import seedu.address.logic.commands.FindCommand;
-import seedu.address.logic.commands.HelpCommand;
-import seedu.address.logic.commands.ListCommand;
-import seedu.address.logic.parser.exceptions.ParseException;
-
-/**
- * Parses user input.
- */
-public class AddressBookParser {
-
- /**
- * Used for initial separation of command word and args.
- */
- private static final Pattern BASIC_COMMAND_FORMAT = Pattern.compile("(?\\S+)(?.*)");
-
- /**
- * Parses user input into command for execution.
- *
- * @param userInput full user input string
- * @return the command based on the user input
- * @throws ParseException if the user input does not conform the expected format
- */
- public Command parseCommand(String userInput) throws ParseException {
- final Matcher matcher = BASIC_COMMAND_FORMAT.matcher(userInput.trim());
- if (!matcher.matches()) {
- throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));
- }
-
- final String commandWord = matcher.group("commandWord");
- final String arguments = matcher.group("arguments");
- switch (commandWord) {
-
- case AddCommand.COMMAND_WORD:
- return new AddCommandParser().parse(arguments);
-
- case EditCommand.COMMAND_WORD:
- return new EditCommandParser().parse(arguments);
-
- case DeleteCommand.COMMAND_WORD:
- return new DeleteCommandParser().parse(arguments);
-
- case ClearCommand.COMMAND_WORD:
- return new ClearCommand();
-
- case FindCommand.COMMAND_WORD:
- return new FindCommandParser().parse(arguments);
-
- case ListCommand.COMMAND_WORD:
- return new ListCommand();
-
- case ExitCommand.COMMAND_WORD:
- return new ExitCommand();
-
- case HelpCommand.COMMAND_WORD:
- return new HelpCommand();
-
- default:
- throw new ParseException(MESSAGE_UNKNOWN_COMMAND);
- }
- }
-
-}
diff --git a/src/main/java/seedu/address/logic/parser/CliSyntax.java b/src/main/java/seedu/address/logic/parser/CliSyntax.java
deleted file mode 100644
index 75b1a9bf119..00000000000
--- a/src/main/java/seedu/address/logic/parser/CliSyntax.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package seedu.address.logic.parser;
-
-/**
- * Contains Command Line Interface (CLI) syntax definitions common to multiple commands
- */
-public class CliSyntax {
-
- /* Prefix definitions */
- public static final Prefix PREFIX_NAME = new Prefix("n/");
- public static final Prefix PREFIX_PHONE = new Prefix("p/");
- public static final Prefix PREFIX_EMAIL = new Prefix("e/");
- public static final Prefix PREFIX_ADDRESS = new Prefix("a/");
- public static final Prefix PREFIX_TAG = new Prefix("t/");
-
-}
diff --git a/src/main/java/seedu/address/logic/parser/DeleteCommandParser.java b/src/main/java/seedu/address/logic/parser/DeleteCommandParser.java
deleted file mode 100644
index 522b93081cc..00000000000
--- a/src/main/java/seedu/address/logic/parser/DeleteCommandParser.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package seedu.address.logic.parser;
-
-import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
-
-import seedu.address.commons.core.index.Index;
-import seedu.address.logic.commands.DeleteCommand;
-import seedu.address.logic.parser.exceptions.ParseException;
-
-/**
- * Parses input arguments and creates a new DeleteCommand object
- */
-public class DeleteCommandParser implements Parser {
-
- /**
- * Parses the given {@code String} of arguments in the context of the DeleteCommand
- * and returns a DeleteCommand object for execution.
- * @throws ParseException if the user input does not conform the expected format
- */
- public DeleteCommand parse(String args) throws ParseException {
- try {
- Index index = ParserUtil.parseIndex(args);
- return new DeleteCommand(index);
- } catch (ParseException pe) {
- throw new ParseException(
- String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE), pe);
- }
- }
-
-}
diff --git a/src/main/java/seedu/address/logic/parser/EditCommandParser.java b/src/main/java/seedu/address/logic/parser/EditCommandParser.java
deleted file mode 100644
index 845644b7dea..00000000000
--- a/src/main/java/seedu/address/logic/parser/EditCommandParser.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package seedu.address.logic.parser;
-
-import static java.util.Objects.requireNonNull;
-import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;
-import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Optional;
-import java.util.Set;
-
-import seedu.address.commons.core.index.Index;
-import seedu.address.logic.commands.EditCommand;
-import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;
-import seedu.address.logic.parser.exceptions.ParseException;
-import seedu.address.model.tag.Tag;
-
-/**
- * Parses input arguments and creates a new EditCommand object
- */
-public class EditCommandParser implements Parser {
-
- /**
- * Parses the given {@code String} of arguments in the context of the EditCommand
- * and returns an EditCommand object for execution.
- * @throws ParseException if the user input does not conform the expected format
- */
- public EditCommand parse(String args) throws ParseException {
- requireNonNull(args);
- ArgumentMultimap argMultimap =
- ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_TAG);
-
- Index index;
-
- try {
- index = ParserUtil.parseIndex(argMultimap.getPreamble());
- } catch (ParseException pe) {
- throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE), pe);
- }
-
- EditPersonDescriptor editPersonDescriptor = new EditPersonDescriptor();
- if (argMultimap.getValue(PREFIX_NAME).isPresent()) {
- editPersonDescriptor.setName(ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get()));
- }
- if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {
- editPersonDescriptor.setPhone(ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE).get()));
- }
- if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {
- editPersonDescriptor.setEmail(ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL).get()));
- }
- if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {
- editPersonDescriptor.setAddress(ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS).get()));
- }
- parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);
-
- if (!editPersonDescriptor.isAnyFieldEdited()) {
- throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);
- }
-
- return new EditCommand(index, editPersonDescriptor);
- }
-
- /**
- * Parses {@code Collection tags} into a {@code Set} if {@code tags} is non-empty.
- * If {@code tags} contain only one element which is an empty string, it will be parsed into a
- * {@code Set} containing zero tags.
- */
- private Optional> parseTagsForEdit(Collection tags) throws ParseException {
- assert tags != null;
-
- if (tags.isEmpty()) {
- return Optional.empty();
- }
- Collection tagSet = tags.size() == 1 && tags.contains("") ? Collections.emptySet() : tags;
- return Optional.of(ParserUtil.parseTags(tagSet));
- }
-
-}
diff --git a/src/main/java/seedu/address/logic/parser/FindCommandParser.java b/src/main/java/seedu/address/logic/parser/FindCommandParser.java
deleted file mode 100644
index 4fb71f23103..00000000000
--- a/src/main/java/seedu/address/logic/parser/FindCommandParser.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package seedu.address.logic.parser;
-
-import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
-
-import java.util.Arrays;
-
-import seedu.address.logic.commands.FindCommand;
-import seedu.address.logic.parser.exceptions.ParseException;
-import seedu.address.model.person.NameContainsKeywordsPredicate;
-
-/**
- * Parses input arguments and creates a new FindCommand object
- */
-public class FindCommandParser implements Parser {
-
- /**
- * Parses the given {@code String} of arguments in the context of the FindCommand
- * and returns a FindCommand object for execution.
- * @throws ParseException if the user input does not conform the expected format
- */
- public FindCommand parse(String args) throws ParseException {
- String trimmedArgs = args.trim();
- if (trimmedArgs.isEmpty()) {
- throw new ParseException(
- String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));
- }
-
- String[] nameKeywords = trimmedArgs.split("\\s+");
-
- return new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));
- }
-
-}
diff --git a/src/main/java/seedu/address/logic/parser/ParserUtil.java b/src/main/java/seedu/address/logic/parser/ParserUtil.java
deleted file mode 100644
index b117acb9c55..00000000000
--- a/src/main/java/seedu/address/logic/parser/ParserUtil.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package seedu.address.logic.parser;
-
-import static java.util.Objects.requireNonNull;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import seedu.address.commons.core.index.Index;
-import seedu.address.commons.util.StringUtil;
-import seedu.address.logic.parser.exceptions.ParseException;
-import seedu.address.model.person.Address;
-import seedu.address.model.person.Email;
-import seedu.address.model.person.Name;
-import seedu.address.model.person.Phone;
-import seedu.address.model.tag.Tag;
-
-/**
- * Contains utility methods used for parsing strings in the various *Parser classes.
- */
-public class ParserUtil {
-
- public static final String MESSAGE_INVALID_INDEX = "Index is not a non-zero unsigned integer.";
-
- /**
- * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be
- * trimmed.
- * @throws ParseException if the specified index is invalid (not non-zero unsigned integer).
- */
- public static Index parseIndex(String oneBasedIndex) throws ParseException {
- String trimmedIndex = oneBasedIndex.trim();
- if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {
- throw new ParseException(MESSAGE_INVALID_INDEX);
- }
- return Index.fromOneBased(Integer.parseInt(trimmedIndex));
- }
-
- /**
- * Parses a {@code String name} into a {@code Name}.
- * Leading and trailing whitespaces will be trimmed.
- *
- * @throws ParseException if the given {@code name} is invalid.
- */
- public static Name parseName(String name) throws ParseException {
- requireNonNull(name);
- String trimmedName = name.trim();
- if (!Name.isValidName(trimmedName)) {
- throw new ParseException(Name.MESSAGE_CONSTRAINTS);
- }
- return new Name(trimmedName);
- }
-
- /**
- * Parses a {@code String phone} into a {@code Phone}.
- * Leading and trailing whitespaces will be trimmed.
- *
- * @throws ParseException if the given {@code phone} is invalid.
- */
- public static Phone parsePhone(String phone) throws ParseException {
- requireNonNull(phone);
- String trimmedPhone = phone.trim();
- if (!Phone.isValidPhone(trimmedPhone)) {
- throw new ParseException(Phone.MESSAGE_CONSTRAINTS);
- }
- return new Phone(trimmedPhone);
- }
-
- /**
- * Parses a {@code String address} into an {@code Address}.
- * Leading and trailing whitespaces will be trimmed.
- *
- * @throws ParseException if the given {@code address} is invalid.
- */
- public static Address parseAddress(String address) throws ParseException {
- requireNonNull(address);
- String trimmedAddress = address.trim();
- if (!Address.isValidAddress(trimmedAddress)) {
- throw new ParseException(Address.MESSAGE_CONSTRAINTS);
- }
- return new Address(trimmedAddress);
- }
-
- /**
- * Parses a {@code String email} into an {@code Email}.
- * Leading and trailing whitespaces will be trimmed.
- *
- * @throws ParseException if the given {@code email} is invalid.
- */
- public static Email parseEmail(String email) throws ParseException {
- requireNonNull(email);
- String trimmedEmail = email.trim();
- if (!Email.isValidEmail(trimmedEmail)) {
- throw new ParseException(Email.MESSAGE_CONSTRAINTS);
- }
- return new Email(trimmedEmail);
- }
-
- /**
- * Parses a {@code String tag} into a {@code Tag}.
- * Leading and trailing whitespaces will be trimmed.
- *
- * @throws ParseException if the given {@code tag} is invalid.
- */
- public static Tag parseTag(String tag) throws ParseException {
- requireNonNull(tag);
- String trimmedTag = tag.trim();
- if (!Tag.isValidTagName(trimmedTag)) {
- throw new ParseException(Tag.MESSAGE_CONSTRAINTS);
- }
- return new Tag(trimmedTag);
- }
-
- /**
- * Parses {@code Collection tags} into a {@code Set}.
- */
- public static Set parseTags(Collection tags) throws ParseException {
- requireNonNull(tags);
- final Set tagSet = new HashSet<>();
- for (String tagName : tags) {
- tagSet.add(parseTag(tagName));
- }
- return tagSet;
- }
-}
diff --git a/src/main/java/seedu/address/model/AddressBook.java b/src/main/java/seedu/address/model/AddressBook.java
deleted file mode 100644
index 1a943a0781a..00000000000
--- a/src/main/java/seedu/address/model/AddressBook.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package seedu.address.model;
-
-import static java.util.Objects.requireNonNull;
-
-import java.util.List;
-
-import javafx.collections.ObservableList;
-import seedu.address.model.person.Person;
-import seedu.address.model.person.UniquePersonList;
-
-/**
- * Wraps all data at the address-book level
- * Duplicates are not allowed (by .isSamePerson comparison)
- */
-public class AddressBook implements ReadOnlyAddressBook {
-
- private final UniquePersonList persons;
-
- /*
- * The 'unusual' code block below is a non-static initialization block, sometimes used to avoid duplication
- * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html
- *
- * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication
- * among constructors.
- */
- {
- persons = new UniquePersonList();
- }
-
- public AddressBook() {}
-
- /**
- * Creates an AddressBook using the Persons in the {@code toBeCopied}
- */
- public AddressBook(ReadOnlyAddressBook toBeCopied) {
- this();
- resetData(toBeCopied);
- }
-
- //// list overwrite operations
-
- /**
- * Replaces the contents of the person list with {@code persons}.
- * {@code persons} must not contain duplicate persons.
- */
- public void setPersons(List persons) {
- this.persons.setPersons(persons);
- }
-
- /**
- * Resets the existing data of this {@code AddressBook} with {@code newData}.
- */
- public void resetData(ReadOnlyAddressBook newData) {
- requireNonNull(newData);
-
- setPersons(newData.getPersonList());
- }
-
- //// person-level operations
-
- /**
- * Returns true if a person with the same identity as {@code person} exists in the address book.
- */
- public boolean hasPerson(Person person) {
- requireNonNull(person);
- return persons.contains(person);
- }
-
- /**
- * Adds a person to the address book.
- * The person must not already exist in the address book.
- */
- public void addPerson(Person p) {
- persons.add(p);
- }
-
- /**
- * Replaces the given person {@code target} in the list with {@code editedPerson}.
- * {@code target} must exist in the address book.
- * The person identity of {@code editedPerson} must not be the same as another existing person in the address book.
- */
- public void setPerson(Person target, Person editedPerson) {
- requireNonNull(editedPerson);
-
- persons.setPerson(target, editedPerson);
- }
-
- /**
- * Removes {@code key} from this {@code AddressBook}.
- * {@code key} must exist in the address book.
- */
- public void removePerson(Person key) {
- persons.remove(key);
- }
-
- //// util methods
-
- @Override
- public String toString() {
- return persons.asUnmodifiableObservableList().size() + " persons";
- // TODO: refine later
- }
-
- @Override
- public ObservableList getPersonList() {
- return persons.asUnmodifiableObservableList();
- }
-
- @Override
- public boolean equals(Object other) {
- return other == this // short circuit if same object
- || (other instanceof AddressBook // instanceof handles nulls
- && persons.equals(((AddressBook) other).persons));
- }
-
- @Override
- public int hashCode() {
- return persons.hashCode();
- }
-}
diff --git a/src/main/java/seedu/address/model/Model.java b/src/main/java/seedu/address/model/Model.java
deleted file mode 100644
index d54df471c1f..00000000000
--- a/src/main/java/seedu/address/model/Model.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package seedu.address.model;
-
-import java.nio.file.Path;
-import java.util.function.Predicate;
-
-import javafx.collections.ObservableList;
-import seedu.address.commons.core.GuiSettings;
-import seedu.address.model.person.Person;
-
-/**
- * The API of the Model component.
- */
-public interface Model {
- /** {@code Predicate} that always evaluate to true */
- Predicate PREDICATE_SHOW_ALL_PERSONS = unused -> true;
-
- /**
- * Replaces user prefs data with the data in {@code userPrefs}.
- */
- void setUserPrefs(ReadOnlyUserPrefs userPrefs);
-
- /**
- * Returns the user prefs.
- */
- ReadOnlyUserPrefs getUserPrefs();
-
- /**
- * Returns the user prefs' GUI settings.
- */
- GuiSettings getGuiSettings();
-
- /**
- * Sets the user prefs' GUI settings.
- */
- void setGuiSettings(GuiSettings guiSettings);
-
- /**
- * Returns the user prefs' address book file path.
- */
- Path getAddressBookFilePath();
-
- /**
- * Sets the user prefs' address book file path.
- */
- void setAddressBookFilePath(Path addressBookFilePath);
-
- /**
- * Replaces address book data with the data in {@code addressBook}.
- */
- void setAddressBook(ReadOnlyAddressBook addressBook);
-
- /** Returns the AddressBook */
- ReadOnlyAddressBook getAddressBook();
-
- /**
- * Returns true if a person with the same identity as {@code person} exists in the address book.
- */
- boolean hasPerson(Person person);
-
- /**
- * Deletes the given person.
- * The person must exist in the address book.
- */
- void deletePerson(Person target);
-
- /**
- * Adds the given person.
- * {@code person} must not already exist in the address book.
- */
- void addPerson(Person person);
-
- /**
- * Replaces the given person {@code target} with {@code editedPerson}.
- * {@code target} must exist in the address book.
- * The person identity of {@code editedPerson} must not be the same as another existing person in the address book.
- */
- void setPerson(Person target, Person editedPerson);
-
- /** Returns an unmodifiable view of the filtered person list */
- ObservableList getFilteredPersonList();
-
- /**
- * Updates the filter of the filtered person list to filter by the given {@code predicate}.
- * @throws NullPointerException if {@code predicate} is null.
- */
- void updateFilteredPersonList(Predicate predicate);
-}
diff --git a/src/main/java/seedu/address/model/ModelManager.java b/src/main/java/seedu/address/model/ModelManager.java
deleted file mode 100644
index 86c1df298d7..00000000000
--- a/src/main/java/seedu/address/model/ModelManager.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package seedu.address.model;
-
-import static java.util.Objects.requireNonNull;
-import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;
-
-import java.nio.file.Path;
-import java.util.function.Predicate;
-import java.util.logging.Logger;
-
-import javafx.collections.ObservableList;
-import javafx.collections.transformation.FilteredList;
-import seedu.address.commons.core.GuiSettings;
-import seedu.address.commons.core.LogsCenter;
-import seedu.address.model.person.Person;
-
-/**
- * Represents the in-memory model of the address book data.
- */
-public class ModelManager implements Model {
- private static final Logger logger = LogsCenter.getLogger(ModelManager.class);
-
- private final AddressBook addressBook;
- private final UserPrefs userPrefs;
- private final FilteredList filteredPersons;
-
- /**
- * Initializes a ModelManager with the given addressBook and userPrefs.
- */
- public ModelManager(ReadOnlyAddressBook addressBook, ReadOnlyUserPrefs userPrefs) {
- requireAllNonNull(addressBook, userPrefs);
-
- logger.fine("Initializing with address book: " + addressBook + " and user prefs " + userPrefs);
-
- this.addressBook = new AddressBook(addressBook);
- this.userPrefs = new UserPrefs(userPrefs);
- filteredPersons = new FilteredList<>(this.addressBook.getPersonList());
- }
-
- public ModelManager() {
- this(new AddressBook(), new UserPrefs());
- }
-
- //=========== UserPrefs ==================================================================================
-
- @Override
- public void setUserPrefs(ReadOnlyUserPrefs userPrefs) {
- requireNonNull(userPrefs);
- this.userPrefs.resetData(userPrefs);
- }
-
- @Override
- public ReadOnlyUserPrefs getUserPrefs() {
- return userPrefs;
- }
-
- @Override
- public GuiSettings getGuiSettings() {
- return userPrefs.getGuiSettings();
- }
-
- @Override
- public void setGuiSettings(GuiSettings guiSettings) {
- requireNonNull(guiSettings);
- userPrefs.setGuiSettings(guiSettings);
- }
-
- @Override
- public Path getAddressBookFilePath() {
- return userPrefs.getAddressBookFilePath();
- }
-
- @Override
- public void setAddressBookFilePath(Path addressBookFilePath) {
- requireNonNull(addressBookFilePath);
- userPrefs.setAddressBookFilePath(addressBookFilePath);
- }
-
- //=========== AddressBook ================================================================================
-
- @Override
- public void setAddressBook(ReadOnlyAddressBook addressBook) {
- this.addressBook.resetData(addressBook);
- }
-
- @Override
- public ReadOnlyAddressBook getAddressBook() {
- return addressBook;
- }
-
- @Override
- public boolean hasPerson(Person person) {
- requireNonNull(person);
- return addressBook.hasPerson(person);
- }
-
- @Override
- public void deletePerson(Person target) {
- addressBook.removePerson(target);
- }
-
- @Override
- public void addPerson(Person person) {
- addressBook.addPerson(person);
- updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);
- }
-
- @Override
- public void setPerson(Person target, Person editedPerson) {
- requireAllNonNull(target, editedPerson);
-
- addressBook.setPerson(target, editedPerson);
- }
-
- //=========== Filtered Person List Accessors =============================================================
-
- /**
- * Returns an unmodifiable view of the list of {@code Person} backed by the internal list of
- * {@code versionedAddressBook}
- */
- @Override
- public ObservableList getFilteredPersonList() {
- return filteredPersons;
- }
-
- @Override
- public void updateFilteredPersonList(Predicate predicate) {
- requireNonNull(predicate);
- filteredPersons.setPredicate(predicate);
- }
-
- @Override
- public boolean equals(Object obj) {
- // short circuit if same object
- if (obj == this) {
- return true;
- }
-
- // instanceof handles nulls
- if (!(obj instanceof ModelManager)) {
- return false;
- }
-
- // state check
- ModelManager other = (ModelManager) obj;
- return addressBook.equals(other.addressBook)
- && userPrefs.equals(other.userPrefs)
- && filteredPersons.equals(other.filteredPersons);
- }
-
-}
diff --git a/src/main/java/seedu/address/model/ReadOnlyAddressBook.java b/src/main/java/seedu/address/model/ReadOnlyAddressBook.java
deleted file mode 100644
index 6ddc2cd9a29..00000000000
--- a/src/main/java/seedu/address/model/ReadOnlyAddressBook.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package seedu.address.model;
-
-import javafx.collections.ObservableList;
-import seedu.address.model.person.Person;
-
-/**
- * Unmodifiable view of an address book
- */
-public interface ReadOnlyAddressBook {
-
- /**
- * Returns an unmodifiable view of the persons list.
- * This list will not contain any duplicate persons.
- */
- ObservableList getPersonList();
-
-}
diff --git a/src/main/java/seedu/address/model/person/Address.java b/src/main/java/seedu/address/model/person/Address.java
deleted file mode 100644
index 60472ca22a0..00000000000
--- a/src/main/java/seedu/address/model/person/Address.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package seedu.address.model.person;
-
-import static java.util.Objects.requireNonNull;
-import static seedu.address.commons.util.AppUtil.checkArgument;
-
-/**
- * Represents a Person's address in the address book.
- * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}
- */
-public class Address {
-
- public static final String MESSAGE_CONSTRAINTS = "Addresses can take any values, and it should not be blank";
-
- /*
- * The first character of the address must not be a whitespace,
- * otherwise " " (a blank string) becomes a valid input.
- */
- public static final String VALIDATION_REGEX = "[^\\s].*";
-
- public final String value;
-
- /**
- * Constructs an {@code Address}.
- *
- * @param address A valid address.
- */
- public Address(String address) {
- requireNonNull(address);
- checkArgument(isValidAddress(address), MESSAGE_CONSTRAINTS);
- value = address;
- }
-
- /**
- * Returns true if a given string is a valid email.
- */
- public static boolean isValidAddress(String test) {
- return test.matches(VALIDATION_REGEX);
- }
-
- @Override
- public String toString() {
- return value;
- }
-
- @Override
- public boolean equals(Object other) {
- return other == this // short circuit if same object
- || (other instanceof Address // instanceof handles nulls
- && value.equals(((Address) other).value)); // state check
- }
-
- @Override
- public int hashCode() {
- return value.hashCode();
- }
-
-}
diff --git a/src/main/java/seedu/address/model/person/Name.java b/src/main/java/seedu/address/model/person/Name.java
deleted file mode 100644
index 79244d71cf7..00000000000
--- a/src/main/java/seedu/address/model/person/Name.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package seedu.address.model.person;
-
-import static java.util.Objects.requireNonNull;
-import static seedu.address.commons.util.AppUtil.checkArgument;
-
-/**
- * Represents a Person's name in the address book.
- * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}
- */
-public class Name {
-
- public static final String MESSAGE_CONSTRAINTS =
- "Names should only contain alphanumeric characters and spaces, and it should not be blank";
-
- /*
- * The first character of the address must not be a whitespace,
- * otherwise " " (a blank string) becomes a valid input.
- */
- public static final String VALIDATION_REGEX = "[\\p{Alnum}][\\p{Alnum} ]*";
-
- public final String fullName;
-
- /**
- * Constructs a {@code Name}.
- *
- * @param name A valid name.
- */
- public Name(String name) {
- requireNonNull(name);
- checkArgument(isValidName(name), MESSAGE_CONSTRAINTS);
- fullName = name;
- }
-
- /**
- * Returns true if a given string is a valid name.
- */
- public static boolean isValidName(String test) {
- return test.matches(VALIDATION_REGEX);
- }
-
-
- @Override
- public String toString() {
- return fullName;
- }
-
- @Override
- public boolean equals(Object other) {
- return other == this // short circuit if same object
- || (other instanceof Name // instanceof handles nulls
- && fullName.equals(((Name) other).fullName)); // state check
- }
-
- @Override
- public int hashCode() {
- return fullName.hashCode();
- }
-
-}
diff --git a/src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java
deleted file mode 100644
index c9b5868427c..00000000000
--- a/src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package seedu.address.model.person;
-
-import java.util.List;
-import java.util.function.Predicate;
-
-import seedu.address.commons.util.StringUtil;
-
-/**
- * Tests that a {@code Person}'s {@code Name} matches any of the keywords given.
- */
-public class NameContainsKeywordsPredicate implements Predicate {
- private final List keywords;
-
- public NameContainsKeywordsPredicate(List keywords) {
- this.keywords = keywords;
- }
-
- @Override
- public boolean test(Person person) {
- return keywords.stream()
- .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(person.getName().fullName, keyword));
- }
-
- @Override
- public boolean equals(Object other) {
- return other == this // short circuit if same object
- || (other instanceof NameContainsKeywordsPredicate // instanceof handles nulls
- && keywords.equals(((NameContainsKeywordsPredicate) other).keywords)); // state check
- }
-
-}
diff --git a/src/main/java/seedu/address/model/person/Person.java b/src/main/java/seedu/address/model/person/Person.java
deleted file mode 100644
index 8ff1d83fe89..00000000000
--- a/src/main/java/seedu/address/model/person/Person.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package seedu.address.model.person;
-
-import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Objects;
-import java.util.Set;
-
-import seedu.address.model.tag.Tag;
-
-/**
- * Represents a Person in the address book.
- * Guarantees: details are present and not null, field values are validated, immutable.
- */
-public class Person {
-
- // Identity fields
- private final Name name;
- private final Phone phone;
- private final Email email;
-
- // Data fields
- private final Address address;
- private final Set tags = new HashSet<>();
-
- /**
- * Every field must be present and not null.
- */
- public Person(Name name, Phone phone, Email email, Address address, Set tags) {
- requireAllNonNull(name, phone, email, address, tags);
- this.name = name;
- this.phone = phone;
- this.email = email;
- this.address = address;
- this.tags.addAll(tags);
- }
-
- public Name getName() {
- return name;
- }
-
- public Phone getPhone() {
- return phone;
- }
-
- public Email getEmail() {
- return email;
- }
-
- public Address getAddress() {
- return address;
- }
-
- /**
- * Returns an immutable tag set, which throws {@code UnsupportedOperationException}
- * if modification is attempted.
- */
- public Set getTags() {
- return Collections.unmodifiableSet(tags);
- }
-
- /**
- * Returns true if both persons have the same name.
- * This defines a weaker notion of equality between two persons.
- */
- public boolean isSamePerson(Person otherPerson) {
- if (otherPerson == this) {
- return true;
- }
-
- return otherPerson != null
- && otherPerson.getName().equals(getName());
- }
-
- /**
- * Returns true if both persons have the same identity and data fields.
- * This defines a stronger notion of equality between two persons.
- */
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
-
- if (!(other instanceof Person)) {
- return false;
- }
-
- Person otherPerson = (Person) other;
- return otherPerson.getName().equals(getName())
- && otherPerson.getPhone().equals(getPhone())
- && otherPerson.getEmail().equals(getEmail())
- && otherPerson.getAddress().equals(getAddress())
- && otherPerson.getTags().equals(getTags());
- }
-
- @Override
- public int hashCode() {
- // use this method for custom fields hashing instead of implementing your own
- return Objects.hash(name, phone, email, address, tags);
- }
-
- @Override
- public String toString() {
- final StringBuilder builder = new StringBuilder();
- builder.append(getName())
- .append("; Phone: ")
- .append(getPhone())
- .append("; Email: ")
- .append(getEmail())
- .append("; Address: ")
- .append(getAddress());
-
- Set tags = getTags();
- if (!tags.isEmpty()) {
- builder.append("; Tags: ");
- tags.forEach(builder::append);
- }
- return builder.toString();
- }
-
-}
diff --git a/src/main/java/seedu/address/model/person/Phone.java b/src/main/java/seedu/address/model/person/Phone.java
deleted file mode 100644
index 872c76b382f..00000000000
--- a/src/main/java/seedu/address/model/person/Phone.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package seedu.address.model.person;
-
-import static java.util.Objects.requireNonNull;
-import static seedu.address.commons.util.AppUtil.checkArgument;
-
-/**
- * Represents a Person's phone number in the address book.
- * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}
- */
-public class Phone {
-
-
- public static final String MESSAGE_CONSTRAINTS =
- "Phone numbers should only contain numbers, and it should be at least 3 digits long";
- public static final String VALIDATION_REGEX = "\\d{3,}";
- public final String value;
-
- /**
- * Constructs a {@code Phone}.
- *
- * @param phone A valid phone number.
- */
- public Phone(String phone) {
- requireNonNull(phone);
- checkArgument(isValidPhone(phone), MESSAGE_CONSTRAINTS);
- value = phone;
- }
-
- /**
- * Returns true if a given string is a valid phone number.
- */
- public static boolean isValidPhone(String test) {
- return test.matches(VALIDATION_REGEX);
- }
-
- @Override
- public String toString() {
- return value;
- }
-
- @Override
- public boolean equals(Object other) {
- return other == this // short circuit if same object
- || (other instanceof Phone // instanceof handles nulls
- && value.equals(((Phone) other).value)); // state check
- }
-
- @Override
- public int hashCode() {
- return value.hashCode();
- }
-
-}
diff --git a/src/main/java/seedu/address/model/person/UniquePersonList.java b/src/main/java/seedu/address/model/person/UniquePersonList.java
deleted file mode 100644
index 0fee4fe57e6..00000000000
--- a/src/main/java/seedu/address/model/person/UniquePersonList.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package seedu.address.model.person;
-
-import static java.util.Objects.requireNonNull;
-import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;
-
-import java.util.Iterator;
-import java.util.List;
-
-import javafx.collections.FXCollections;
-import javafx.collections.ObservableList;
-import seedu.address.model.person.exceptions.DuplicatePersonException;
-import seedu.address.model.person.exceptions.PersonNotFoundException;
-
-/**
- * A list of persons that enforces uniqueness between its elements and does not allow nulls.
- * A person is considered unique by comparing using {@code Person#isSamePerson(Person)}. As such, adding and updating of
- * persons uses Person#isSamePerson(Person) for equality so as to ensure that the person being added or updated is
- * unique in terms of identity in the UniquePersonList. However, the removal of a person uses Person#equals(Object) so
- * as to ensure that the person with exactly the same fields will be removed.
- *
- * Supports a minimal set of list operations.
- *
- * @see Person#isSamePerson(Person)
- */
-public class UniquePersonList implements Iterable {
-
- private final ObservableList internalList = FXCollections.observableArrayList();
- private final ObservableList internalUnmodifiableList =
- FXCollections.unmodifiableObservableList(internalList);
-
- /**
- * Returns true if the list contains an equivalent person as the given argument.
- */
- public boolean contains(Person toCheck) {
- requireNonNull(toCheck);
- return internalList.stream().anyMatch(toCheck::isSamePerson);
- }
-
- /**
- * Adds a person to the list.
- * The person must not already exist in the list.
- */
- public void add(Person toAdd) {
- requireNonNull(toAdd);
- if (contains(toAdd)) {
- throw new DuplicatePersonException();
- }
- internalList.add(toAdd);
- }
-
- /**
- * Replaces the person {@code target} in the list with {@code editedPerson}.
- * {@code target} must exist in the list.
- * The person identity of {@code editedPerson} must not be the same as another existing person in the list.
- */
- public void setPerson(Person target, Person editedPerson) {
- requireAllNonNull(target, editedPerson);
-
- int index = internalList.indexOf(target);
- if (index == -1) {
- throw new PersonNotFoundException();
- }
-
- if (!target.isSamePerson(editedPerson) && contains(editedPerson)) {
- throw new DuplicatePersonException();
- }
-
- internalList.set(index, editedPerson);
- }
-
- /**
- * Removes the equivalent person from the list.
- * The person must exist in the list.
- */
- public void remove(Person toRemove) {
- requireNonNull(toRemove);
- if (!internalList.remove(toRemove)) {
- throw new PersonNotFoundException();
- }
- }
-
- public void setPersons(UniquePersonList replacement) {
- requireNonNull(replacement);
- internalList.setAll(replacement.internalList);
- }
-
- /**
- * Replaces the contents of this list with {@code persons}.
- * {@code persons} must not contain duplicate persons.
- */
- public void setPersons(List persons) {
- requireAllNonNull(persons);
- if (!personsAreUnique(persons)) {
- throw new DuplicatePersonException();
- }
-
- internalList.setAll(persons);
- }
-
- /**
- * Returns the backing list as an unmodifiable {@code ObservableList}.
- */
- public ObservableList asUnmodifiableObservableList() {
- return internalUnmodifiableList;
- }
-
- @Override
- public Iterator iterator() {
- return internalList.iterator();
- }
-
- @Override
- public boolean equals(Object other) {
- return other == this // short circuit if same object
- || (other instanceof UniquePersonList // instanceof handles nulls
- && internalList.equals(((UniquePersonList) other).internalList));
- }
-
- @Override
- public int hashCode() {
- return internalList.hashCode();
- }
-
- /**
- * Returns true if {@code persons} contains only unique persons.
- */
- private boolean personsAreUnique(List persons) {
- for (int i = 0; i < persons.size() - 1; i++) {
- for (int j = i + 1; j < persons.size(); j++) {
- if (persons.get(i).isSamePerson(persons.get(j))) {
- return false;
- }
- }
- }
- return true;
- }
-}
diff --git a/src/main/java/seedu/address/model/person/exceptions/DuplicatePersonException.java b/src/main/java/seedu/address/model/person/exceptions/DuplicatePersonException.java
deleted file mode 100644
index d7290f59442..00000000000
--- a/src/main/java/seedu/address/model/person/exceptions/DuplicatePersonException.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package seedu.address.model.person.exceptions;
-
-/**
- * Signals that the operation will result in duplicate Persons (Persons are considered duplicates if they have the same
- * identity).
- */
-public class DuplicatePersonException extends RuntimeException {
- public DuplicatePersonException() {
- super("Operation would result in duplicate persons");
- }
-}
diff --git a/src/main/java/seedu/address/model/person/exceptions/PersonNotFoundException.java b/src/main/java/seedu/address/model/person/exceptions/PersonNotFoundException.java
deleted file mode 100644
index fa764426ca7..00000000000
--- a/src/main/java/seedu/address/model/person/exceptions/PersonNotFoundException.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package seedu.address.model.person.exceptions;
-
-/**
- * Signals that the operation is unable to find the specified person.
- */
-public class PersonNotFoundException extends RuntimeException {}
diff --git a/src/main/java/seedu/address/model/util/SampleDataUtil.java b/src/main/java/seedu/address/model/util/SampleDataUtil.java
deleted file mode 100644
index 1806da4facf..00000000000
--- a/src/main/java/seedu/address/model/util/SampleDataUtil.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package seedu.address.model.util;
-
-import java.util.Arrays;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-import seedu.address.model.AddressBook;
-import seedu.address.model.ReadOnlyAddressBook;
-import seedu.address.model.person.Address;
-import seedu.address.model.person.Email;
-import seedu.address.model.person.Name;
-import seedu.address.model.person.Person;
-import seedu.address.model.person.Phone;
-import seedu.address.model.tag.Tag;
-
-/**
- * Contains utility methods for populating {@code AddressBook} with sample data.
- */
-public class SampleDataUtil {
- public static Person[] getSamplePersons() {
- return new Person[] {
- new Person(new Name("Alex Yeoh"), new Phone("87438807"), new Email("alexyeoh@example.com"),
- new Address("Blk 30 Geylang Street 29, #06-40"),
- getTagSet("friends")),
- new Person(new Name("Bernice Yu"), new Phone("99272758"), new Email("berniceyu@example.com"),
- new Address("Blk 30 Lorong 3 Serangoon Gardens, #07-18"),
- getTagSet("colleagues", "friends")),
- new Person(new Name("Charlotte Oliveiro"), new Phone("93210283"), new Email("charlotte@example.com"),
- new Address("Blk 11 Ang Mo Kio Street 74, #11-04"),
- getTagSet("neighbours")),
- new Person(new Name("David Li"), new Phone("91031282"), new Email("lidavid@example.com"),
- new Address("Blk 436 Serangoon Gardens Street 26, #16-43"),
- getTagSet("family")),
- new Person(new Name("Irfan Ibrahim"), new Phone("92492021"), new Email("irfan@example.com"),
- new Address("Blk 47 Tampines Street 20, #17-35"),
- getTagSet("classmates")),
- new Person(new Name("Roy Balakrishnan"), new Phone("92624417"), new Email("royb@example.com"),
- new Address("Blk 45 Aljunied Street 85, #11-31"),
- getTagSet("colleagues"))
- };
- }
-
- public static ReadOnlyAddressBook getSampleAddressBook() {
- AddressBook sampleAb = new AddressBook();
- for (Person samplePerson : getSamplePersons()) {
- sampleAb.addPerson(samplePerson);
- }
- return sampleAb;
- }
-
- /**
- * Returns a tag set containing the list of strings given.
- */
- public static Set getTagSet(String... strings) {
- return Arrays.stream(strings)
- .map(Tag::new)
- .collect(Collectors.toSet());
- }
-
-}
diff --git a/src/main/java/seedu/address/storage/AddressBookStorage.java b/src/main/java/seedu/address/storage/AddressBookStorage.java
deleted file mode 100644
index 4599182b3f9..00000000000
--- a/src/main/java/seedu/address/storage/AddressBookStorage.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package seedu.address.storage;
-
-import java.io.IOException;
-import java.nio.file.Path;
-import java.util.Optional;
-
-import seedu.address.commons.exceptions.DataConversionException;
-import seedu.address.model.ReadOnlyAddressBook;
-
-/**
- * Represents a storage for {@link seedu.address.model.AddressBook}.
- */
-public interface AddressBookStorage {
-
- /**
- * Returns the file path of the data file.
- */
- Path getAddressBookFilePath();
-
- /**
- * Returns AddressBook data as a {@link ReadOnlyAddressBook}.
- * Returns {@code Optional.empty()} if storage file is not found.
- * @throws DataConversionException if the data in storage is not in the expected format.
- * @throws IOException if there was any problem when reading from the storage.
- */
- Optional readAddressBook() throws DataConversionException, IOException;
-
- /**
- * @see #getAddressBookFilePath()
- */
- Optional readAddressBook(Path filePath) throws DataConversionException, IOException;
-
- /**
- * Saves the given {@link ReadOnlyAddressBook} to the storage.
- * @param addressBook cannot be null.
- * @throws IOException if there was any problem writing to the file.
- */
- void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;
-
- /**
- * @see #saveAddressBook(ReadOnlyAddressBook)
- */
- void saveAddressBook(ReadOnlyAddressBook addressBook, Path filePath) throws IOException;
-
-}
diff --git a/src/main/java/seedu/address/storage/JsonAdaptedPerson.java b/src/main/java/seedu/address/storage/JsonAdaptedPerson.java
deleted file mode 100644
index a6321cec2ea..00000000000
--- a/src/main/java/seedu/address/storage/JsonAdaptedPerson.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package seedu.address.storage;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-import seedu.address.commons.exceptions.IllegalValueException;
-import seedu.address.model.person.Address;
-import seedu.address.model.person.Email;
-import seedu.address.model.person.Name;
-import seedu.address.model.person.Person;
-import seedu.address.model.person.Phone;
-import seedu.address.model.tag.Tag;
-
-/**
- * Jackson-friendly version of {@link Person}.
- */
-class JsonAdaptedPerson {
-
- public static final String MISSING_FIELD_MESSAGE_FORMAT = "Person's %s field is missing!";
-
- private final String name;
- private final String phone;
- private final String email;
- private final String address;
- private final List tagged = new ArrayList<>();
-
- /**
- * Constructs a {@code JsonAdaptedPerson} with the given person details.
- */
- @JsonCreator
- public JsonAdaptedPerson(@JsonProperty("name") String name, @JsonProperty("phone") String phone,
- @JsonProperty("email") String email, @JsonProperty("address") String address,
- @JsonProperty("tagged") List tagged) {
- this.name = name;
- this.phone = phone;
- this.email = email;
- this.address = address;
- if (tagged != null) {
- this.tagged.addAll(tagged);
- }
- }
-
- /**
- * Converts a given {@code Person} into this class for Jackson use.
- */
- public JsonAdaptedPerson(Person source) {
- name = source.getName().fullName;
- phone = source.getPhone().value;
- email = source.getEmail().value;
- address = source.getAddress().value;
- tagged.addAll(source.getTags().stream()
- .map(JsonAdaptedTag::new)
- .collect(Collectors.toList()));
- }
-
- /**
- * Converts this Jackson-friendly adapted person object into the model's {@code Person} object.
- *
- * @throws IllegalValueException if there were any data constraints violated in the adapted person.
- */
- public Person toModelType() throws IllegalValueException {
- final List personTags = new ArrayList<>();
- for (JsonAdaptedTag tag : tagged) {
- personTags.add(tag.toModelType());
- }
-
- if (name == null) {
- throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Name.class.getSimpleName()));
- }
- if (!Name.isValidName(name)) {
- throw new IllegalValueException(Name.MESSAGE_CONSTRAINTS);
- }
- final Name modelName = new Name(name);
-
- if (phone == null) {
- throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Phone.class.getSimpleName()));
- }
- if (!Phone.isValidPhone(phone)) {
- throw new IllegalValueException(Phone.MESSAGE_CONSTRAINTS);
- }
- final Phone modelPhone = new Phone(phone);
-
- if (email == null) {
- throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Email.class.getSimpleName()));
- }
- if (!Email.isValidEmail(email)) {
- throw new IllegalValueException(Email.MESSAGE_CONSTRAINTS);
- }
- final Email modelEmail = new Email(email);
-
- if (address == null) {
- throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Address.class.getSimpleName()));
- }
- if (!Address.isValidAddress(address)) {
- throw new IllegalValueException(Address.MESSAGE_CONSTRAINTS);
- }
- final Address modelAddress = new Address(address);
-
- final Set modelTags = new HashSet<>(personTags);
- return new Person(modelName, modelPhone, modelEmail, modelAddress, modelTags);
- }
-
-}
diff --git a/src/main/java/seedu/address/storage/JsonAddressBookStorage.java b/src/main/java/seedu/address/storage/JsonAddressBookStorage.java
deleted file mode 100644
index dfab9daaa0d..00000000000
--- a/src/main/java/seedu/address/storage/JsonAddressBookStorage.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package seedu.address.storage;
-
-import static java.util.Objects.requireNonNull;
-
-import java.io.IOException;
-import java.nio.file.Path;
-import java.util.Optional;
-import java.util.logging.Logger;
-
-import seedu.address.commons.core.LogsCenter;
-import seedu.address.commons.exceptions.DataConversionException;
-import seedu.address.commons.exceptions.IllegalValueException;
-import seedu.address.commons.util.FileUtil;
-import seedu.address.commons.util.JsonUtil;
-import seedu.address.model.ReadOnlyAddressBook;
-
-/**
- * A class to access AddressBook data stored as a json file on the hard disk.
- */
-public class JsonAddressBookStorage implements AddressBookStorage {
-
- private static final Logger logger = LogsCenter.getLogger(JsonAddressBookStorage.class);
-
- private Path filePath;
-
- public JsonAddressBookStorage(Path filePath) {
- this.filePath = filePath;
- }
-
- public Path getAddressBookFilePath() {
- return filePath;
- }
-
- @Override
- public Optional readAddressBook() throws DataConversionException {
- return readAddressBook(filePath);
- }
-
- /**
- * Similar to {@link #readAddressBook()}.
- *
- * @param filePath location of the data. Cannot be null.
- * @throws DataConversionException if the file is not in the correct format.
- */
- public Optional readAddressBook(Path filePath) throws DataConversionException {
- requireNonNull(filePath);
-
- Optional jsonAddressBook = JsonUtil.readJsonFile(
- filePath, JsonSerializableAddressBook.class);
- if (!jsonAddressBook.isPresent()) {
- return Optional.empty();
- }
-
- try {
- return Optional.of(jsonAddressBook.get().toModelType());
- } catch (IllegalValueException ive) {
- logger.info("Illegal values found in " + filePath + ": " + ive.getMessage());
- throw new DataConversionException(ive);
- }
- }
-
- @Override
- public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {
- saveAddressBook(addressBook, filePath);
- }
-
- /**
- * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}.
- *
- * @param filePath location of the data. Cannot be null.
- */
- public void saveAddressBook(ReadOnlyAddressBook addressBook, Path filePath) throws IOException {
- requireNonNull(addressBook);
- requireNonNull(filePath);
-
- FileUtil.createIfMissing(filePath);
- JsonUtil.saveJsonFile(new JsonSerializableAddressBook(addressBook), filePath);
- }
-
-}
diff --git a/src/main/java/seedu/address/storage/JsonSerializableAddressBook.java b/src/main/java/seedu/address/storage/JsonSerializableAddressBook.java
deleted file mode 100644
index 5efd834091d..00000000000
--- a/src/main/java/seedu/address/storage/JsonSerializableAddressBook.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package seedu.address.storage;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonRootName;
-
-import seedu.address.commons.exceptions.IllegalValueException;
-import seedu.address.model.AddressBook;
-import seedu.address.model.ReadOnlyAddressBook;
-import seedu.address.model.person.Person;
-
-/**
- * An Immutable AddressBook that is serializable to JSON format.
- */
-@JsonRootName(value = "addressbook")
-class JsonSerializableAddressBook {
-
- public static final String MESSAGE_DUPLICATE_PERSON = "Persons list contains duplicate person(s).";
-
- private final List persons = new ArrayList<>();
-
- /**
- * Constructs a {@code JsonSerializableAddressBook} with the given persons.
- */
- @JsonCreator
- public JsonSerializableAddressBook(@JsonProperty("persons") List persons) {
- this.persons.addAll(persons);
- }
-
- /**
- * Converts a given {@code ReadOnlyAddressBook} into this class for Jackson use.
- *
- * @param source future changes to this will not affect the created {@code JsonSerializableAddressBook}.
- */
- public JsonSerializableAddressBook(ReadOnlyAddressBook source) {
- persons.addAll(source.getPersonList().stream().map(JsonAdaptedPerson::new).collect(Collectors.toList()));
- }
-
- /**
- * Converts this address book into the model's {@code AddressBook} object.
- *
- * @throws IllegalValueException if there were any data constraints violated.
- */
- public AddressBook toModelType() throws IllegalValueException {
- AddressBook addressBook = new AddressBook();
- for (JsonAdaptedPerson jsonAdaptedPerson : persons) {
- Person person = jsonAdaptedPerson.toModelType();
- if (addressBook.hasPerson(person)) {
- throw new IllegalValueException(MESSAGE_DUPLICATE_PERSON);
- }
- addressBook.addPerson(person);
- }
- return addressBook;
- }
-
-}
diff --git a/src/main/java/seedu/address/storage/Storage.java b/src/main/java/seedu/address/storage/Storage.java
deleted file mode 100644
index beda8bd9f11..00000000000
--- a/src/main/java/seedu/address/storage/Storage.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package seedu.address.storage;
-
-import java.io.IOException;
-import java.nio.file.Path;
-import java.util.Optional;
-
-import seedu.address.commons.exceptions.DataConversionException;
-import seedu.address.model.ReadOnlyAddressBook;
-import seedu.address.model.ReadOnlyUserPrefs;
-import seedu.address.model.UserPrefs;
-
-/**
- * API of the Storage component
- */
-public interface Storage extends AddressBookStorage, UserPrefsStorage {
-
- @Override
- Optional readUserPrefs() throws DataConversionException, IOException;
-
- @Override
- void saveUserPrefs(ReadOnlyUserPrefs userPrefs) throws IOException;
-
- @Override
- Path getAddressBookFilePath();
-
- @Override
- Optional readAddressBook() throws DataConversionException, IOException;
-
- @Override
- void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;
-
-}
diff --git a/src/main/java/seedu/address/storage/StorageManager.java b/src/main/java/seedu/address/storage/StorageManager.java
deleted file mode 100644
index 6cfa0162164..00000000000
--- a/src/main/java/seedu/address/storage/StorageManager.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package seedu.address.storage;
-
-import java.io.IOException;
-import java.nio.file.Path;
-import java.util.Optional;
-import java.util.logging.Logger;
-
-import seedu.address.commons.core.LogsCenter;
-import seedu.address.commons.exceptions.DataConversionException;
-import seedu.address.model.ReadOnlyAddressBook;
-import seedu.address.model.ReadOnlyUserPrefs;
-import seedu.address.model.UserPrefs;
-
-/**
- * Manages storage of AddressBook data in local storage.
- */
-public class StorageManager implements Storage {
-
- private static final Logger logger = LogsCenter.getLogger(StorageManager.class);
- private AddressBookStorage addressBookStorage;
- private UserPrefsStorage userPrefsStorage;
-
- /**
- * Creates a {@code StorageManager} with the given {@code AddressBookStorage} and {@code UserPrefStorage}.
- */
- public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {
- this.addressBookStorage = addressBookStorage;
- this.userPrefsStorage = userPrefsStorage;
- }
-
- // ================ UserPrefs methods ==============================
-
- @Override
- public Path getUserPrefsFilePath() {
- return userPrefsStorage.getUserPrefsFilePath();
- }
-
- @Override
- public Optional readUserPrefs() throws DataConversionException, IOException {
- return userPrefsStorage.readUserPrefs();
- }
-
- @Override
- public void saveUserPrefs(ReadOnlyUserPrefs userPrefs) throws IOException {
- userPrefsStorage.saveUserPrefs(userPrefs);
- }
-
-
- // ================ AddressBook methods ==============================
-
- @Override
- public Path getAddressBookFilePath() {
- return addressBookStorage.getAddressBookFilePath();
- }
-
- @Override
- public Optional readAddressBook() throws DataConversionException, IOException {
- return readAddressBook(addressBookStorage.getAddressBookFilePath());
- }
-
- @Override
- public Optional readAddressBook(Path filePath) throws DataConversionException, IOException {
- logger.fine("Attempting to read data from file: " + filePath);
- return addressBookStorage.readAddressBook(filePath);
- }
-
- @Override
- public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {
- saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());
- }
-
- @Override
- public void saveAddressBook(ReadOnlyAddressBook addressBook, Path filePath) throws IOException {
- logger.fine("Attempting to write to data file: " + filePath);
- addressBookStorage.saveAddressBook(addressBook, filePath);
- }
-
-}
diff --git a/src/main/java/seedu/address/ui/PersonListPanel.java b/src/main/java/seedu/address/ui/PersonListPanel.java
deleted file mode 100644
index f4c501a897b..00000000000
--- a/src/main/java/seedu/address/ui/PersonListPanel.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package seedu.address.ui;
-
-import java.util.logging.Logger;
-
-import javafx.collections.ObservableList;
-import javafx.fxml.FXML;
-import javafx.scene.control.ListCell;
-import javafx.scene.control.ListView;
-import javafx.scene.layout.Region;
-import seedu.address.commons.core.LogsCenter;
-import seedu.address.model.person.Person;
-
-/**
- * Panel containing the list of persons.
- */
-public class PersonListPanel extends UiPart {
- private static final String FXML = "PersonListPanel.fxml";
- private final Logger logger = LogsCenter.getLogger(PersonListPanel.class);
-
- @FXML
- private ListView personListView;
-
- /**
- * Creates a {@code PersonListPanel} with the given {@code ObservableList}.
- */
- public PersonListPanel(ObservableList personList) {
- super(FXML);
- personListView.setItems(personList);
- personListView.setCellFactory(listView -> new PersonListViewCell());
- }
-
- /**
- * Custom {@code ListCell} that displays the graphics of a {@code Person} using a {@code PersonCard}.
- */
- class PersonListViewCell extends ListCell {
- @Override
- protected void updateItem(Person person, boolean empty) {
- super.updateItem(person, empty);
-
- if (empty || person == null) {
- setGraphic(null);
- setText(null);
- } else {
- setGraphic(new PersonCard(person, getIndex() + 1).getRoot());
- }
- }
- }
-
-}
diff --git a/src/main/java/seedu/address/AppParameters.java b/src/main/java/trackr/AppParameters.java
similarity index 93%
rename from src/main/java/seedu/address/AppParameters.java
rename to src/main/java/trackr/AppParameters.java
index ab552c398f3..75540cee1ec 100644
--- a/src/main/java/seedu/address/AppParameters.java
+++ b/src/main/java/trackr/AppParameters.java
@@ -1,4 +1,4 @@
-package seedu.address;
+package trackr;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -7,8 +7,8 @@
import java.util.logging.Logger;
import javafx.application.Application;
-import seedu.address.commons.core.LogsCenter;
-import seedu.address.commons.util.FileUtil;
+import trackr.commons.core.LogsCenter;
+import trackr.commons.util.FileUtil;
/**
* Represents the parsed command-line parameters given to the application.
diff --git a/src/main/java/seedu/address/Main.java b/src/main/java/trackr/Main.java
similarity index 97%
rename from src/main/java/seedu/address/Main.java
rename to src/main/java/trackr/Main.java
index 052a5068631..70382adb42c 100644
--- a/src/main/java/seedu/address/Main.java
+++ b/src/main/java/trackr/Main.java
@@ -1,4 +1,4 @@
-package seedu.address;
+package trackr;
import javafx.application.Application;
diff --git a/src/main/java/trackr/MainApp.java b/src/main/java/trackr/MainApp.java
new file mode 100644
index 00000000000..803c3713944
--- /dev/null
+++ b/src/main/java/trackr/MainApp.java
@@ -0,0 +1,245 @@
+package trackr;
+
+import java.io.IOException;
+import java.nio.file.Path;
+import java.util.Optional;
+import java.util.logging.Logger;
+
+import javafx.application.Application;
+import javafx.stage.Stage;
+import trackr.commons.core.Config;
+import trackr.commons.core.LogsCenter;
+import trackr.commons.core.Version;
+import trackr.commons.exceptions.DataConversionException;
+import trackr.commons.util.ConfigUtil;
+import trackr.commons.util.StringUtil;
+import trackr.logic.Logic;
+import trackr.logic.LogicManager;
+import trackr.model.Menu;
+import trackr.model.Model;
+import trackr.model.ModelManager;
+import trackr.model.OrderList;
+import trackr.model.ReadOnlyMenu;
+import trackr.model.ReadOnlyOrderList;
+import trackr.model.ReadOnlySupplierList;
+import trackr.model.ReadOnlyTaskList;
+import trackr.model.ReadOnlyUserPrefs;
+import trackr.model.SupplierList;
+import trackr.model.TaskList;
+import trackr.model.UserPrefs;
+import trackr.model.util.SampleDataUtil;
+import trackr.storage.JsonTrackrStorage;
+import trackr.storage.JsonUserPrefsStorage;
+import trackr.storage.Storage;
+import trackr.storage.StorageManager;
+import trackr.storage.TrackrStorage;
+import trackr.storage.UserPrefsStorage;
+import trackr.ui.Ui;
+import trackr.ui.UiManager;
+
+/**
+ * Runs the application.
+ */
+public class MainApp extends Application {
+
+ public static final Version VERSION = new Version(0, 2, 0, true);
+
+ private static final Logger logger = LogsCenter.getLogger(MainApp.class);
+
+ protected Ui ui;
+ protected Logic logic;
+ protected Storage storage;
+ protected Model model;
+ protected Config config;
+
+ @Override
+ public void init() throws Exception {
+ logger.info("=============================[ Initializing Trackr ]===========================");
+ super.init();
+
+ AppParameters appParameters = AppParameters.parse(getParameters());
+ config = initConfig(appParameters.getConfigPath());
+
+ UserPrefsStorage userPrefsStorage = new JsonUserPrefsStorage(config.getUserPrefsFilePath());
+ UserPrefs userPrefs = initPrefs(userPrefsStorage);
+ TrackrStorage trackrStorage = new JsonTrackrStorage(userPrefs.getTrackrFilePath());
+ storage = new StorageManager(trackrStorage, userPrefsStorage);
+
+ initLogging(config);
+
+ model = initModelManager(storage, userPrefs);
+
+ logic = new LogicManager(model, storage);
+
+ ui = new UiManager(logic);
+ }
+
+ /**
+ * Returns a {@code ModelManager} with the data from {@code storage}'s supplier list,
+ * task list and {@code userPrefs}.
+ * The data from the sample supplier list and task list will be used instead if {@code storage}'s supplier list
+ * and task list is not found,
+ * or an empty supplier list and task list will be used instead if errors occur when reading {@code storage}'s
+ * supplier list and task list.
+ */
+ private Model initModelManager(Storage storage, ReadOnlyUserPrefs userPrefs) {
+ Optional supplierListOptional;
+ Optional taskListOptional;
+ Optional menuOptional;
+ Optional orderListOptional;
+ ReadOnlySupplierList initialSupplierList;
+ ReadOnlyTaskList initialTaskList;
+ ReadOnlyMenu initialMenu;
+ ReadOnlyOrderList initialOrderList;
+
+ try {
+ supplierListOptional = storage.readSupplierList();
+ if (!supplierListOptional.isPresent()) {
+ logger.info("Data file not found. Will be starting with a sample SupplierList");
+ }
+ initialSupplierList = supplierListOptional.orElseGet(SampleDataUtil::getSampleSupplierList);
+ } catch (DataConversionException e) {
+ logger.warning("Data file not in the correct format. Will be starting with an empty SupplierList");
+ initialSupplierList = new SupplierList();
+ } catch (IOException e) {
+ logger.warning("Problem while reading from the file. Will be starting with an empty SupplierList");
+ initialSupplierList = new SupplierList();
+ }
+
+ //@@author liumc-sg-reused
+ try {
+ taskListOptional = storage.readTaskList();
+ if (!taskListOptional.isPresent()) {
+ logger.info("Data file not found. Will be starting with a sample TaskList");
+ }
+ initialTaskList = taskListOptional.orElseGet(SampleDataUtil::getSampleTaskList);
+ } catch (DataConversionException e) {
+ logger.warning("Data file not in the correct format. Will be starting with an empty TaskList");
+ initialTaskList = new TaskList();
+ } catch (IOException e) {
+ logger.warning("Problem while reading from the file. Will be starting with an empty TaskList");
+ initialTaskList = new TaskList();
+ }
+ //@@author
+
+ try {
+ menuOptional = storage.readMenu();
+ if (!menuOptional.isPresent()) {
+ logger.info("Data file not found. Will be starting with a sample Menu");
+ }
+ initialMenu = menuOptional.orElseGet(SampleDataUtil::getSampleMenu);
+ } catch (DataConversionException e) {
+ logger.warning("Data file not in the correct format. Will be starting with an empty Menu");
+ initialMenu = new Menu();
+ } catch (IOException e) {
+ logger.warning("Problem while reading from the file. Will be starting with an empty Menu");
+ initialMenu = new Menu();
+ }
+
+ //@@author chongweiguan-reused
+ try {
+ orderListOptional = storage.readOrderList();
+ if (!orderListOptional.isPresent()) {
+ logger.info("Data file not found. Will be starting with a sample OrderList");
+ }
+ initialOrderList = orderListOptional.orElseGet(SampleDataUtil::getSampleOrderList);
+ } catch (DataConversionException e) {
+ logger.warning("Data file not in the correct format. Will be starting with an empty OrderList");
+ initialOrderList = new OrderList();
+ } catch (IOException e) {
+ logger.warning("Problem while reading from the file. Will be starting with an empty OrderList");
+ initialOrderList = new OrderList();
+ }
+ //@@author
+
+ return new ModelManager(initialSupplierList, initialTaskList, initialMenu, initialOrderList, userPrefs);
+ }
+
+ private void initLogging(Config config) {
+ LogsCenter.init(config);
+ }
+
+ /**
+ * Returns a {@code Config} using the file at {@code configFilePath}.
+ * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead
+ * if {@code configFilePath} is null.
+ */
+ protected Config initConfig(Path configFilePath) {
+ Config initializedConfig;
+ Path configFilePathUsed;
+
+ configFilePathUsed = Config.DEFAULT_CONFIG_FILE;
+
+ if (configFilePath != null) {
+ logger.info("Custom Config file specified " + configFilePath);
+ configFilePathUsed = configFilePath;
+ }
+
+ logger.info("Using config file : " + configFilePathUsed);
+
+ try {
+ Optional configOptional = ConfigUtil.readConfig(configFilePathUsed);
+ initializedConfig = configOptional.orElse(new Config());
+ } catch (DataConversionException e) {
+ logger.warning("Config file at " + configFilePathUsed + " is not in the correct format. "
+ + "Using default config properties");
+ initializedConfig = new Config();
+ }
+
+ //Update config file in case it was missing to begin with or there are new/unused fields
+ try {
+ ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);
+ } catch (IOException e) {
+ logger.warning("Failed to save config file : " + StringUtil.getDetails(e));
+ }
+ return initializedConfig;
+ }
+
+ /**
+ * Returns a {@code UserPrefs} using the file at {@code storage}'s user prefs file path,
+ * or a new {@code UserPrefs} with default configuration if errors occur when
+ * reading from the file.
+ */
+ protected UserPrefs initPrefs(UserPrefsStorage storage) {
+ Path prefsFilePath = storage.getUserPrefsFilePath();
+ logger.info("Using prefs file : " + prefsFilePath);
+
+ UserPrefs initializedPrefs;
+ try {
+ Optional prefsOptional = storage.readUserPrefs();
+ initializedPrefs = prefsOptional.orElse(new UserPrefs());
+ } catch (DataConversionException e) {
+ logger.warning("UserPrefs file at " + prefsFilePath + " is not in the correct format. "
+ + "Using default user prefs");
+ initializedPrefs = new UserPrefs();
+ } catch (IOException e) {
+ logger.warning("Problem while reading from the file. Will be starting with an empty Trackr");
+ initializedPrefs = new UserPrefs();
+ }
+
+ //Update prefs file in case it was missing to begin with or there are new/unused fields
+ try {
+ storage.saveUserPrefs(initializedPrefs);
+ } catch (IOException e) {
+ logger.warning("Failed to save config file : " + StringUtil.getDetails(e));
+ }
+
+ return initializedPrefs;
+ }
+
+ @Override
+ public void start(Stage primaryStage) {
+ logger.info("Starting Trackr " + MainApp.VERSION);
+ ui.start(primaryStage);
+ }
+
+ @Override
+ public void stop() {
+ logger.info("============================ [ Stopping Trackr ] =============================");
+ try {
+ storage.saveUserPrefs(model.getUserPrefs());
+ } catch (IOException e) {
+ logger.severe("Failed to save preferences " + StringUtil.getDetails(e));
+ }
+ }
+}
diff --git a/src/main/java/seedu/address/commons/core/Config.java b/src/main/java/trackr/commons/core/Config.java
similarity index 97%
rename from src/main/java/seedu/address/commons/core/Config.java
rename to src/main/java/trackr/commons/core/Config.java
index 91145745521..97ecf8b670c 100644
--- a/src/main/java/seedu/address/commons/core/Config.java
+++ b/src/main/java/trackr/commons/core/Config.java
@@ -1,4 +1,4 @@
-package seedu.address.commons.core;
+package trackr.commons.core;
import java.nio.file.Path;
import java.nio.file.Paths;
diff --git a/src/main/java/seedu/address/commons/core/GuiSettings.java b/src/main/java/trackr/commons/core/GuiSettings.java
similarity index 96%
rename from src/main/java/seedu/address/commons/core/GuiSettings.java
rename to src/main/java/trackr/commons/core/GuiSettings.java
index ba33653be67..1b1c31ce11d 100644
--- a/src/main/java/seedu/address/commons/core/GuiSettings.java
+++ b/src/main/java/trackr/commons/core/GuiSettings.java
@@ -1,4 +1,4 @@
-package seedu.address.commons.core;
+package trackr.commons.core;
import java.awt.Point;
import java.io.Serializable;
@@ -11,7 +11,7 @@
public class GuiSettings implements Serializable {
private static final double DEFAULT_HEIGHT = 600;
- private static final double DEFAULT_WIDTH = 740;
+ private static final double DEFAULT_WIDTH = 700;
private final double windowWidth;
private final double windowHeight;
diff --git a/src/main/java/seedu/address/commons/core/LogsCenter.java b/src/main/java/trackr/commons/core/LogsCenter.java
similarity index 97%
rename from src/main/java/seedu/address/commons/core/LogsCenter.java
rename to src/main/java/trackr/commons/core/LogsCenter.java
index 431e7185e76..c3045487e72 100644
--- a/src/main/java/seedu/address/commons/core/LogsCenter.java
+++ b/src/main/java/trackr/commons/core/LogsCenter.java
@@ -1,4 +1,4 @@
-package seedu.address.commons.core;
+package trackr.commons.core;
import java.io.IOException;
import java.util.Arrays;
@@ -18,7 +18,7 @@
public class LogsCenter {
private static final int MAX_FILE_COUNT = 5;
private static final int MAX_FILE_SIZE_IN_BYTES = (int) (Math.pow(2, 20) * 5); // 5MB
- private static final String LOG_FILE = "addressbook.log";
+ private static final String LOG_FILE = "trackr.log";
private static Level currentLogLevel = Level.INFO;
private static final Logger logger = LogsCenter.getLogger(LogsCenter.class);
private static FileHandler fileHandler;
diff --git a/src/main/java/trackr/commons/core/Messages.java b/src/main/java/trackr/commons/core/Messages.java
new file mode 100644
index 00000000000..207feb4f595
--- /dev/null
+++ b/src/main/java/trackr/commons/core/Messages.java
@@ -0,0 +1,21 @@
+package trackr.commons.core;
+
+/**
+ * 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_ITEM_DISPLAYED_INDEX = "The %s index provided is invalid";
+ public static final String MESSAGE_ITEMS_LISTED_OVERVIEW = "%d %ss listed!";
+ public static final String MESSAGE_INVALID_SUPPLIER_DISPLAYED_INDEX = "The supplier index provided is invalid";
+ public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX = "The task index provided is invalid";
+ public static final String MESSAGE_TASKS_LISTED_OVERVIEW = "%1$d tasks listed!";
+ public static final String MESSAGE_INVALID_ORDER_DISPLAYED_INDEX = "The order index provided is invalid";
+ public static final String MESSAGE_ORDERS_LISTED_OVERVIEW = "%1$d orders listed!";
+ public static final String MESSAGE_INVALID_CSV_FILE = "Invalid csv file";
+ public static final String MESSAGE_NO_MENU_ITEM = "No such item in your menu.";
+ public static final String MESSAGE_DUPLICATE_ITEM = "This %s already exists in the %s list";
+ public static final String MESSAGE_SUCCESS = "New %s added: %s";
+}
diff --git a/src/main/java/seedu/address/commons/core/Version.java b/src/main/java/trackr/commons/core/Version.java
similarity index 98%
rename from src/main/java/seedu/address/commons/core/Version.java
rename to src/main/java/trackr/commons/core/Version.java
index 12142ec1e32..9f39777e1f6 100644
--- a/src/main/java/seedu/address/commons/core/Version.java
+++ b/src/main/java/trackr/commons/core/Version.java
@@ -1,4 +1,4 @@
-package seedu.address.commons.core;
+package trackr.commons.core;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
diff --git a/src/main/java/seedu/address/commons/core/index/Index.java b/src/main/java/trackr/commons/core/index/Index.java
similarity index 97%
rename from src/main/java/seedu/address/commons/core/index/Index.java
rename to src/main/java/trackr/commons/core/index/Index.java
index 19536439c09..db33aa031a9 100644
--- a/src/main/java/seedu/address/commons/core/index/Index.java
+++ b/src/main/java/trackr/commons/core/index/Index.java
@@ -1,4 +1,4 @@
-package seedu.address.commons.core.index;
+package trackr.commons.core.index;
/**
* Represents a zero-based or one-based index.
diff --git a/src/main/java/seedu/address/commons/exceptions/DataConversionException.java b/src/main/java/trackr/commons/exceptions/DataConversionException.java
similarity index 84%
rename from src/main/java/seedu/address/commons/exceptions/DataConversionException.java
rename to src/main/java/trackr/commons/exceptions/DataConversionException.java
index 1f689bd8e3f..4a0a7fbca60 100644
--- a/src/main/java/seedu/address/commons/exceptions/DataConversionException.java
+++ b/src/main/java/trackr/commons/exceptions/DataConversionException.java
@@ -1,4 +1,4 @@
-package seedu.address.commons.exceptions;
+package trackr.commons.exceptions;
/**
* Represents an error during conversion of data from one format to another
diff --git a/src/main/java/seedu/address/commons/exceptions/IllegalValueException.java b/src/main/java/trackr/commons/exceptions/IllegalValueException.java
similarity index 93%
rename from src/main/java/seedu/address/commons/exceptions/IllegalValueException.java
rename to src/main/java/trackr/commons/exceptions/IllegalValueException.java
index 19124db485c..a85c6e971de 100644
--- a/src/main/java/seedu/address/commons/exceptions/IllegalValueException.java
+++ b/src/main/java/trackr/commons/exceptions/IllegalValueException.java
@@ -1,4 +1,4 @@
-package seedu.address.commons.exceptions;
+package trackr.commons.exceptions;
/**
* Signals that some given data does not fulfill some constraints.
diff --git a/src/main/java/seedu/address/commons/util/AppUtil.java b/src/main/java/trackr/commons/util/AppUtil.java
similarity index 94%
rename from src/main/java/seedu/address/commons/util/AppUtil.java
rename to src/main/java/trackr/commons/util/AppUtil.java
index 87aa89c0326..aa9c4f4d278 100644
--- a/src/main/java/seedu/address/commons/util/AppUtil.java
+++ b/src/main/java/trackr/commons/util/AppUtil.java
@@ -1,9 +1,9 @@
-package seedu.address.commons.util;
+package trackr.commons.util;
import static java.util.Objects.requireNonNull;
import javafx.scene.image.Image;
-import seedu.address.MainApp;
+import trackr.MainApp;
/**
* A container for App specific utility functions
diff --git a/src/main/java/seedu/address/commons/util/CollectionUtil.java b/src/main/java/trackr/commons/util/CollectionUtil.java
similarity index 96%
rename from src/main/java/seedu/address/commons/util/CollectionUtil.java
rename to src/main/java/trackr/commons/util/CollectionUtil.java
index eafe4dfd681..5b9b030cb1d 100644
--- a/src/main/java/seedu/address/commons/util/CollectionUtil.java
+++ b/src/main/java/trackr/commons/util/CollectionUtil.java
@@ -1,4 +1,4 @@
-package seedu.address.commons.util;
+package trackr.commons.util;
import static java.util.Objects.requireNonNull;
diff --git a/src/main/java/seedu/address/commons/util/ConfigUtil.java b/src/main/java/trackr/commons/util/ConfigUtil.java
similarity index 77%
rename from src/main/java/seedu/address/commons/util/ConfigUtil.java
rename to src/main/java/trackr/commons/util/ConfigUtil.java
index f7f8a2bd44c..d22b5d57035 100644
--- a/src/main/java/seedu/address/commons/util/ConfigUtil.java
+++ b/src/main/java/trackr/commons/util/ConfigUtil.java
@@ -1,11 +1,11 @@
-package seedu.address.commons.util;
+package trackr.commons.util;
import java.io.IOException;
import java.nio.file.Path;
import java.util.Optional;
-import seedu.address.commons.core.Config;
-import seedu.address.commons.exceptions.DataConversionException;
+import trackr.commons.core.Config;
+import trackr.commons.exceptions.DataConversionException;
/**
* A class for accessing the Config File.
diff --git a/src/main/java/seedu/address/commons/util/FileUtil.java b/src/main/java/trackr/commons/util/FileUtil.java
similarity index 98%
rename from src/main/java/seedu/address/commons/util/FileUtil.java
rename to src/main/java/trackr/commons/util/FileUtil.java
index b1e2767cdd9..cd173d050d2 100644
--- a/src/main/java/seedu/address/commons/util/FileUtil.java
+++ b/src/main/java/trackr/commons/util/FileUtil.java
@@ -1,4 +1,4 @@
-package seedu.address.commons.util;
+package trackr.commons.util;
import java.io.IOException;
import java.nio.file.Files;
diff --git a/src/main/java/seedu/address/commons/util/JsonUtil.java b/src/main/java/trackr/commons/util/JsonUtil.java
similarity index 97%
rename from src/main/java/seedu/address/commons/util/JsonUtil.java
rename to src/main/java/trackr/commons/util/JsonUtil.java
index 8ef609f055d..6b2e758a45e 100644
--- a/src/main/java/seedu/address/commons/util/JsonUtil.java
+++ b/src/main/java/trackr/commons/util/JsonUtil.java
@@ -1,4 +1,4 @@
-package seedu.address.commons.util;
+package trackr.commons.util;
import static java.util.Objects.requireNonNull;
@@ -20,8 +20,8 @@
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import seedu.address.commons.core.LogsCenter;
-import seedu.address.commons.exceptions.DataConversionException;
+import trackr.commons.core.LogsCenter;
+import trackr.commons.exceptions.DataConversionException;
/**
* Converts a Java object instance to JSON and vice versa
diff --git a/src/main/java/seedu/address/commons/util/StringUtil.java b/src/main/java/trackr/commons/util/StringUtil.java
similarity index 95%
rename from src/main/java/seedu/address/commons/util/StringUtil.java
rename to src/main/java/trackr/commons/util/StringUtil.java
index 61cc8c9a1cb..ec7d81d68bf 100644
--- a/src/main/java/seedu/address/commons/util/StringUtil.java
+++ b/src/main/java/trackr/commons/util/StringUtil.java
@@ -1,7 +1,7 @@
-package seedu.address.commons.util;
+package trackr.commons.util;
import static java.util.Objects.requireNonNull;
-import static seedu.address.commons.util.AppUtil.checkArgument;
+import static trackr.commons.util.AppUtil.checkArgument;
import java.io.PrintWriter;
import java.io.StringWriter;
diff --git a/src/main/java/trackr/logic/Logic.java b/src/main/java/trackr/logic/Logic.java
new file mode 100644
index 00000000000..05266d7f08e
--- /dev/null
+++ b/src/main/java/trackr/logic/Logic.java
@@ -0,0 +1,114 @@
+package trackr.logic;
+
+import java.nio.file.Path;
+
+import javafx.collections.ObservableList;
+import trackr.commons.core.GuiSettings;
+import trackr.logic.commands.CommandResult;
+import trackr.logic.commands.exceptions.CommandException;
+import trackr.logic.parser.exceptions.ParseException;
+import trackr.model.ReadOnlyMenu;
+import trackr.model.ReadOnlyOrderList;
+import trackr.model.ReadOnlySupplierList;
+import trackr.model.ReadOnlyTaskList;
+import trackr.model.menu.ItemProfit;
+import trackr.model.menu.ItemSellingPrice;
+import trackr.model.menu.MenuItem;
+import trackr.model.order.Order;
+import trackr.model.person.Supplier;
+import trackr.model.task.Task;
+
+/**
+ * API of the Logic component.
+ */
+public interface Logic {
+ /**
+ * Executes the command and returns the result.
+ *
+ * @param commandText The command as entered by the user.
+ * @return the result of the command execution.
+ * @throws CommandException If an error occurs during command execution.
+ * @throws ParseException If an error occurs during parsing.
+ */
+ CommandResult execute(String commandText) throws CommandException, ParseException;
+
+ /**
+ * Returns the SupplierList.
+ *
+ * @see trackr.model.Model#getSupplierList()
+ */
+ ReadOnlySupplierList getSupplierList();
+
+ /**
+ * Returns an unmodifiable view of the filtered list of suppliers.
+ */
+ ObservableList getFilteredSupplierList();
+
+ //@@author chongweiguan-reused
+ /**
+ * Returns the OrderList
+ *
+ * @see trackr.model.Model#getOrderList()
+ */
+ ReadOnlyOrderList getOrderList();
+
+ /**
+ * Returns an unmodifiable view of the filtered list of orders.
+ */
+ ObservableList getFilteredOrderList();
+ //@@author
+
+ /**
+ * Returns cumulative profits.
+ */
+ ItemProfit getTotalProfits();
+
+ /**
+ * Returns cumulative sales/ revenue.
+ */
+ ItemSellingPrice getTotalSales();
+
+ //@@author liumc-sg-reused
+ /**
+ * Returns the TaskList.
+ *
+ * @see trackr.model.Model#getTaskList()
+ */
+ ReadOnlyTaskList getTaskList();
+ //@@author
+
+ /**
+ * Returns an unmodifiable view of the filtered list of tasks.
+ */
+ //@@author liumc-sg-reused
+ ObservableList getFilteredTaskList();
+ //@@author
+
+ /**
+ * Returns the Menu.
+ *
+ * @see trackr.model.Model#getMenu()
+ */
+ ReadOnlyMenu getMenu();
+
+ /**
+ * Returns an unmodifiable view of the filtered list of menu items.
+ */
+ ObservableList