PROJECT: ExerHealth

Overview

My team of 5 computer science students were tasked with enhancing a basic command line interface desktop Addressbook3 application for software engineering project. Our team decided to morph the application to ExerHealth. ExerHealth is a desktop application used for tracking and scheduling the user’s exercises. The application has statistical analysis of exercises user have completed in the past. Additionally, it also acts as a personal trainer by suggesting different exercises which both beginners and advanced users can choose from to incorporate into their exercise regime. The user interacts with it using a command line interface, and it has a GUI created with JavaFX.

Figure below is a screenshot of what our application looks like:

Ui

Figure 1. The graphical user interface for ExerHealth

My role was to develop the add and delete regime feature and statistic feature. The following sections illustrates these enhancements in more details, as well as the relevant documentation I have added to the user and developer guides in relation to those enhancements.

Summary of contributions

This section shows a summary of my coding, documentation and other helpful contributions to the team project.

  • Major enhancement: Added the ability to display statistic and charts which includes pie chart, line chart and bar chart.

    • What it does: The stats command will allow users to display chart and statistic of the exercise they have completed.

    • Justification: This feature will enable users to have an overview of number of exercise they have completed and calories they have burnt. This will help users understand their progress and improve planning of exercises in the future.

    • Highlights: This enhancement works well with existing commands and commands to be added in future. It required an in-depth analysis of design alternatives to ensure that future enhancements can be made.

  • Minor enhancement 1: Added a Unit property to exercise.

  • Minor enhancement 2: Added add and delete regime command that allows the user to add and delete regime from regime list.

  • Code contributed: [RepoSense]

  • Other contributions:

    • Enhancements to existing features:

      • Refactored Addressbook3 codebase to ExerHealth (Pull request #81)

      • Wrote additional tests for existing and new features to increase coverage (Pull requests #125, #127)

Contributions to the User Guide

Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

Display statistics : stats

Display the statistics of exercises in completed exercise list.

Format: stats t/CAT_NAME h/CHART_TYPE [s/START_DATE] [e/END_DATE]

  • Supported chart types: Pie Chart, Line Chart, Bar Chart

  • Supported category: exercise, calories

  • If no START_DATE and END_DATE are provided, the recent 7 days of history will be used.

  • If any date is provided, both START_DATE and END_DATE dates must be there.

  • The maximum range between START_DATE and END_DATE is 31 days.

  • Only exercise with same name and unit will be counted as same exercise.

  • Exercise will appear as NAME (UNIT) in the charts. E.g Running (km). If it is too long (more than 18 characters), it will be formatted to first 10 characters plus last 8 characters.

    • For example, exercise Strength Training (counts) is more than 18 characters, it will be formatted to Strength T…​(counts).

  • Total and average CATEGORY per day of exercises in the date range is shown below the chart.

Due to space constraint, some labels may not appear. Tooltips can be seen when mouse cursor hovers over the chart.

Example:

  • stats t/exercise h/piechart

PieChart
Figure 1. Image of the pie chart generated
  • stats t/calories h/linechart

LineChart
Figure 2. Image of the line chart generated
  • stats t/calories h/barchart s/31/10/2019 e/06/11/2019

BarChart
Figure 3. Image of the bar chart generated

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

Statistics

Implementation

Statistics of exercises will be displayed in charts. Supported chart types are Pie Chart, Line Chart and Bar Chart. StatsFactory will create Statistic using given parameters. The figure below shows the class diagram of statistics:

StatisticClassDiagram
Figure 4. Class diagram of the classes behind the statistics feature

The next figure shows the activity diagram when user enter a stats command:

StatisticActivityDiagram
Figure 5. Workflow when a user enters a stats command

Given below is an example usage scenario of statistics feature.

Step 1: User enters a stats command to see statistics of exercises.

Step 2: ExerciseBookParser will receive command from LogicManager and pass command to StatsCommandParser.

Step 3: StatsCommandParse will parse the command and creates a StatsCommand.

Step 4: StatsCommand calls Model#getExerciseBookData to get data of all exercises.

Step 5: StatsCommand creates a StatsFactory and pass exercises data, chart and category to StatsFactory.

Step 6: StatsFactory will then generate Statistic and return to StatsCommand.

Step 7: StatsCommand then calls Model#setStatistic to set the Statistic in Model.

Step 8: StatsCommand creates a new CommandResult and return to LogicManager.

Shown below is the sequence diagram when user enters a valid stats command:

StatisticSequenceDiagram
Figure 6. Sequence diagram of a stats command