[CS2113-F14-3] BYTE-CEPS#53
Conversation
implement basic findBook function
NgYaoDong
left a comment
There was a problem hiding this comment.
Generally good job, just minor issues here and there. :)
|  | ||
|
|
|  | ||
|
|
|  | ||
|
|
||
|
|
||
| ## Product scope |
There was a problem hiding this comment.
Target user profile and value proposition seems to be missing.
| ### `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). | ||
|
|
||
|  |
| ### `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). | ||
|
|
||
|  |
| ### `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). | ||
|
|
||
|  |
| + execute(parser : Parser) : String | ||
| - executeInfoAction(parser : Parser) : String | ||
| - executeListAction(parser : Parser) : String | ||
| - executeUnassignAction(parser : Parser) : String | ||
| - executeAssignAction(parser : Parser) : String | ||
| - executeDeleteAction(parser : Parser) : String | ||
| - executeCreateAction(parser : Parser) : String | ||
| - processWorkout(parser : Parser) : Workout | ||
| - assignExerciseToWorkout(parser : Parser) : String | ||
| - getFullWorkoutString(workoutPlanName : String) : String | ||
| - unassignExerciseFromWorkout(parser : Parser) : String | ||
| + getActivityType(plural : boolean) : String | ||
| - executeSearchAction(parser : Parser) : String | ||
| } |
There was a problem hiding this comment.
Note that not all attributes and methods need be stated. Consider including only the relevant ones.
| + {static} DAYS : String[] | ||
| - exerciseManager : ExerciseManager | ||
| - workoutManager : WorkoutManager | ||
| - workoutLogsManager : WorkoutLogsManager | ||
| + WeeklyProgramManager(exerciseManager : ExerciseManager, workoutManager : WorkoutManager, workoutLogsManager : WorkoutLogsManager) | ||
| - initializeDays() : void | ||
| - getDay(day : String) : Day | ||
| + execute(parser : Parser) : String | ||
| - executeListAction() : String | ||
| - executeAssignAction(parser : Parser) : String | ||
| + assignWorkoutToDay(workout : Activity, day : String) : String | ||
| - getDayFromDate(date : LocalDate) : Day | ||
| - getDayFromDate(dateString : String) : Day | ||
| - executeLogAction(parser : Parser) : String | ||
| - {static} getWorkoutName(selectedDay : Day, workoutDate : String) : String | ||
| - executeTodayAction() : String | ||
| - getTodaysWorkoutString(givenWorkout : Workout, workoutDate : String, workoutDay : Day) : String | ||
| - executeHistoryAction(parser : Parser) : String | ||
| - getHistoryString() : String | ||
| - executeClearAction(parser : Parser) : String | ||
| + exportToJSON() : JSONObject | ||
| + getActivityType(plural : boolean) : String | ||
| + getListString() : String | ||
| } |
| #### 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.
Would all this not already be self-evident from the class diagram?
| 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.
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 an exercise is created. | ||
|
|
||
|  |
There was a problem hiding this comment.
FYI you should link to repository resources instead of external links, as done above.
|
|
||
| The sequence diagram below shows how an exercise is deleted. | ||
|
|
||
|  |
There was a problem hiding this comment.
Kindly add activation boxes for self-method calls in the ExerciseManager.
wjunjie01
left a comment
There was a problem hiding this comment.
Overall looks good except for some minor diagram issue
| {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 |
There was a problem hiding this comment.
Would it be better to include a table of contents (with links to the relevant sections) for easier navigability?
| ### `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). | ||
|
|
||
|  |
There was a problem hiding this comment.
Should there be a 'C' symbol in the class diagram?
There was a problem hiding this comment.
Overall the class diagram seems quite comprehensive covering the relevant classes. Nice.
| 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. | ||
|
|
||
|  |
There was a problem hiding this comment.
Should there be a 'C' / 'A' symbol in the class diagram?
|
|
||
| The sequence diagram below shows how an exercise is edited. | ||
|
|
There was a problem hiding this comment.
It seems that there is a missing sequence diagram here?
|
|
||
| The sequence diagram below shows how an exercise is created. | ||
|
|
||
|  |
There was a problem hiding this comment.
Should the return arrow in the sequence be depicted as a solid line?
There was a problem hiding this comment.
Can the invocation of the method be more concise?
There was a problem hiding this comment.
Are there supposed to be two class boxes at the top and bottom?
|
|
||
| The sequence diagram below shows how exercises can be listed | ||
|
|
||
|  |
There was a problem hiding this comment.
Should the return arrow in the sequence be depicted as a solid line?
There was a problem hiding this comment.
Is an activation bar required when invoking a method within the function?
|
|
||
| The sequence diagram below shows how an exercise can be searched. | ||
|
|
||
|  |
There was a problem hiding this comment.
Is an activation bar required when invoking a method within the function?
|
|
||
| The sequence diagram below shows how an exercise is deleted. | ||
|
|
||
|  |
There was a problem hiding this comment.
Is an activation bar required when invoking a method within the function?
| ### `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). | ||
|
|
||
|  |
There was a problem hiding this comment.
Consider omitting methods that are trivial/unnecessary to improve the readability of the class diagram.
|  | ||
|
|
| |--------|----------|---------------|------------------| | ||
| |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 ... | |
Add logging for different weights & reps
…into storage-test-fix
Fix bugs and refactor
Edit UG introduction
PPP: fix link
Finalise PPP
Change heading format
Fix bugs, edit UG & DG
Add key UG grammar corrections
Update readme.md and Fix table
Actually fix table insha'allah
Fix table in UG
Fix DG UMLs
Add DG corrections






BYTE-CEPS is a fitness application that allows tech-savvy users of all kind keep track of their fitness journey through the simplicity and efficiency of the command line interface.