Skip to content

Commit 060d809

Browse files
authored
Merge pull request nus-cs2103-AY2021S1#85 from khor-jingqian/improve-dg-ug
Improve DG and UG
2 parents 6ff930f + 3fa2a90 commit 060d809

21 files changed

+262
-212
lines changed

docs/DeveloperGuide.md

Lines changed: 46 additions & 117 deletions
Large diffs are not rendered by default.

docs/UserGuide.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ Format: `routine_view INDEX`
147147
Examples:
148148
* `routine_view 2` Views routine with the index 2.
149149

150-
##### Before input:
150+
**Before input:**
151151

152152
![Routine View](./images/routine_view.png)
153153

154154

155-
#### After input:
155+
**After input:**
156156

157157
![Routine View After](./images/routine_view_after.png)
158158

@@ -173,10 +173,11 @@ Format: `find_routines KEYWORD`
173173
Example:
174174
* `find_routines upper` Finds all routines with the keyword "upper" in its name, regardless of uppercase or lowercase.
175175

176-
##### Input:
176+
**Input:**
177+
177178
![Find Routines](./images/routine_find.png)
178179

179-
##### Result:
180+
**Result:**
180181

181182
![Find Routines Result](./images/routine_find_after.png)
182183

@@ -201,9 +202,15 @@ Deletes an existing lesson in fitNUS corresponding to the given index.
201202
Format: `lesson_delete INDEX`
202203

203204
Example:
204-
* `lesson_delete 1` Deletes the lesson at index 1 in the list.
205+
* `lesson_delete 2` Deletes the lesson at index 2 in the list.
206+
207+
**Before**
208+
209+
![Lesson Delete Before](./images/lesson_delete_before.png)
205210

206-
![Lesson Delete](./images/lesson_delete.png)
211+
**After**
212+
213+
![Lesson Delete After](./images/lesson_delete_after.png)
207214

208215
#### 3.3.3 List lessons : `list_lessons`
209216

@@ -345,7 +352,8 @@ Action | Format |
345352
**Link to User Guide** | `help`
346353
**Save and exit fitNUS** | `exit`
347354

348-
### 4.2 Exercise
355+
### 4.2 Exercise
356+
349357
Action | Format | Examples
350358
--------|-------|-----------
351359
**Create Exercise** | `exercise_add n/EXERCISE_NAME [t/TAG]` | `exercise_add n/Bench Press t/Upper`
@@ -354,6 +362,7 @@ Action | Format | Examples
354362
**List Exercises** | `list_exercises`
355363

356364
### 4.3 Routine
365+
357366
Action | Format | Examples
358367
--------|-------|-----------
359368
**Create Routine** | `routine_create r/ROUTINE_NAME` | `routine_create r/Leg Day Session`
@@ -364,6 +373,7 @@ Action | Format | Examples
364373
**List Routines** | `routine list`
365374

366375
### 4.4 Lesson
376+
367377
Action | Format | Examples
368378
--------|-------|-----------
369379
**Create Lesson** | `lesson_add n/EXERCISE_NAME [t/TAG]` | `lesson_add n/CS2100 t/Thursday t/0900 t/1hours`
@@ -372,6 +382,7 @@ Action | Format | Examples
372382
**Find Lessons** | `find_lessons KEYWORD [MORE_KEYWORDS]` | `find_lessons CS2103T`
373383

374384
### 4.5 Timetable
385+
375386
Action | Format | Examples
376387
--------|-------|-----------
377388
**Add Routine to Timetable** | `timetable_add_routine r/ROUTINE_NAME d/DAY_OF_THE_WEEK T/TIMING` | `timetable_add_routine add r/Leg Day Session d/Monday T/1600-1800`
@@ -380,6 +391,7 @@ Action | Format | Examples
380391
**View timetable** | `timetable view`
381392

382393
### 4.6 BMI
394+
383395
Action | Format | Examples
384396
--------|-------|-----------
385397
**Add or edit Height** | `height h/HEIGHT` | `height h/170`

