Skip to content

Commit

Permalink
Merge pull request nus-cs2113-AY2324S2#82 from JeffinsonDarmawan/Jeff…
Browse files Browse the repository at this point in the history
…inson-UML

DG2
  • Loading branch information
samuelory authored Mar 29, 2024
2 parents 1d35566 + e69bd2f commit f8dca7e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
33 changes: 32 additions & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,38 @@ Step 3: `InfoCommand` class will call `printFlowerInfo()` method of `Ui` class

Step 4: `get()` of `FlowerDictionary` class will then be called in order to retrive information about the specified flower. This information will be printed by the `Ui` class

### Flower Remove Command

`remove <flowerName> /q <quantity> /from <bouquetName>` removes flower(s) from a bouquet

![Remove Command Sequence Diagram](UML-diagrams/Jeffinson/Jeffinson-UML-Remove.png);

Removing flowers utilise the `parser` class to parse user command to identify which flower to remove,
how much to remove and from which bouquet to remove.

**Step 1:** User will input the flower name, quantity and bouquet name into the `Parser.parser()` method, after which `RemoveFlowerCommand`
class will be instantiated and run its `execute()` method.

**Step 2:** An object of type `RemoveFlowerCommand` is returned which contains the name, quantity of the flower to be added, and the target bouquet

**Step 3:** Within the `RemoveFlowerCommand`, `execute()` method is called to execute the removal of flower command

**Step 4:** The flowers are removed and a confirmation message is sent back to the user

### Flower Help Command

`help` Shows a list of valid commands

![Help Command Sequence Diagram](UML-diagrams/Jeffinson/Jeffinson-UML-Help.png);

Help command utilises the `parser` class to identify the keyword `help`

**Step 1: ** User will write `help` and `HelpCommand` class will be instantiated and `execute()` method will run.

**Step 2:** `HelpCommand` class will call `printHelpMessage()` method of `Ui` class

**Step 3:** The list of valid commands will be printed by the `Ui` class

### Add Flower Command

`add <flower> /q <quantity> /to <targetBouquet>` command adds specified number of flower to a bouquet
Expand All @@ -65,7 +97,6 @@ Step 4: The target bouquet, which is under model, is updated accordingly

Step 5: A confirmation message is then sent back to the user


### [Proposed] Storage

#### Proposed Implementation:
Expand Down
Binary file modified docs/UML-diagrams/Jeffinson/Jeffinson-UML-Help.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions docs/team/jeffinson.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Design & Implementation

## Flower Removal Command

**Step 1:** Removing flowers utilise the `parser` class to parse user command to identify which flower to remove,
how much to remove and from which bouquet to remove.

**Step 2:** User will input `remove <flowerName> /q <quantity> /from <bouquetName>` and once `parser` identifies the
appropriate keywords, it will instantiate the `HelpCommand` class and run its `execute()` method.

**Step 3:** `HelpCommand` class will call `printHelpMessage()` method of `Ui` class

**Step 4:** The list of valid commands will be printed by the `Ui` class

0 comments on commit f8dca7e

Please sign in to comment.