Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update UG DG #277

Merged
merged 4 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 26 additions & 13 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* [**Setting up, getting started**](#setting-up-getting-started)
* [**Design**](#design)
* [Architecture](#architecture)
* [How the Architecture Components Interact with Each Other](#how-the-architecture-components-interact-with-each-other)
* [Ui Component](#ui-component)
* [Parser Component](#parser-component)
* [Storage Component](#storage-component)
* [Data Component](#data-component)
* [**Feature**](#feature)
* [Add Dish](#add-dish)
* [Adding a Dish](#adding-a-dish)
* [List Menu](#list-menu)
* [Add Order](#add-order)
* [Next Day](#next-day)
Expand All @@ -25,9 +25,7 @@
* [Target user profile](#target-user-profile)
* [Value proposition](#value-proposition)
* [User stories](#user-stories)
<!-- TOC -->

--------------------------------------------------------------------------------------------------------------------
<!-- TOC -->--------------------------------------------------------------------------------------------------------------
## **Acknowledgements**

[addressbook-level2](https://github.com/se-edu/addressbook-level2) <br>
Expand All @@ -38,7 +36,12 @@

Refer to the guide [_UserGuide_](UserGuide.md).

--------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------
## **General notes**

Only relevant attributes/associations/methods will be included in the UML diagram.

--------------------------------------------------------------------------------------------------------------------
## **Design**

### Architecture
Expand All @@ -63,14 +66,14 @@ The bulk of the app’s work is done by the following components:
- `Parser` : Makes sense of user input to return the appropriate command
- `Command` : Executes the command requested by the user.

**How the architecture components interact with each other:**
### 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`.

![Architecture Encode Data](images/sequence/Architecture_Encode_Data.png)
*Figure 2: Architecture Encode Sequence Diagram*

### Ui Component
### Ui component
API: [Ui.java]({repoURL}src/main/java/seedu/cafectrl/ui/Ui.java)

![Ui Class Diagram](images/class/Ui.png)
Expand All @@ -83,7 +86,7 @@ In the Ui component,
- `Messages.java` consists of multiple strings that contains greeting, command, and goodbye messages to be shown to user
- `ErrorMessages.java` consists of multiple strings that contain error messages to be shown to user when an incorrect command or exception has been returned

### Parser Component
### Parser component
API: [Parser.java]({repoURL}src/main/java/seedu/cafectrl/parser/Parser.java)

![Parser Class Diagram](images/class/Parser.png)
Expand All @@ -102,7 +105,7 @@ Below is the sequence diagram of a parser which shows how `Parser` parses user i

When user input a string to `Main`, it passes the full user input to `Parser` via `parseCommand`. In `parseCommand`, it finds the matching keyword for different command from the user input, it calls the respective `prepareCommand` method within itself. `prepareCommand` then generates the corresponding command class and return it to `parseCommand`, which returns the `Command` back to `Main` for execution.

### Storage Component
### Storage component
API: [Storage.java]({repoURL}src/main/java/seedu/cafectrl/storage/Storage.java)

![Storage Class Diagram](images/class/Storage.png)
Expand All @@ -114,7 +117,7 @@ The `Storage` class,
- depends on `Menu`, `Pantry` and `Sales` objects (which are found in the data package).
- is composed of `FileManager` object as the text file needs to be located first before reading or writing.

### Data Component
### Data component
Folder: [Data]({repoURL}src/main/java/seedu/cafectrl/data)
![Data Class Diagram](images/class/Data.png)
*Figure 7: Data Package Class Diagram*
Expand Down Expand Up @@ -145,8 +148,6 @@ when the `execute()` method from `AddDishCommand` is called in the main class `C

Separation of Concerns was applied to ensure the `Ui` is only responsible with only displaying messages while the `Menu` deals with the logic of adding dish to the menu. This implementation also encapsulates the details of adding a dish and displaying messages. For example, The `AddDishCommand` class doesn't need to know how the internal details of the dish adding and message printing are performed.

### Adding a Dish

### List Menu
A `list_menu` command can be used to display all the `Dish` objects stored in `Menu`.

Expand All @@ -170,7 +171,7 @@ The data are then packaged nicely in a `leftAlignFormat`, with (indexNum + ". "
e.g. (1. Chicken Rice $2.50) is shown.

### Add Order
A add_order command can be used to add `order` to an `orderList` in `Sales`.
An add_order command can be used to add `order` to an `orderList` in `Sales`.

The following class diagram illustrates the relationship between the respective classes involved in the creation and execution of an add_order command.
![Add_Order Execution](images/class/AddOrderCommandClass.png)
Expand Down Expand Up @@ -302,6 +303,13 @@ Café proprietors who ***love*** typing on CLI and are seeking for a software so

Our product aims to optimize managing of inventory and cash flow in a restaurant. Our CLI platform empowers users to streamline stock inventory, menu and orders. Users will also briefly be able to gain valuable insights through comprehensive sales reporting, enabling them to analyze sales trends and calculate revenue/profit margins, eliminating the need for cross-platform management.

--------------------------------------------------------------------------------------------------------------------
## **Requirements**
### Non-functional requirements

1. This application requires the use of Java 11.
2. This application should work on most mainstream OS.

### User stories

| Priority | As a …​ | I want to …​ | So that I can…​ |
Expand All @@ -319,3 +327,8 @@ Our product aims to optimize managing of inventory and cash flow in a restaurant
| `* *` | clumsy cafe owner who works 7 days a week | go back to the previous day | still accept order from the previous day if I accidentally fast forward to the next day |

*{More to be added}*

--------------------------------------------------------------------------------------------------------------------
## **Glossary**

- **Mainstream OS**: Windows, Linux, Unix, OS-X
15 changes: 11 additions & 4 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@
* [Exiting the program : `bye`](#exiting-the-program--bye)
* [Known Issues](#known-issues)
* [Command Summary](#command-summary)
* [Glossary](#glossary)
<!-- TOC -->

---------------------------------------------------
## Introduction

CafeCTRL aims to optimize managing of inventory and cash flow in a restaurant. Our CLI platform empowers Café proprietors to streamline inventory and menu management.
CaféCTRL aims to optimize managing of inventory and cash flow in a restaurant. Our CLI platform empowers users to streamline stock inventory, menu and orders. Users will also briefly be able to gain valuable insights through comprehensive sales reporting, enabling them to analyze sales trends and calculate revenue/profit margins, eliminating the need for cross-platform management.

---------------------------------------------------
## Quick Start
1. Ensure that you have Java `11` or above installed.
1. Ensure that you have Java `11` installed.
2. Down the latest version of `CafeCtrl` from [here](https://github.com/AY2324S1-CS2113-T17-2/tp/releases).
3. Copy the file to the folder you want to use as the home folder for your Cafe Manager CLI Application.
4. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar tp.jar` command to run the application.
Expand All @@ -40,6 +41,7 @@ Hello! Welcome to CafeCTRL!
-----------------------------------------------------
>
```

---------------------------------------------------
## Features
> **Notes about command format:**
Expand Down Expand Up @@ -327,8 +329,9 @@ Format: `bye`

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
## Known Issues
- The application is unable to read the data text files if they have been edited directly in the wrong decoding format
- For edit price command, special characters can be entered in the price argument
- The application is unable to read the data text files if they have been edited directly in the wrong decoding format.
- The application is unable to detect wrong argument tag, a general incorrect command format will be printed out for wrong argument tag.
- The application is unable to support unit conversion, hence only ml ang g are accepted as ingredient unit.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
## Command Summary
Expand All @@ -350,3 +353,7 @@ Format: `bye`
| **Help** | `help` |
| **Exit Program** | `bye` |

---------------------------------------------------
## Glossary
- **Dish index**: Index of the dish according to `list_menu`.
- **stock**: The quantity of ingredient available in the pantry of the cafe.