docs/diagrams/ArchitectureSequenceDiagram.puml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ Participant ":Logic" as logic LOGIC_COLOR
77
Participant ":Model" as model MODEL_COLOR
88
Participant ":Storage" as storage STORAGE_COLOR
99

10-
user -[USER_COLOR]> ui : "delete 1"
10+
user -[USER_COLOR]> ui : "exercise_add n/Bicep"
1111
activate ui UI_COLOR
1212

13-
ui -[UI_COLOR]> logic : execute("delete 1")
13+
ui -[UI_COLOR]> logic : execute("exercise_add n/Bicep")
1414
activate logic LOGIC_COLOR
1515

16-
logic -[LOGIC_COLOR]> model : deletePerson(p)
16+
logic -[LOGIC_COLOR]> model : addExercise(e)
1717
activate model MODEL_COLOR
1818

1919
model -[MODEL_COLOR]-> logic
2020
deactivate model
2121

22-
logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook)
22+
logic -[LOGIC_COLOR]> storage : saveFitNus(fitnus)
2323
activate storage STORAGE_COLOR
2424

2525
storage -[STORAGE_COLOR]> storage : Save to file

docs/diagrams/DeleteSequenceDiagram.puml

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,66 +3,70 @@
33

44
box Logic LOGIC_COLOR_T1
55
participant ":LogicManager" as LogicManager LOGIC_COLOR
6-
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
7-
participant ":DeleteCommandParser" as DeleteCommandParser LOGIC_COLOR
8-
participant "d:DeleteCommand" as DeleteCommand LOGIC_COLOR
6+
participant ":FitNusParser" as FitNusParser LOGIC_COLOR
7+
participant ":ExerciseDeleteCommandParser" as ExerciseDeleteCommandParser LOGIC_COLOR
8+
participant "d:ExerciseDeleteCommand" as ExerciseDeleteCommand LOGIC_COLOR
99
participant ":CommandResult" as CommandResult LOGIC_COLOR
1010
end box
1111

1212
box Model MODEL_COLOR_T1
1313
participant ":Model" as Model MODEL_COLOR
1414
end box
1515

