BYTE-CEPS is a CLI-based tool for setting and tracking fitness goals. The user interacts with the tool using commands entered via the CLI interface. With BYTE-CEPS, they can compile a list of exercises, build custom workouts, assign workouts to a weekly schedule and log details of each exercise completed in each performed workout.
All code contributed can be seen on the tP dashboard here.
Parser and UserInterface classes
Parser class that takes in user input and outputs the command actions
arguments in the form of a HashSet.UserInterface class that is responsible for taking in user input and
printing to System.out.program functionality.
WeeklyProgramManager that handles all commands starting with
program, allowing users to create and customise their weekly workout plan.program /listprogram /assign <WORKOUT_NAME> /to <DAY>program /clear <DAY [optional]>program /today.json file
Storage class which loads and saves user data
to and from a .json file using this JSON-java library.ByteCeps to handle cascading deletions
CascadingDeletionProcessor class that checks for cascading deletions
(eg. when an exercise assigned to an existing workout is deleted from ByteCeps by the user)
, allowing for the .json files to load properly after such deletions.ByteCeps.runCommandLine().
CascadingDeletionProcessor involves multiple ActivityManager classes. Hence, its public
method is only called in ByteCeps, which already handles these classes, to minimise coupling.ActivityManager classes to reduce couplingActivityManager classes had scattered calls to UserInterface.printMessage() in all of their methods, causing high coupling and low maintainability of code.ActivityManager’s execute() classes were refactored such that they returned the messageToUser to ByteCeps,
and only then is UserInterface.printMessage() is called.UserInterface was now only associated with ByteCeps and Storage classes,
as compared to previously where there were associations with all ActivityManager classes.Validator public methods, standardizing them to return void and only throw Exceptions.InvalidInput when validation fails.
Validator methods were previously returning processed inputs if the inputs were valid.
This led to an overlap in responsibilities between the ActivityManager and Validator classes.v1.0,
v2.0Activity classes and ActivityManager classes, along with their overview and explanation.WeeklyProgramManager.Storage class.CascadingDeletionProcessor class.Activity class diagram:
ActivityManager class diagram:
program /assign ... sequence diagram:
program /log ... sequence diagram:
\
program /clear ... sequence diagram:
program /today sequence diagram:
storage.save() sequence diagram:
storage.load() sequence diagram:
storage.loadWorkouts() sequence diagram:
CascadingDeletionProcessor.removeDeletedExerciseFromWorkouts sequence diagram:
CascadingDeletionProcessor.removeDeletedWorkoutsFromProgram sequence diagram: