[CS2113-W14-3] FitChasers#9
Conversation
User greet and J-Unit test
NigelYeoTW
left a comment
There was a problem hiding this comment.
Overall lgtm, good progress, keep it up 🔥
| */ | ||
| public Person(String name) { | ||
| setName(name); // reuse setter để kiểm tra name | ||
| this.weightHistory = new ArrayList<>(); |
There was a problem hiding this comment.
Any reason why the variable is not instantiated during declaration?
| * @throws IllegalArgumentException if name is null or empty | ||
| */ | ||
| public Person(String name) { | ||
| setName(name); // reuse setter để kiểm tra name |
There was a problem hiding this comment.
Comments should be in as per coding standards
| * | ||
| * @return true if a record was removed, false if no records exist | ||
| */ | ||
| public boolean removeLatestWeightRecord() { |
There was a problem hiding this comment.
Perhaps could make the method sound more like a boolean
| */ | ||
| public Exercise(String name, int reps) { | ||
| this.name = name; | ||
| this.sets = new ArrayList<>(); |
There was a problem hiding this comment.
Any reason why this is not initialised on declaration
| public Exercise(String name, int reps) { | ||
| this.name = name; | ||
| this.sets = new ArrayList<>(); | ||
| this.sets.add(reps); |
There was a problem hiding this comment.
Any reason why you did you just use your defined method to add reps for the class?
| if(dateStr.isEmpty()) { | ||
| dateStr = LocalDate.now().format(DateTimeFormatter.ofPattern("dd/MM/yy")); | ||
| ui.showMessage("You missed out the date! Using current date: " + dateStr); | ||
| } | ||
| if(timeStr.isEmpty()) { | ||
| timeStr = LocalTime.now().format(DateTimeFormatter.ofPattern("HHmm")); | ||
| ui.showMessage("You missed out the time! Using current time: " + timeStr); | ||
| } |
There was a problem hiding this comment.
Perhaps ensure whitespace consistency
| ui.showMessage("No workouts recorded yet!"); | ||
| return; | ||
| } | ||
|
|
||
| for (int i = 0; i < workouts.size(); i++) { | ||
| Workout w = workouts.get(i); | ||
| ui.showMessage("------------------------------------------------"); | ||
| ui.showMessage("[" + (i + ARRAY_OFFSET) + "]: " + w.getWorkoutName() + |
There was a problem hiding this comment.
Perhaps UI can have functions to output these?
| if (w.getExercises().isEmpty()) { | ||
| ui.showMessage(" No exercises added yet."); | ||
| } else { | ||
| for (int j = 0; j < w.getExercises().size(); j++) { | ||
| Exercise ex = w.getExercises().get(j); | ||
| ui.showMessage(" Exercise " + (j + 1) + ". " + ex); | ||
| for (int k = 0; k < ex.getSets().size(); k++) { | ||
| ui.showMessage(" Set " + (k + 1) + " -> Reps: " + ex.getSets().get(k)); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Perhaps try to reduce nesting for readability
| boolean usedDefaultDate = false; | ||
| boolean usedDefaultTime = false; |
There was a problem hiding this comment.
Perhaps variables can sound more like booleans
| * @param scanner Scanner for reading user input in the retry loop | ||
| * @param initialArgs Initial command arguments containing end date/time details | ||
| */ | ||
| public void endWorkout(Scanner scanner, String initialArgs) { |
There was a problem hiding this comment.
perhaps refactor this methods as it seems to be quite long, the logic paths could also be made more readable
| Given below is a quick overview of main components and how they interact with each other. | ||
|
|
||
| #### Main components of the architecture | ||
|  |
| At app launch, it initializes and loads the components and data in the correct sequence, and connects them up with each other. | ||
| At shut down, it shuts down the other components and invokes cleanup methods where necessary. | ||
|
|
||
| The bulk of the app’s work is done by the following six components: |
| and tags are auto-generated: | ||
|  | ||
| ### Sequence Diagram for creating a workout | ||
|  |
There was a problem hiding this comment.
Would you consider using plantUML on IDE to create the diagram, because handwritten diagrams can be hard to read
| ### Sequence Diagram for creating a workout | ||
|  | ||
| ### Sequence Diagram for adding an exercise to current workout | ||
|  |
| * Higher computational cost | ||
| * Difficult to debug and test | ||
|
|
||
| Rationale: ALternative 1 was chosen for simplicity and predictability. For a CLI Fitchaser, |
| This enables users to quickly identify workout types and track training patterns over time. | ||
|
|
||
| ### Class Diagram | ||
|  |
There was a problem hiding this comment.
Is this the same issue as above, as the image is not displaying?
There was a problem hiding this comment.
I am getting the same issue, there is no class diagram image showing
ry-koh
left a comment
There was a problem hiding this comment.
Overall, good job on the Developer Guide, it is very in depth, just some minor formatting issues and diagram problems.
| ## UI Component | ||
| The API of this component is specified in seedu.fitchasers.ui.UI. | ||
|
|
||
|  |
| ## UI Component | ||
| The API of this component is specified in seedu.fitchasers.ui.UI. | ||
|
|
||
|  |
| ## UI Component | ||
| The API of this component is specified in seedu.fitchasers.ui.UI. | ||
|
|
||
|  |
| a user's weight and goal weight. It works together with the `Person` entity to maintain a complete | ||
| history of weight entries. | ||
|
|
||
|  |
|
|
||
| The `GoalWeightTracker` component handles the user's target goal weight. It works together with the `FileHandler` to persist goal data and provides feedback comparing the goal with the user's latest recorded weight. | ||
|
|
||
|  |
| ### Sequence Diagram for adding an exercise to current workout | ||
|  | ||
| ### Sequence Diagram for adding a set to the current exercise | ||
|  |
| * More complex override logic | ||
|
|
||
| Rationale: Alternative 1 was chosen as the separation provides clearer semantics and aligns with the use | ||
| case where users may want to distinguish between automatic suggestions and their own categorization. |
| * Add a `filterByTag(String tag)` method to `WorkoutManager` | ||
| * Modify `Workout.getAllTags()` to support efficient tag lookups | ||
| #### Proposed feature: Display aggregate statistics grouped by tag | ||
| Example command: `/stats --by-tag` |
# Conflicts: # src/main/java/seedu/fitchasers/FileHandler.java
Fixing bugs
# Conflicts: # src/main/java/seedu/fitchasers/workouts/WorkoutManager.java
Enhanced chat interface
# Conflicts: # src/main/java/seedu/fitchasers/workouts/WorkoutManager.java
Edge cases bug fix
# Conflicts: # src/main/java/seedu/fitchasers/ui/ViewLog.java # src/main/java/seedu/fitchasers/workouts/WorkoutManager.java
Pavithra6-Srinivasan
left a comment
There was a problem hiding this comment.
Most of your diagrams are not showing but other than that its a very detailed DG, good job!
| #### How the architecture components interact with each other | ||
|
|
||
| The Sequence Diagram below shows how the components interact with each other for the scenario where the user issues the command /create_workout pushup. | ||
|  |
There was a problem hiding this comment.
I am not able to see you sequence diagram
| - Listens to model changes indirectly: Domain managers return updated entities/strings; UI redraws views (e.g., ViewLog.render(...) for monthly logs). | ||
|
|
||
|
|
||
| Responsibilities |
There was a problem hiding this comment.
would be easier to read if this section was in point form
|
|
||
| The `WorkoutManager` component is responsible for managing all workout-related operations in FitChasers, including | ||
| workout creation, exercise tracking, and workout history management. | ||
|  |
There was a problem hiding this comment.
I am not able to see this class diagram
Lee-YiSheng
left a comment
There was a problem hiding this comment.
overall good sequence diagram in general, easy to understand. As other has commented, may be better to use UML diagram instead of hand written notes
| This enables users to quickly identify workout types and track training patterns over time. | ||
|
|
||
| ### Class Diagram | ||
|  |
There was a problem hiding this comment.
I am getting the same issue, there is no class diagram image showing
| ### Sequence Diagram for creating a workout | ||
|  | ||
| ### Sequence Diagram for adding an exercise to current workout | ||
|  |
| ### Sequence Diagram for creating a workout | ||
|  | ||
| ### Sequence Diagram for adding an exercise to current workout | ||
|  |
There was a problem hiding this comment.
is showmessage() following the correct naming convention?
is display success message also following the correct method naming convention?
| ### Sequence Diagram for creating a workout | ||
|  | ||
| ### Sequence Diagram for adding an exercise to current workout | ||
|  |
…e/tp into Adjusting-Open-by-index-params
Updated open log using standard params
Solve PPP Format Issue
Updated RepoSense Link
Add object diagram
Added object diagrams
# Conflicts: # src/main/java/seedu/fitchasers/FileHandler.java # src/main/java/seedu/fitchasers/ui/ViewLog.java # src/main/java/seedu/fitchasers/user/Person.java















FitChaser is a Command Line Interface (CLI)-based fitness tracking app designed for NUS
gym-goers. It is optimized for CLI users so that frequent tasks can be done faster by typing in commands