This question involves the implementation of a fitness tracking system that is represented by the StepTracker class. A StepTracker object is created with a parameter that defines the minimum number of steps that must be taken for a day to be considered active.
The StepTracker class provides a constructor and the following methods.
addDailySteps, which accumulates information about steps, in readings taken once per day activeDays, which returns the number of active days averageSteps, which returns the average number of steps per day, calculated by dividing the total number of steps taken by the number of days tracked
The following table contains a sample code execution sequence and the corresponding results.
Write the complete StepTracker class, including the constructor and any required instance variables and methods. Your implementation must pass all of the tests in the StepTrackerTest class (provided).