Skip to content

Commit

Permalink
Merge pull request #331 from ongweisheng/final-check-v2.1
Browse files Browse the repository at this point in the history
Final check for submission
  • Loading branch information
ongweisheng authored Apr 12, 2021
2 parents 6ddc428 + 74469be commit e76fbb0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
7 changes: 4 additions & 3 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ user.

### 2.6 Model Component

![Command Diagram](https://user-images.githubusercontent.com/75139323/114337070-02819580-9b83-11eb-85fb-6177ef53999e.png)
![Model Diagram](https://user-images.githubusercontent.com/57165946/114408329-e1995e80-9bdb-11eb-99af-52120b495c09.png)

The model component consists of four classes, namely, `Item`, `ItemManager`, `Order` and `OrderManager` classes. `Item`
and `Order` classes represent real-world item and order objects easyLog is tasked to keep track of. Note that the UML
Expand Down Expand Up @@ -320,10 +320,10 @@ when an item is added into the system:
### 3.5. Items Update
Please note that less important details are omitted for better comprehensibility. For instance, in the first diagram of this section,
only the interactions after `ItemsUpdateCommand.execute()` is modelled. In the second diagram of this section,
details of `itemsPromptPriceCommand' and `itemsPromptPriceCommand` are omitted.
details of `itemsPromptPriceCommand` and `itemsPromptPriceCommand` are omitted.

![Items Update Figure 1](https://user-images.githubusercontent.com/75139323/114384288-1a780a00-9bc1-11eb-99c1-5c4af2e119f3.png)
The diagram above shows the first stage of `itemsUpdateCommand`, after the user user executes the `itemUpdateCommand`
The diagram above shows the first stage of `itemsUpdateCommand`, after the user executes the `itemUpdateCommand`
by typing `items update` and easyLog invokes `itemsParser`.

1. `ItemUpdateCommand` first gets the item size from `ItemManager`.
Expand All @@ -343,6 +343,7 @@ Next,
9. `ItemUpdateCommand` calls `processUpdateAttributeInput` of `ItemsParser`.

If the user input is "p":

10. `ItemsParser` calls `askForRevisedItemPrice` from `UI`. `ItemsParser` creates an object of
`ItemsPromptPriceCommand` and its `execute()` method is executed to ask the user for a valid `revisedItemPrice`.
The details are omitted to increase comprehensibility. If the item price given is not valid, the user needs to keep
Expand Down
20 changes: 10 additions & 10 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ to offer and we have prepared [Frequently Asked Questions (FAQ)](#3-faq) and a c
[Command Summary](#4-command-summary) for you. We invite you to explore easyLog.

1. Currently supports Windows, macOS and Linux machines which have Java 11 installed. <br>
2. Depending on which operating system you are using, how to open the command terminal application to operate easyLog
2. Best selling item(s) are defined to be item(s) which have most number of sales. That is, the item(s) is/are added to
orders for most number of times.
3. Depending on which operating system you are using, how to open the command terminal application to operate easyLog
differs. Please refer to [Quick start](#1-quick-start) for more information. <br>
3. Best selling item(s) are defined to be item(s) which have most number of sales. That is, the item(s) is/are added to
orders for most number of times.


***

Expand Down Expand Up @@ -307,8 +308,7 @@ If you would like to gain some useful insights from the orders history since you
feature will let you know the most popular item(s) ordered by customers. You will also be reminded to stock up.

Steps to obtain the most popular item(s) in the items list:

1.Input `items stats`.
1. Input `items stats`.
2. Press enter.
3. The most popular item(s) will be shown.

Expand Down Expand Up @@ -431,7 +431,7 @@ In the very unlikely event that all orders are cancelled, instead of deleting th
`orders clear` feature to do it efficiently.

steps to clear the order list:
1. Input `orders clear`
1. Input `orders clear`.
3. Press enter.
4. You can see the confirmation message that there is no single order now.

Expand Down Expand Up @@ -574,11 +574,11 @@ Expected Output:

## 3. FAQ

**Q1**: easyLog keeps having a "bad init? error message despite the fact that I firsy use it.
**Q1**: easyLog keeps having a "bad init" error message despite the fact that I first use it.
> Please check and ensure that easyLog has the write permissions in the folder.
**Q2**: Do I lose all my data after exiting easyLog?
> No, all relevent records are saved upon `exit` command.
> No, all relevant records are saved upon `exit` command.
**Q3**: I do not seem to be able to add an item. Why is this so?

Expand Down Expand Up @@ -612,8 +612,6 @@ system?
> In the event that you accidentally add an item or order, you can always undo it by deleting it. Likewise, you can
> add an item or order back if you delete it mistakenly. For now, easyLog does not have a command to revert any
> changes. We may consider adding it in the upcoming version. <br/>
>
> You should not worry too much as easyLog is highly optimized to be easy to use for home-based business owners.
[Return to Table of Contents](#table-of-contents)

Expand Down Expand Up @@ -641,3 +639,5 @@ Command | Format | Example |
[**orders price**](#237-get-the-total-price-of-an-order-orders-price) | `orders price <order_index>` | `orders price 2` |
[**orders done**](#238-update-the-status-of-an-order-orders-done) | `orders done <order_index>` | `orders done 2` |
[**exit**](#25-exit-the-program-exit) | `exit` | `exit` |

[Return to Table of Contents](#table-of-contents)
File renamed without changes.
6 changes: 3 additions & 3 deletions src/main/java/seedu/easylog/common/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ public class Messages {
+ MESSAGE_LINE;
public static final String MESSAGE_SHOW_MOST_POPULAR_ITEM = MESSAGE_LINE + "The most popular item is ";
public static final String MESSAGE_SHOW_MOST_POPULAR_ITEMS = MESSAGE_LINE + "The most popular items are ";
public static final String SHOW_CONSIDER_STOCK_UP_IF_MOST_POPULAR_ITEM_IS_NOT_ENOUGH = ". Please consider stocking "
+ "it up if it is not enough :)\n"
public static final String SHOW_CONSIDER_STOCK_UP_IF_MOST_POPULAR_ITEM_IS_NOT_ENOUGH = ".\nPlease consider stocking"
+ " it up if it is not enough :)\n"
+ MESSAGE_LINE;
public static final String SHOW_CONSIDER_STOCK_UP_IF_MOST_POPULAR_ITEMS_ARE_NOT_ENOUGH = ". Please consider "
public static final String SHOW_CONSIDER_STOCK_UP_IF_MOST_POPULAR_ITEMS_ARE_NOT_ENOUGH = ".\nPlease consider "
+ "stocking them up if they are not enough :)\n"
+ MESSAGE_LINE;
public static final String MESSAGE_SHOW_NO_ITEMS_TIPS_CAN_BE_GIVEN = MESSAGE_LINE
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/easylog/ui/Ui.java
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ public void showStatisticsForMostPopularItem(String itemDescription) {
* @param itemDescriptions descriptions of the most popular items
*/
public void showStatisticsForMostPopularItems(String itemDescriptions) {
System.out.print(Messages.MESSAGE_SHOW_MOST_POPULAR_ITEMS + itemDescriptions + "\n"
System.out.print(Messages.MESSAGE_SHOW_MOST_POPULAR_ITEMS + itemDescriptions
+ Messages.SHOW_CONSIDER_STOCK_UP_IF_MOST_POPULAR_ITEMS_ARE_NOT_ENOUGH);
}

Expand Down

0 comments on commit e76fbb0

Please sign in to comment.