Overview

Fitbot is a desktop app that helps university students who are looking to keep track of their calorie consumption and calorie output with the speed and convenience of command-line based tools, especially in times of online school.

Summary of Contributions

The following items listed below are what I have contributed to the team:

New Feature: Profile

  • What it does: Contains the user’s attributes such as Name, Height, Weight, Age, Gender, Calorie Goal, Activity Factor.
  • Justification: The main idea behind the profile was to make Fitbot feel more personalized and let it know your characteristics. Most of these attributes are required in the Harris-Benedict Equation we used to calculate one’s Basal Metabolic Rate, which is important in determining an accurate calorie budget for the day.
  • Highlights: This feature incorporates its individual classes of each attribute to ensure data integrity is preserved and profile is a container that holds these attributes together.

New Feature: Saving and loading of data from Storage

  • What it does: It allows users to load all the data upon startup of the application and save data depending on the command that is being executed.
  • Justification: Having a storage utility is crucial in our app’s functionality of calculating the past week of exercise/food consumed, as well as remembering one’s profile attributes that lead to the calculations.
  • Highlights: This feature loads and saves all the different data structures we have come up with, including FoodList, ExerciseList, FutureExerciseList, ItemBank, Profile. It can detect an anomaly within the file and handle it in a way that it can be dealt with later on in another state whereby users can modify their attributes again in case they have accidentally corrupted a particular attribute.

Code Contributed:

Reposense Link

Project Management:

  • Aided in setting up the GitHub repo and initializing the project during the early stages of the project
  • Created issues and user stories for v1.0, and generally helped to find bugs and assign new issues on a consistent basis such as Documentation or type.Task related.

Enhancements To Existing Features:

Add verifiability to various Profile attributes

  • As our program loads the attributes from storage (to see whether it has been modified maliciously), it detects the attribute validity. With this implementation, we are able to utilize the StartState (implemented by Yi Zhi) to rectify the problem without discarding the entire profile data. (#88)

Creation of StorageManager Class

  • As we grew in our list of features, our storages for the various features grew as well. As such, acting as an agent, it encapsulates all storages required to make our program work with their respective functionality (loading/saving). (#99)

Creation of DataManager Class

  • After deliberating with the other members, a DataManager class was created to encompass all the different types of Data we have (FoodList, Profile, ExerciseBank etc.) and ensured all the items are localised in this class. This de-clutters Main.java and primarily acts as an agent for the various items. (#143)

Storage OOP

  • Using a Storage.java API, it interfaces all other Storage-related interfaces and ensures the methods for each Storage superinterface is implemented. As such, they are initialised by each storage’s class of XYZStorageUtils.java and brought together in the StorageManager.java class.

Documentation:

Community:

  • Helped other team review their Developer Guide (here)
  • PRs reviewed (With non-trivial comments): #34, #35, #80, #119