16-
[-> LogicManager : execute("delete 1")
16+
[-> LogicManager : execute("exercise_delete 1")
1717
activate LogicManager
1818

19-
LogicManager -> AddressBookParser : parseCommand("delete 1")
20-
activate AddressBookParser
19+
LogicManager -> FitNusParser : parseCommand("exercise_delete 1")
20+
activate FitNusParser
2121

22-
create DeleteCommandParser
23-
AddressBookParser -> DeleteCommandParser
24-
activate DeleteCommandParser
22+
create ExerciseDeleteCommandParser
23+
FitNusParser -> ExerciseDeleteCommandParser
24+
activate ExerciseDeleteCommandParser
2525

26-
DeleteCommandParser --> AddressBookParser
27-
deactivate DeleteCommandParser
26+
ExerciseDeleteCommandParser --> FitNusParser
27+
deactivate ExerciseDeleteCommandParser
2828

29-
AddressBookParser -> DeleteCommandParser : parse("1")
30-
activate DeleteCommandParser
29+
FitNusParser -> ExerciseDeleteCommandParser : parse("1")
30+
activate ExerciseDeleteCommandParser
3131

32-
create DeleteCommand
33-
DeleteCommandParser -> DeleteCommand
34-
activate DeleteCommand
32+
create ExerciseDeleteCommand
33+
ExerciseDeleteCommandParser -> ExerciseDeleteCommand
34+
activate ExerciseDeleteCommand
3535

36-
DeleteCommand --> DeleteCommandParser : d
37-
deactivate DeleteCommand
36+
ExerciseDeleteCommand --> ExerciseDeleteCommandParser : d
37+
deactivate ExerciseDeleteCommand
3838

39-
DeleteCommandParser --> AddressBookParser : d
40-
deactivate DeleteCommandParser
39+
ExerciseDeleteCommandParser --> FitNusParser : d
40+
deactivate ExerciseDeleteCommandParser
4141
'Hidden arrow to position the destroy marker below the end of the activation bar.
42-
DeleteCommandParser -[hidden]-> AddressBookParser
43-
destroy DeleteCommandParser
42+
ExerciseDeleteCommandParser -[hidden]-> FitNusParser
43+
destroy ExerciseDeleteCommandParser
4444

45-
AddressBookParser --> LogicManager : d
46-
deactivate AddressBookParser
45+
FitNusParser --> LogicManager : d
46+
deactivate FitNusParser
4747

48-
LogicManager -> DeleteCommand : execute()
49-
activate DeleteCommand
48+
LogicManager -> ExerciseDeleteCommand : execute()
49+
activate ExerciseDeleteCommand
5050

51-
DeleteCommand -> Model : deletePerson(1)
51+
ExerciseDeleteCommand -> Model : getFilteredExerciseList()
5252
activate Model
5353

54-
Model --> DeleteCommand
54+
Model --> ExerciseDeleteCommand
55+
56+
ExerciseDeleteCommand -> Model : exerciseDelete(index)
57+
58+
Model --> ExerciseDeleteCommand
5559
deactivate Model
5660

5761
create CommandResult
58-
DeleteCommand -> CommandResult
62+
ExerciseDeleteCommand -> CommandResult
5963
activate CommandResult
6064

61-
CommandResult --> DeleteCommand
65+
CommandResult --> ExerciseDeleteCommand
6266
deactivate CommandResult
6367

64-
DeleteCommand --> LogicManager : result
65-
deactivate DeleteCommand
68+
ExerciseDeleteCommand --> LogicManager : result
69+
deactivate ExerciseDeleteCommand
6670

6771
[<--LogicManager
6872
deactivate LogicManager

docs/diagrams/FindExercisesSequenceDiagram.puml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
box Logic LOGIC_COLOR_T1
55
participant ":LogicManager" as LogicManager LOGIC_COLOR
6-
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
6+
participant ":FitNusParser" as FitNusParser LOGIC_COLOR
77
participant ":FindExercisesCommandParser" as FindExercisesCommandParser LOGIC_COLOR
88
participant "f:FindExercisesCommand" as FindExercisesCommand LOGIC_COLOR
99
participant ":CommandResult" as CommandResult LOGIC_COLOR
@@ -16,17 +16,17 @@ end box
1616
[-> LogicManager : execute("find_exercises bench")
1717
activate LogicManager
1818

19-
LogicManager -> AddressBookParser : parseCommand("find_exercises bench")
20-
activate AddressBookParser
19+
LogicManager -> FitNusParser : parseCommand("find_exercises bench")
20+
activate FitNusParser
2121

2222
create FindExercisesCommandParser
23-
AddressBookParser -> FindExercisesCommandParser
23+
FitNusParser -> FindExercisesCommandParser
2424
activate FindExercisesCommandParser
2525

26-
FindExercisesCommandParser --> AddressBookParser
26+
FindExercisesCommandParser --> FitNusParser
2727
deactivate FindExercisesCommandParser
2828

29-
AddressBookParser -> FindExercisesCommandParser : parse("bench")
29+
FitNusParser -> FindExercisesCommandParser : parse("bench")
3030
activate FindExercisesCommandParser
3131

3232
create FindExercisesCommand
@@ -36,14 +36,14 @@ activate FindExercisesCommand
3636
FindExercisesCommand --> FindExercisesCommandParser : f
3737
deactivate FindExercisesCommand
3838

39-
FindExercisesCommandParser --> AddressBookParser : f
39+
FindExercisesCommandParser --> FitNusParser : f
4040
deactivate FindExercisesCommandParser
4141
'Hidden arrow to position the destroy marker below the end of the activation bar.
42-
FindExercisesCommandParser -[hidden]-> AddressBookParser
42+
FindExercisesCommandParser -[hidden]-> FitNusParser
4343
destroy FindExercisesCommandParser
4444

45-
AddressBookParser --> LogicManager : f
46-
deactivate AddressBookParser
45+
FitNusParser --> LogicManager : f
46+
deactivate FitNusParser
4747

4848
LogicManager -> FindExercisesCommand : execute()
4949
activate FindExercisesCommand

docs/diagrams/LogicClassDiagram.puml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package Logic {
88

99
package Parser {
1010
Interface Parser <<Interface>>
11-
Class AddressBookParser
11+
Class FitNusParser
1212
Class XYZCommandParser
1313
Class CliSyntax
1414
Class ParserUtil
@@ -35,8 +35,8 @@ Class HiddenOutside #FFFFFF
3535
HiddenOutside ..> Logic
3636

3737
LogicManager .up.|> Logic
38-
LogicManager -->"1" AddressBookParser
39-
AddressBookParser .left.> XYZCommandParser: creates >
38+
LogicManager -->"1" FitNusParser
39+
FitNusParser .left.> XYZCommandParser: creates >
4040

4141
XYZCommandParser ..> XYZCommand : creates >
4242
XYZCommandParser ..|> Parser
@@ -53,7 +53,7 @@ LogicManager .left.> Command : executes >
5353

5454
LogicManager --> Model
5555
Command .right.> Model
56-
note right of XYZCommand: XYZCommand = AddCommand, \nFindCommand, etc
56+
note right of XYZCommand: XYZCommand = ExerciseAddCommand, \nFindExercisesCommand, etc
5757

5858
Logic ..> CommandResult
5959
LogicManager .down.> CommandResult

docs/diagrams/ModelClassDiagram.puml

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,32 @@ skinparam arrowColor MODEL_COLOR
55
skinparam classBackgroundColor MODEL_COLOR
66

77
Package Model <<Rectangle>>{
8-
Interface ReadOnlyAddressBook <<Interface>>
8+
Interface ReadOnlyFitNus <<Interface>>
99
Interface Model <<Interface>>
1010
Interface ObservableList <<Interface>>
11-
Class AddressBook
12-
Class ReadOnlyAddressBook
11+
Class FitNus
12+
Class ReadOnlyFitNus
1313
Class Model
1414
Class ModelManager
1515
Class UserPrefs
1616
Class ReadOnlyUserPrefs
1717

18-
Package Person {
19-
Class Person
20-
Class Address
21-
Class Email
18+
Package Exercise {
19+
Class Exercise
2220
Class Name
23-
Class Phone
24-
Class UniquePersonList
21+
Class UniqueExerciseList
22+
}
23+
24+
Package Routine {
25+
Class Routine
26+
Class Name
27+
Class UniqueRoutineList
28+
}
29+
30+
Package Lesson {
31+
Class Lesson
32+
Class Name
33+
Class UniqueLessonList
2534
}
2635

2736
Package Tag {
@@ -32,25 +41,23 @@ Class Tag
3241
Class HiddenOutside #FFFFFF
3342
HiddenOutside ..> Model
3443

35-
AddressBook .up.|> ReadOnlyAddressBook
44+
FitNus .up.|> ReadOnlyFitNus
3645

3746
ModelManager .up.|> Model
3847
Model .right.> ObservableList
39-
ModelManager o--> "1" AddressBook
48+
ModelManager o--> "1" FitNus
4049
ModelManager o-left-> "1" UserPrefs
4150
UserPrefs .up.|> ReadOnlyUserPrefs
4251

43-
AddressBook *--> "1" UniquePersonList
44-
UniquePersonList o--> "*" Person
45-
Person *--> Name
46-
Person *--> Phone
47-
Person *--> Email
48-
Person *--> Address
49-
Person *--> "*" Tag
52+
FitNus *--> "1" UniqueExerciseList
53+
FitNus *--> "1" UniqueLessonList
54+
UniqueExerciseList o--> "*" Exercise
55+
Exercise *--> Name
56+
Exercise *--> "*" Tag
5057

51-
Name -[hidden]right-> Phone
52-
Phone -[hidden]right-> Address
53-
Address -[hidden]right-> Email
5458

55-
ModelManager -->"1" Person : filtered list
59+
FitNus *--> "1" UniqueRoutineList
60+
UniqueRoutineList o--> "*" Routine
61+
Routine --> "*" Exercise
62+
ModelManager -->"1" Exercise : filtered list
5663
@enduml

0 commit comments

Comments
 (0)