-
Notifications
You must be signed in to change notification settings - Fork 89
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
[CS2113-T17-1] AthletiCLI #16
base: master
Are you sure you want to change the base?
Changes from 250 commits
fb3eea5
e36a733
d866750
3f25007
ee3c7e5
6cb8b0c
a22144b
fb20f3a
8cf94ee
c533937
82c6ae2
ba378de
d1848d2
eb84885
4389282
8751a32
dcb1906
d16e354
c901657
f584322
4609f15
b37e982
49a59a9
e7a7ad4
aa6b4d6
ff37c62
3061e54
a4b524c
6f8b4ad
9e17afc
f4524a6
20f1489
bfe0c23
ca09b8a
6070523
db7ab28
c054e17
83453b6
e223bf2
24bb8ed
3804cf4
2ec82cf
cbc43db
36c606b
d268152
a3a5a0c
ad84c9c
fb3f4d2
67f7c29
78891e1
face75a
1abdb60
669a7a7
06aefc5
29e55d3
767b12a
b1c80c9
1a658f0
aaaab33
055f325
50587c2
26418f9
a5a2fe7
ab1603d
280ee09
27b320a
16d85a5
33e8747
4a9c0cf
8d89392
81b03bf
8224400
2a3a508
47a7f22
5128060
a00f112
d61fb7b
d0bfcff
1ac4411
e1560ed
fe6d5ec
0e9c057
a1c2e38
ab94ee8
47681d0
625b006
5f78c20
1b9162f
8e87d1e
8439deb
9ee8922
be73b39
94c4825
ad1c407
c08babe
3c9800e
139af64
ac70cd7
eb34599
e90f8a2
cd20b7b
62e2396
5cdc764
edeb2c8
f46cec1
147b527
139cdbd
6460059
8bfa0f8
b5e8fd5
4b0cc82
a553e95
6180f24
17e4d5f
f848508
9f12036
6581fb5
84fdf6a
bc91ce9
327c6a3
46dfcf5
2f2d685
107cade
79bd53c
683a975
a16e2e1
9306947
1cbae8b
4a5232d
382c6df
34fa013
d1329a6
a2c9352
4838b93
2a90bae
b6c53f7
f6debe4
299734c
c5f0b05
4403583
684f0e5
a587d74
138b673
9651fe2
cedd157
6c6f635
117ba19
0b235a3
9f3899b
68536ab
078ecef
ee48bf9
4aeb4a4
f8ec032
559b5eb
dbe68fa
7df6111
0ecb6d3
f71f603
a60df06
fbf3d18
b9bd8dc
de3b22d
292a2a0
0a1536c
0547fde
c96c62e
bb93497
7bdb151
ec15c9a
b825e54
01a160d
b26be1e
2d5d105
23d7302
b439da8
b75a951
32ab4ef
a563f18
1ec1da4
22dc7ba
f80a576
25988ac
10e71e0
049592b
8010a0b
02b362c
1312c4d
0117f83
e761a43
d3e9870
ae05125
8ff16be
f17a376
c144188
f257519
abeb5ac
50078e5
4e5b9a8
5d4e81d
a208fe3
a90b13f
82e2f68
4666a7c
433ec97
406d391
caa6bd1
69fb7da
41b371a
ddb0f43
3d0d887
be4021e
b6f091c
a8dc3fb
a73b1d0
0ba1854
e87e42f
8af64eb
7ea1dc4
a1d8162
f02ee1f
87d54d2
54ca2b1
523c84f
2aa66fc
14ac18c
4dfec50
70d5d97
dfc2143
29f2d18
045f747
2abdd09
ff17050
17e3f47
999fc8b
7b36025
44af977
22c9fea
9445c93
09f33aa
e693e34
12cf8bb
1b6e4dd
80d117d
d6b8b6f
bb03eb4
6bb9fa7
13ec792
e595239
7ab597b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ bin/ | |
|
||
/text-ui-test/ACTUAL.TXT | ||
text-ui-test/EXPECTED-UNIX.TXT | ||
/data/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"githubPullRequests.ignoredPullRequestBranches": [ | ||
"master" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
# About us | ||
|
||
Display | Name | Github Profile | Portfolio | ||
--------|:----:|:--------------:|:---------: | ||
![](https://via.placeholder.com/100.png?text=Photo) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
| Display | Name | Github Profile | Portfolio | | ||
|-----------------------------------------------------------|:-----------------:|:----------------------------------------:|:-----------------------------------------:| | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Alexander Wolters | [Github](https://github.com/AlWo223) | [Portfolio](docs/team/johndoe.md) | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Nihal | [Github](https://github.com/nihalzp) | [Portfolio](docs/team/nihalzp.md) | | ||
| ![](https://github.com/DaDevChia) | Dylan Chia | [Github](https://github.com/DaDevChia) | [Portfolio](https://github.com/DaDevChia) | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Yi Cheng | [Github](https://github.com/yicheng-toh) | [Portfolio](docs/team/yicheng.md) | | ||
| ![](https://avatars.githubusercontent.com/u/24489025?v=4) | Yang Ming-Tian | [Github](https://github.com/skylee03) | [Portfolio](docs/team/skylee03.md) | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,60 @@ | ||
# Developer Guide | ||
|
||
## Content Page | ||
- [Acknowledgements](#acknowledgements) | ||
- [Design](#design-and-implementation) | ||
- [Product Scope](#product-scope) | ||
- [Target User Profile](#target-user-profile) | ||
- [Value Proposition](#value-proposition) | ||
- [User Stories](#user-stories) | ||
- [Non-functional Requirements](#non-functional-requirements) | ||
- [Glossary](#glossary) | ||
- [Instruction for Manual Testing](#instructions-for-manual-testing) | ||
|
||
## Acknowledgements | ||
|
||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} | ||
|
||
## Design & implementation | ||
|
||
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
#### [Implemented] Setting Up of Diet Goals | ||
|
||
This following sequence diagram show how the 'set-diet-goal' command works: | ||
|
||
<p align="center" width="100%"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. include self-invocation of initializeIntermmediateDietGoals method? |
||
<img width="80%" src="images/setDietGoalUmlSequenceDiagram.svg" alt="'set-diet-goal' Sequence Diagram"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe the diagram needs to be updated to reflect the current implementation? It seems to be a little different. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it would help to include variable names in the diagram? I.e. it may not be immediately clear which object's execute() is called unless we look into the code/make educated guesses |
||
</p> | ||
|
||
Step 1. The input from the user ("set-diet-goal fats/1") runs through AthletiCLI to the Parser Class. | ||
|
||
Step 2. The Parser Class will identify the request as setting up a diet goal and pass in the parameters | ||
"fats/1". | ||
|
||
Step 3. A temporary dietGoalList is created to store newly created diet goals. | ||
|
||
Step 4. The inputs are verified against our lists of approved diet goals. | ||
|
||
Step 5. For each of the diet goals that are valid, a dietGoal object will be created and stored in the | ||
temporary dietGoalList. | ||
|
||
Step 6. The Parser then creates for an instance of SetDietGoalCommand and returns the instance to | ||
AthletiCLI. | ||
|
||
Step 7. AthletiCLI will execute the SetDietGoalCommand. This adds the dietGoals that are present in the | ||
temporary list into the data instance of DietGoalList which will be kept for records. | ||
|
||
Step 8. After executing the SetDietGoalCommand, SetDietGoalCommand returns a message that is passed to | ||
AthletiCLI to passed to UI(not shown) for display. | ||
|
||
#### [Proposed] Implementation of DietGoalList | ||
|
||
The current implementation of DietGoalList is an ArrayList. | ||
It helps to store dietGoals, however it is not efficient in searching for a particular dietGoal. | ||
At any instance of time, there could only be the existence of one dietGoal. | ||
Verifying if there is an existence of a dietGoal using an ArrayList takes O(n) time, where n is the number of dietGoals. | ||
The proposed change will be to change the underlying data structure to a hashmap for amortised O(1) time complexity | ||
for checking the presence of a dietGoal. | ||
|
||
## Product scope | ||
### Target user profile | ||
|
@@ -20,14 +67,19 @@ | |
|
||
## User Stories | ||
|
||
|Version| As a ... | I want to ... | So that I can ...| | ||
|--------|----------|---------------|------------------| | ||
|v1.0|new user|see usage instructions|refer to them when I forget how to use the application| | ||
|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list| | ||
| Version | As a ... | I want to ... | So that I can ... | | ||
|---------|---------------------------------|---------------------------|----------------------------------------------------------------------------------------| | ||
| v1.0 | new user | see usage instructions | refer to them when I forget how to use the application | | ||
| v1.0 | motivated weight-conscious user | set diet goals | have the motivation to work towards keeping weight in check. | | ||
| v1.0 | forgetful user | see all my diet goals | remind myself of all the diet goals I have set. | | ||
| v1.0 | regretful user | remove my diet goals | I can rescind the strict goals I set previously when I find the goals too far fetched. | | ||
| v1.0 | motivated user | update my diet goals | I can work towards better version of myself by setting stricter goals. | | ||
| v2.0 | user | find a to-do item by name | locate a to-do without having to go through the entire list | | ||
|
||
## Non-Functional Requirements | ||
|
||
{Give non-functional requirements} | ||
1. AthletiCLI should work on Windows, MacOS and Linux that has java 11 installed. | ||
|
||
## Glossary | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
@startuml | ||
'https://plantuml.com/sequence-diagram | ||
skinparam Style strictuml | ||
skinparam SequenceMessageAlignment center | ||
participant ":AthletiCLI" as AthletiCLI #lightblue | ||
participant ":Parser" as Parser | ||
participant ":dietGoal" as dietGoal | ||
participant ":SetDietGoalCommand" as SetDietGoalCommand | ||
participant "temp:dietGoalList" as tempDietGoalList | ||
participant "data:dietGoalList" as dataDietGoalList | ||
|
||
'autonumber | ||
AthletiCLI++ | ||
AthletiCLI -> Parser++ : ParseCommand("set-diet-goal fats/1") | ||
Parser -> Parser++ : ParseDietGoalSetEdit("fats/1") | ||
create tempDietGoalList | ||
Parser -> tempDietGoalList++ : dietGoalList() | ||
tempDietGoalList --> Parser-- : dietGoalList | ||
|
||
loop number of valid new diet goals | ||
create dietGoal | ||
Parser -> dietGoal++ : dietGoal() | ||
dietGoal --> Parser-- : dietGoal | ||
end | ||
|
||
Parser --> Parser-- : dietGoalList | ||
create SetDietGoalCommand | ||
Parser -> SetDietGoalCommand++ : SetDietGoalCommand() | ||
SetDietGoalCommand --> Parser-- : SetDietGoalCommand | ||
Parser --> AthletiCLI-- : SetDietGoalCommand | ||
AthletiCLI -> SetDietGoalCommand++ : execute() | ||
SetDietGoalCommand -> dataDietGoalList++ : add() | ||
dataDietGoalList --> SetDietGoalCommand-- | ||
destroy tempDietGoalList | ||
SetDietGoalCommand --> AthletiCLI-- : messages | ||
|
||
destroy SetDietGoalCommand | ||
|
||
@enduml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This diagram looks generally comprehensive but I think you the activation bar should end only if the self invocation is done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I think it might be better that the cross signal indicating the end of the activation bar should be attached directly to the activation bar.