Skip to content

Commit

Permalink
Merge pull request #360 from AY2223S1-CS2103T-W16-4/chore-add-author
Browse files Browse the repository at this point in the history
Chore add author
  • Loading branch information
ThomasHoooo authored Nov 7, 2022
2 parents 113f5d9 + a41a43d commit b773fe7
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 29 deletions.
36 changes: 23 additions & 13 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ How the `Logic` component works:
1. The result of the command execution is encapsulated as a `CommandResult` object which is returned from `Logic`.

The Sequence Diagram below illustrates the interactions within the `Logic` component for the `execute("addClient n/John Tan p/12345678")` API call.

<!-- @@author rexong -->
![Interactions Inside the Logic Component for the `addClient n/John Tan p/12345678` Command](images/AddClientSequenceDiagram.png)

<!-- @@author -->
<div markdown="span" class="alert alert-info">:information_source: **Note:** The lifeline for `DeleteClientCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
</div>

Expand Down Expand Up @@ -222,6 +222,7 @@ We decided to only allow adding of a client with its product only after the prod

This is to try and maintain the overall cleanliness and housekeeping of _MyInsuRec_. Suppose we allow the user to add the client with any product name without it already existing in the product list. This might be organized and clean for the first few contacts added, but over time, the product name can get distorted. Shorthand forms may be used in place of the product name, case sensitivity and whitespaces are ignored. With _MyInsuRec_ also placing a focus on allowing users to get an idea of the popularity of each of the products they are selling, it is paramount that the product name stay the same, so as to enable the feature to work. Furthermore, one of the problems we are attempting to solve is the messiness of using traditional Excel spreadsheets. Having this validation check helps to preserve the data added, and thus the user can use the app for a longer time without feeling cluttered.

<!-- @@author rexong -->
#### 4.1.2 Birthday constraints

Below is the activity diagram that illustrates the process of validating birthday when birthday of a client is added.
Expand All @@ -233,7 +234,7 @@ We decided to set these 2 constraints on birthday:
1) Birthday should not be in the future.

2) Birthday should not be more than 100 years ago as we feel that client would not be able to buy product due to age limit.

<!-- @@author thomashoooo -->
#### 4.1.3 View client

Syntax: `viewClient i/INDEX`, where `INDEX` is an index shown in the client list.
Expand All @@ -258,6 +259,7 @@ Below is an activity diagram that summarises the execution of `viewClient`.

![ViewClientActivityDiagram](images/ViewClientActivityDiagram.png)

<!-- @@author rexong -->
#### 4.1.4 Delete Client

Syntax: `delClient i/INDEX`, where `INDEX` is an index shown in the client list.
Expand All @@ -278,7 +280,7 @@ The sequence diagram below illustrates the interactions between the `Logic` and
Below is the activity diagram that summarises the execution of `delClient`.

![DeleteClientActivityDiagram](images/DeleteClientActivityDiagram.png)

<!-- @@author -->
#### 4.1.5 Edit Client feature

Syntax: `editClient i/INDEX [n/NAME] [p/PHONE_NUMBER] [a/ADDRESS] [e/EMAIL] [b/BIRTHDAY] [pd/PRODUCT]`
Expand Down Expand Up @@ -338,6 +340,7 @@ Below is a sequence diagram that illustrates the execution of `addMeeting i/1 st
- Cons: The parser will need to have access to the model in order to
obtain the referenced client.

<!-- @@author rexong -->
#### 4.2.2 Meeting date constraints

Below is the activity diagram that illustrates the process of validating meeting date.
Expand All @@ -348,6 +351,7 @@ We decided to set this constraint on meeting date:

1) Meeting Date is not in the past.

<!-- @@author rexong -->
#### 4.2.3 Delete meeting

Syntax: `delMeeting i/INDEX`, where `INDEX` is an index shown in the meeting list.
Expand Down Expand Up @@ -376,6 +380,7 @@ _The sequence diagram and activity diagram of `delMeeting` is similar to the dia
- Cons: Complex to implement
- Considering that the approach taken to develop _MyInsuRec_ is a breath first approach, where we should only build to the point where every iteration is a working product, **Solution 1** is thus chosen as it is easier to implement. However, Solution 2 could be a possible implementation for future iteration.

<!-- @@author thomashoooo-->
#### 4.2.4 View meeting

Syntax: `viewMeeting i/INDEX`, where `INDEX` is an index shown in the meeting list.
Expand All @@ -392,7 +397,7 @@ Usage Scenario of `viewMeeting`:
</div>

_The sequence diagram and activity diagram of `viewMeeting` is similar to the diagrams shown in [`viewClient`](#413-view-client) feature by replacing all occurrence of `client` with `meeting`._

<!-- @@author -->
#### 4.2.5 List meeting

Syntax: `listMeeting [d/PERIOD]`
Expand Down Expand Up @@ -457,7 +462,7 @@ Below is a sequence diagram that illustrates the execution of `editMeeting i/1 d
<img src="images/AlternativeEditActivityDiagram.png" width="250" />

### 4.3 `Product`-related features

<!-- @@author thomashoooo -->
#### 4.3.1 Add product

Syntax: `addProduct pd/PRODUCT_NAME`
Expand All @@ -470,14 +475,14 @@ Usage Scenario of `addProduct`:

1) User inputs `addProduct pd/PrudenSure` to add PrudenSure in the product list.

Below is a sequence diagram that illustrates the execution of `listMeeting` command.
Below is a sequence diagram that illustrates the execution of `addProduct` command.

![AddProductSequenceDiagram](images/AddProductSequenceDiagram.png)

Below is an activity diagram that summarises the execution of `addProduct`.

![AddProductActivityDiagram](images/AddProductActivityDiagram.png)

<!-- @@author -->
### 4.4 UI

#### 4.4.1 Different view panels
Expand Down Expand Up @@ -669,6 +674,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`

Use case ends.

<!-- @@author rexong -->
#### 6.3.4 Use case: UC4 - Delete a client

**MSS**
Expand All @@ -687,7 +693,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`
* 1a1. System shows an error message.

Use case ends.

<!-- @@author -->
#### 6.3.5 Use case: UC5 - Edit a client

**MSS**
Expand Down Expand Up @@ -760,6 +766,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`

Use case ends.

<!-- @@author rexong -->
#### 6.3.9 Use case: UC9 - Delete a meeting

**MSS**
Expand All @@ -778,7 +785,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`
* 3a1. System shows an error message.

Use case ends.

<!-- @@author -->
#### 6.3.10 Use case: UC10 - Edit a meeting

**MSS**
Expand Down Expand Up @@ -966,7 +973,7 @@ testers are expected to do more *exploratory* testing.
10. Add client with invalid phone number
* Test case: `addClient n/Tom p/12345`
* Expected: No client will be added. Error regarding the wrong phone input will be shown.

<!-- @@author thomashoooo -->
### 7.3 Viewing a client

<div markdown="span" class="alert alert-info">:information_source: **Note:** The function works regardless of the view you are currently in, but it only makes sense to use while you are in the list of clients using `listClient` where the index number of the client can be found.
Expand Down Expand Up @@ -999,6 +1006,7 @@ testers are expected to do more *exploratory* testing.
* Test case: `viewClient 1`
* Expected: Prefix for index is not provided, so there will be an invalid command format error.

<!-- @@author rexong -->
### 7.4 Deleting a client

<div markdown="span" class="alert alert-info">:information_source: **Note:** The function works regardless of the view you are currently in, but it only makes sense to use while you are in the list of clients using `listClient` where the index number of the client can be found.</div>
Expand All @@ -1016,7 +1024,7 @@ testers are expected to do more *exploratory* testing.
4. Delete client without parameters
* Test case: `delClient`
* Expected: No client is deleted. Error regarding invalid command format will be shown.

<!-- @@author -->
### 7.5 Listing meetings

<div markdown="span" class="alert alert-info">:information_source: **Note:** The function works regardless of the view you are currently in.</div>
Expand Down Expand Up @@ -1047,6 +1055,7 @@ testers are expected to do more *exploratory* testing.
* Test case: `listMeeting adsfadsf`
* Expected: The view switches back to the list of meetings, and all three meetings are displayed. Extra parameters are ignored.

<!-- @@author rexong -->
### 7.6 Deleting a Meeting

Deleting a meeting while all meetings are being shown
Expand All @@ -1065,6 +1074,7 @@ Deleting a meeting while all meetings are being shown
* Test case: `delMeeting`
* Expected: No meeting is deleted. Error regarding invalid command format will be shown.

<!-- @@author thomashoooo -->
### 7.7 Viewing a meeting

<div markdown="span" class="alert alert-info">:information_source: **Note:** The function works regardless of the view you are currently in, but it only makes sense to use while you are in the list of meetings using `listMeeting` where the index number of the meeting can be found.</div>
Expand Down Expand Up @@ -1094,7 +1104,7 @@ Deleting a meeting while all meetings are being shown
7. View meeting without using prefix
* Test case: `viewMeeting 1`
* Expected: Prefix for index is not provided, so there will be an invalid command format error.

<!-- @@author -->
### 7.8 Adding a product

<div markdown="span" class="alert alert-info">:information_source: **Note:** The function works regardless of the view you are currently in.</div>
Expand Down
36 changes: 21 additions & 15 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ _MyInsuRec_ prioritizes user-friendliness and user experience. As such, interact
_MyInsuRec_ is available for the Windows, macOS and Linux operating systems. To get started, simply head over to the [installation guide](#5-installation-guide). This user guide can also serve as a reference for experienced users, with a convenient [command summary](#9-command-summary).

--------------------------------------------------------------------------------------------------------------------

<!-- @@author rexong -->
## 2. How to use this User Guide

Welcome to _MyInsuRec_ User Guide!
Expand All @@ -28,13 +28,16 @@ This guide smooths the learning curve and helps you learn how to use _MyInsuRec_

Before we go on further, look out for these symbols in the User Guide as they provide some important messages you might want to know!

<!-- @@author -->
| Symbol | Background color | Meaning |
|----------------------|------------------|-------------------------------------------------------------------------------------------------------|
| `command` | - | Indicates some command or parameter that can be entered into MyInsuRec. |
| :information_source: | Blue | Additional information. This symbol is followed by a label 'Note'. |
| :exclamation: | Yellow | Crucial information needed for proper use of MyInsuRec. This symbol is followed by a label 'Caution'. |
| :bulb: | Green | Tips and tricks. This symbol is followed by a label 'Tips and tricks'. |

<!-- @@author rexong -->

<div markdown="span" class="alert alert-info">**:information_source: Note:**
If you have **not installed** _MyInsuRec_, you can follow the [installation guide](#5-installation-guide) here!
</div>
Expand All @@ -57,7 +60,7 @@ We hope that this guide is helpful in smoothing out the learning curve for you!
[Return to the top](#)

--------------------------------------------------------------------------------------------------------------------

<!-- @@author -->
## 3. Overview

The following subsections explains some terminology and main features of *MyInsuRec*:
Expand Down Expand Up @@ -111,7 +114,7 @@ Beyond individual products, you can also:
[Return to the top](#)

--------------------------------------------------------------------------------------------------------------------

<!-- @@author rexong -->
## 4. User Interface

The following subsections introduces the layout of _MyInsuRec_'s user interface.
Expand Down Expand Up @@ -157,7 +160,7 @@ This is the view after executing the `viewMeeting` command.
[Return to the top](#)

--------------------------------------------------------------------------------------------------------------------

<!-- @@author -->
## 5. Installation Guide

### 5.1 System Requirements
Expand Down Expand Up @@ -269,6 +272,7 @@ This section guides you on how to use features available in *MyInsuRec*. We will

**Do take some time to read the following note** to better understand how you can use this section!

<!-- @@author rexong -->
<div markdown="block" class="alert alert-info">

**:information_source: Notes about the command format:**<br>
Expand Down Expand Up @@ -309,7 +313,7 @@ This section guides you on how to use features available in *MyInsuRec*. We will
e.g. if the command is used as `editClient i/1 n/Smith et/1230` where `et/` is the only invalid parameter, the input by preceding valid parameter `n/` will be read as `Smith et/1230` (this input is invalid because it is not alphanumeric)

* All incorrect parameters up until the first valid parameter will be ignored for commands that take in parameters (such as `editClient` and `delMeeting`). <br> e.g. `delMeeting n/Alex i/1` will be parsed correctly since `i/1` is the first valid parameter and the incorrect parameter `n/Alex` before that is ignored.

<!-- @@author -->
</div>

<div markdown="span" class="alert alert-warning">**:exclamation: Caution:**
Expand All @@ -321,7 +325,7 @@ See [addProduct](#731-adding-a-product-addproduct).
### 7.1 Client commands

This subsection covers all client-related commands.

<!-- @@author rexong -->
#### 7.1.1 Add client: `addClient`

Add a new client to _MyInsuRec_.
Expand Down Expand Up @@ -355,7 +359,7 @@ Examples:
* `addClient n/John Tan p/12345678 e/[email protected] a/123 ABC ROAD, #11-01 pd/Product1`
* Same as above, but with multiple products
* `addClient n/John Tan p/12345678 e/[email protected] a/123 ABC ROAD, #11-01 pd/Product1 pd/Product2 pd/Product3`

<!-- @@author thomashoooo -->
#### 7.1.2 List clients: `listClient`

Shows the list of clients in MyInsuRec.
Expand Down Expand Up @@ -393,6 +397,7 @@ Examples:

* Extraneous parameters will not be taken into account. For example, `listClient n/Alex` will be considered as `listClient` without any error messages.
</div>
<!-- @@author thomashoooo-->

#### 7.1.3 View client: `viewClient`

Expand All @@ -413,7 +418,7 @@ Examples:

Screenshot:
![ViewClient](images/features/ViewClient.png)

<!-- @@author rexong -->
#### 7.1.4 Delete client: `delClient`

Delete the specified client from _MyInsuRec_.
Expand All @@ -431,7 +436,7 @@ Use case:
Examples:
* Delete the client with an `INDEX` of 2
* `delClient i/2`

<!-- @@author -->
#### 7.1.5 Edit client: `editClient`

Edit details of the specified client.
Expand Down Expand Up @@ -535,6 +540,7 @@ Examples:
<div markdown="span" class="alert alert-warning">**:exclamation: Caution:**
Extraneous parameters will not be taken into account. For example, `listMeeting n/Alex` will be considered as `listMeeting` without any error messages.
</div>
<!-- @@author thomashoooo -->

#### 7.2.3 View meeting: `viewMeeting`

Expand All @@ -555,7 +561,7 @@ Examples:

Screenshot:
![ViewMeeting](images/features/ViewMeeting.png)

<!-- @@author rexong -->
#### 7.2.4 Delete meeting: `delMeeting`

Delete a meeting from _MyInsuRec_.
Expand All @@ -574,7 +580,7 @@ Use case:
Examples:
* Delete meeting with an `INDEX` of 2
* `delMeeting i/2`

<!-- @@author -->
#### 7.2.5 Edit meeting: `editMeeting`

Edit details of the specified meeting.
Expand All @@ -599,7 +605,7 @@ Examples:
### 7.3 Product commands

This subsection covers all product-related commands.

<!-- @@author thomashoooo -->
#### 7.3.1 Add product: `addProduct`

Add a new product to MyInsuRec.
Expand All @@ -617,7 +623,7 @@ Use Case:
Examples:
* Add product with product name of 'Product1'
* `addProduct pd/Product1`

<!-- @@author -->
#### 7.3.2 List products: `listProduct`

Show the list of products in MyInsuRec.
Expand Down Expand Up @@ -748,7 +754,7 @@ Add the product to the client using the [`editClient`](#715-edit-client-editclie
[Return to the top](#)

--------------------------------------------------------------------------------------------------------------------

<!-- @@author thomashoooo -->
## 9. Command summary

| Action | Format | Examples |
Expand All @@ -769,7 +775,7 @@ Add the product to the client using the [`editClient`](#715-edit-client-editclie
| [**Help**](#741-view-help-help) | `help` | `help` |
| [**Exit**](#742-exit-myinsurec-exit) | `exit` | `exit` |
| [**Clear**](#743-clear-myinsurec-clear) | `clear` | `clear` |

<!-- @@author -->
[Return to the top](#)

--------------------------------------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/team/thomashoooo.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Given below are my contributions to the project.

* **Team tasks**:
* Set up the Github team organisation and repository
* Integrated CodeDev into the team repo
* Integrated Codecov into the team repo
* Set up Github pages for Jekyll
* Maintain the issue tracker

Expand Down
6 changes: 6 additions & 0 deletions src/main/java/seedu/address/model/util/Date.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

import seedu.address.logic.parser.DateKeyword;

//@@author Junweimoo
//Created most of the methods in this class.

//@@author rexong
//Refactored and abstracted Junweimoo's code to reduce code duplication.

/**
* Represents Dates that are used in MyInsuRec
*/
Expand Down

0 comments on commit b773fe7

Please sign in to comment.