-
Notifications
You must be signed in to change notification settings - Fork 231
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-F14-3] BYTE-CEPS #53
base: master
Are you sure you want to change the base?
Changes from 221 commits
9fbe800
f55bbd9
6533004
da096a2
6b3d16a
98a6c53
d6296e6
01ee899
1804189
8a064ee
864b0e7
1325ea2
a7b7d2f
a7a8fe8
8eae29f
1c91f0b
4148618
a78aa42
4760706
0c3aa92
a95797c
eb7aed0
33dcd92
8c787b5
29dde29
caca50e
8c91e1d
73e1679
81135d4
05c97d7
a7e4c9e
20a8fd3
9bc154e
5b91949
c12ff91
8e6f5c9
c3f630d
3e91b6d
971bf45
37cf6d1
b88ba16
1b3114b
3820af5
67dc947
d05f23d
4291731
5ebc701
960adfc
fc2b473
fb67ed9
0ba7888
2728f2f
b4943f8
6b0e235
638e58a
87dbdc2
c5297a0
dda360a
0f4b2db
0a7d1f5
38abdbf
702003d
418d0f4
f254624
9f8b94c
7131f09
aaf8c6c
86aa8cc
3ae0b83
b9eb6cc
4851109
f4fa348
8cd4f71
45bb6b2
e114ce9
23e0be6
0d7320e
890e861
d7a69d1
09479a6
c153dee
592e979
91cc8b0
27f9f57
1d662ad
13b16f1
bba265f
f17cc3e
a3cd0a4
4996f3a
f4615a5
2d77579
6a8db1e
5b3d368
78ef210
1abbeaa
98922e1
614a3c7
2103e5e
8f99733
328aa9f
bc08d6b
3986da6
6c98817
af4e326
769a203
2bfa7b4
7977a61
aa63a10
7a36aa8
252c466
4d21e8d
d9a56a1
f96042d
bee7fc0
7be53d5
e21a4aa
fed26ec
d7e4fc9
199486c
8bd7e99
62dc972
bbb7151
aa1343c
6a267e6
c371d84
963459e
0424682
1473182
04b033c
d0d84d9
451c3ee
fb15c83
519c882
f1ad2d3
3a3d8d7
0aac5de
bea54a3
70bd66a
743762e
d22b329
0f65583
d0900c7
f1e80b9
f33aa28
d65220a
bc4a141
41746c5
ba199e4
194eb29
6719aa5
a6c687e
da24040
bfad650
b9f2ede
00c2fea
37160f3
8e448a2
f87ae39
06c33de
5cc8ae5
1a6d181
5e5bb29
b1de02b
967c48f
e256c76
027686f
70c94cf
0ecbbe5
722933c
d56cc9a
a69d20a
1ca7a98
d1636f5
5482b97
812008a
f918519
2f392b0
88dcc21
b62613c
2688ccd
95d2b89
5ad23df
7bdda4c
21689bc
46646d6
bf2e625
2c4166e
3e328b3
11416a4
eab1965
bf7f6ba
8254b4b
4fa4d44
99f2d9f
362b671
d03deb2
f0df780
97f3e6c
3d55568
43a56ed
05af784
f66445d
09e00b9
3f9e09e
481f4ee
d7b175f
234d0a2
321ea38
e9261b7
6a303d7
bef3ee8
c0187e4
aefea83
325e8dc
c69aa09
1a88a11
4e3c129
043db84
8e7e6b5
4d40cdd
647ea91
9f1a37d
f31ac12
49df2f8
32ccc2b
da6ec68
af22cfa
2860f5d
1e46670
76a5391
f5ded04
04bf3be
4d4ed67
13ba98e
9b198a3
99e8967
3662f24
7400b3c
679745a
0ddbd53
cda2c6e
37c2793
3442e78
ed872b3
c693caa
2e212f3
34b887b
88d2554
20c02fc
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,5 @@ bin/ | |
|
||
/text-ui-test/ACTUAL.TXT | ||
text-ui-test/EXPECTED-UNIX.TXT | ||
META-INF/MANIFEST.MF | ||
data.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
# 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) | Joshua Lee | [Github](https://github.com/joshualeejunyi) | [Portfolio](docs/team/joshualee.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Vernon | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Lim Yu An | [Github](https://github.com/pqienso) | [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) | Lukas W | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,118 @@ | |
|
||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} | ||
|
||
## Design & implementation | ||
## Classes: overview | ||
|
||
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
### `Activity` and child classes | ||
The `Activity` class serves as a parent class to `Exercise`, `ExerciseLog`, `Workout`, `WorkoutLog` and `Day` classes for the ease of usage of `ActivityManager` classes (see below). | ||
|
||
![ActivityClassDiagram](diagrams/ActivityClassDiagram.png) | ||
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. 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. 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. 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. Should there be a 'C' symbol in the class 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. Overall the class diagram seems quite comprehensive covering the relevant classes. Nice. 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. Consider omitting methods that are trivial/unnecessary to improve the readability of the class diagram. |
||
|
||
#### The `Exercise` class | ||
An `Exercise` object represents a single exercise entered by the user. The exercise name is stored in `Exercise.activityname`. | ||
|
||
#### The `Workout` class | ||
A `Workout` object represents a single workout created by the user. It contains an `ArrayList` of `Exercise` objects. | ||
|
||
#### The `ExerciseLog` class | ||
An `ExerciseLog` object is similar to an `Exercise` object, except that it also contains information on the weight, sets and repetitions of each exercise. | ||
|
||
#### The `WorkoutLog` class | ||
A `WorkoutLog` object is similar to that of a `Workout` object, except it contains an `ArrayList` of `ExerciseLog` objects. | ||
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. Would all this not already be self-evident from the class diagram? |
||
|
||
### <code>ActivityManager</code> and child classes | ||
The <code>ActivityManager</code> and inheritors are responsible for managing an <code>ArrayList</code> of activities. The basic functions of an <code>ActivityManager</code> include: | ||
1. <code>add()</code>: Adding an activity to the <code>ArrayList</code> | ||
2. <code>delete()</code>: Deleting an activity from the <code>ArrayList</code> | ||
3. <code>retrieve()</code>: Retrieving an activity from the <code>ArrayList</code> by name | ||
4. <code>getListString()</code>: Get the string containing all the activities contained in the <code>ActivityManager</code>. | ||
5. `execute()`: Execute all commands related to the `ActivityManager` and return the required user input. | ||
|
||
![ActivityManagerClassDiagram](diagrams/ActivityManagerClassDiagram.png) | ||
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. Should there be a 'C' / 'A' symbol in the class diagram? |
||
|
||
#### The `ExerciseManager` class | ||
`ExerciseManager` is responsible for tracking and manipulating all exercises added to `ByteCeps` by the user. | ||
|
||
#### The `WorkoutManager` class | ||
`WorkoutManager` is responsible for tracking and manipulating all workouts created by the user. | ||
|
||
#### The `WeeklyProgramManager` class | ||
`WeeklyProgram` is responsible for tracking and manipulating the weekly training program set by the user. | ||
|
||
## Implementation | ||
#### Add an Exercise | ||
1. The process begins with the user inputting a command via the command-line interface. In this scenario, the user enters the command `exercise /add pushups`, indicating their intention to add a new exercise named `pushups` to the system. | ||
2. The command parser receives the user input and parses it to extract relevant information, such as the action (`exercise /add`) and any additional parameters (e.g., the name of the exercise to be added). | ||
3. Upon receiving the parsed command, the Exercise Manager component validates the input to ensure it conforms to the expected format and criteria. This step is crucial for maintaining data integrity and preventing errors in subsequent processing. | ||
4. If the input passes validation, the Exercise Manager proceeds to create a new Exercise object with the specified name, `pushups`. It then invokes the add method within the Activity Manager component to add the newly created Exercise to the activity set. Finally, a success message confirming the addition of the exercise is printed to the user interface, indicating that the operation was completed successfully. | ||
5. If the input fails validation, an error message is generated and displayed to the user, informing them of the invalid command format. This ensures that users receive timely feedback and can correct their input accordingly | ||
|
||
The sequence diagram below shows how an exercise is created. | ||
|
||
![addExercise](https://github.com/V4Vern/tp/assets/28131050/45f7e9b3-8a31-4dfe-a783-433acb71fa58) | ||
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. Should the return arrow in the sequence be depicted as a solid line? 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. Can the invocation of the method be more concise? 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. Are there supposed to be two class boxes at the top and bottom? 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. FYI you should link to repository resources instead of external links, as done above. |
||
|
||
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. 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. 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. |
||
|
||
#### Delete an Exercise | ||
1. The process begins with the user inputting a command via the command-line interface. In this scenario, the User provides the command `exercise /delete pushups` to delete the exercise named `pushups`. | ||
2. The command parser receives the user input and parses it to extract relevant information, such as the action (`exercise /delete`) and any additional parameters (e.g., the name of the exercise to be deleted). | ||
3. Upon receiving the parsed command, the Exercise Manager component validates the input to ensure it conforms to the expected format and criteria. This step is crucial for maintaining data integrity and preventing errors in subsequent processing. | ||
4. If the input passes validation, the ExerciseManager retrieves the Exercise object associated with the name `pushups`. It then instructs the ActivityManager to delete the Exercise from the activitySet. The ExerciseManager then informs the User of the successful deletion. | ||
5. If the input fails validation, an error message is generated and displayed to the user, informing them of the invalid command format. This ensures that users receive timely feedback and can correct their input accordingly | ||
|
||
The sequence diagram below shows how an exercise is deleted. | ||
|
||
![deleteExercise](https://github.com/V4Vern/tp/assets/28131050/3fde6b4e-d292-497a-9468-2118125678a7) | ||
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. Kindly add activation boxes for self-method calls in the 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. Is an activation bar required when invoking a method within the function? |
||
|
||
#### Edit an Exercise | ||
1. The process begins with the user inputting a command via the command-line interface. In this scenario, the User provides the command `exercise /edit pushups /to pressups` to change the exercise named `pushups` to `pressups`. | ||
2. The command parser receives the user input and parses it to extract relevant information, such as the action (`exercise /edit`) and any additional parameters (e.g., the name of the exercise to be changed and the new name). | ||
3. Upon receiving the parsed command, the Exercise Manager component validates the input to ensure it conforms to the expected format and criteria. This step is crucial for maintaining data integrity and preventing errors in subsequent processing. | ||
4. If the input passes validation, the ExerciseManager retrieves the Exercise object associated with the name `pushups`. It then calls the object's instance method editExerciseName() to change the String stored in its instance field activityName. The ExerciseManager then informs the User of the successful edit. | ||
5. If the input fails validation, an error message is generated and displayed to the user, informing them of the invalid command format. This ensures that users receive timely feedback and can correct their input accordingly | ||
|
||
The sequence diagram below shows how an exercise is edited. | ||
|
||
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. It seems that there is a missing sequence diagram here? |
||
#### List Exercises | ||
1. The process begins with the user inputting a command via the command-line interface. In this scenario, the User provides the command `exercise /list` to list all exercises. | ||
2. The command parser receives the user input and parses it to extract relevant information, such as the action (`exercise /list`) and any additional parameters. | ||
3. Upon receiving the parsed command, the Exercise Manager component validates the input to ensure it conforms to the expected format and criteria. This step is crucial for maintaining data integrity and preventing errors in subsequent processing. | ||
4. If the input passes validation, the ExerciseManager instructs the ActivityManager to list all exercises. The ActivityManager retrieves the list of exercises from the activitySet. The ActivityManager returns the exercise list to the ExerciseManager. The ExerciseManager prints the list of exercises to the User. | ||
5. If the input fails validation, an error message is generated and displayed to the user, informing them of the invalid command format. This ensures that users receive timely feedback and can correct their input accordingly | ||
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. Consider starting the sequence diagram at a later stage, say when the command has already been parsed, for a more condensed and meaningful explanation. |
||
|
||
The sequence diagram below shows how exercises can be listed | ||
|
||
![listExercise](https://github.com/V4Vern/tp/assets/28131050/eebe0e2e-d486-4644-b36d-e26b499d1f53) | ||
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. Should the return arrow in the sequence be depicted as a solid line? 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. Is an activation bar required when invoking a method within the function? |
||
|
||
#### Search an Exercise | ||
1. The process begins with the user inputting a command via the command-line interface. In this scenario, the User provides the command `exercise /search pushups` to search for exercises containing `pushups`. | ||
2. The command parser receives the user input and parses it to extract relevant information, such as the action (`exercise /search`) and any additional parameters (e.g., the name of the exercise to be search). | ||
3. Upon receiving the parsed command, the Exercise Manager component validates the input to ensure it conforms to the expected format and criteria. This step is crucial for maintaining data integrity and preventing errors in subsequent processing. | ||
4. If the input passes validation, the ExerciseManager instructs the ActivityManager to search for exercises containing the specified term. The ActivityManager performs the search operation on the activitySet. The ActivityManager returns the search results to the ExerciseManager. The ExerciseManager prints the search results to the User. | ||
5. If the input fails validation, an error message is generated and displayed to the user, informing them of the invalid command format. This ensures that users receive timely feedback and can correct their input accordingly | ||
|
||
The sequence diagram below shows how an exercise can be searched. | ||
|
||
![searchExercises](https://github.com/V4Vern/tp/assets/28131050/fd32eba4-a7f1-460d-81cc-d9e57ca100c2) | ||
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. Is an activation bar required when invoking a method within the function? |
||
|
||
|
||
|
||
|
||
#### Logging of workouts | ||
In order to log workouts, we have several layers to implement: | ||
1. Logging of exercises | ||
2. Storing logged exercises in a logged workout | ||
3. Storing all logged workouts | ||
|
||
The implementation for the above is as such: | ||
1. `ExerciseLog` extends from the `Activity` class, and introduces `weight`, `set` and `repetitions` as variables to be stored. | ||
2. `WorkoutLog` extends from the `Activity` class, and introduces `HashSet<ExerciseLog>` to store all logged exercises for that given workout, and `workoutName` to store the name of the `Workout` that was intended to be for that day. The id for this class is the date of the workout. | ||
3. All `WorkoutLog` classes created are stored in `WorkoutLogsManager`, which is extended from `ActivityManager`. | ||
|
||
The user interfaces with this feature through the `WeeklyProgramManager`, as it is intended that the user logs their exercises according to the workout program that they have assigned to a specified day. | ||
|
||
The sequence diagram below shows how a log is created. | ||
|
||
![WorkoutLogOverview.png](./diagrams/WorkoutLogOverview.png) | ||
|
||
|
||
## Product scope | ||
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. Target user profile and value proposition seems to be missing. |
||
|
@@ -20,10 +129,10 @@ | |
|
||
## 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 ... | | ||
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. Consider adding more user stories |
||
|---------|----------|---------------------------|-------------------------------------------------------------| | ||
| 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 | | ||
|
||
## Non-Functional Requirements | ||
|
||
|
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.
Would it be better to include a table of contents (with links to the relevant sections) for easier navigability?