Question: Programming Exercise 3 - a - Create a FitnessTracker class that includes data fields for a fitness activity, the number of minutes spent participating, and
Programming Exercise
a Create a FitnessTracker class that includes data fields for a fitness activity, the number of minutes spent participating, and the date. The class includes methods to get each field. In addition, create a default constructor that automatically sets the activity to running, the minutes to and the date to January of the current year. Save the file as FitnessTracker.java. Create an application that demonstrates each method works correctly, and save it as TestFitnessTracker.java.
b Create an additional overloaded constructor for the FitnessTracker class you created in Exercise a This constructor receives parameters for each of the data fields and assigns them appropriately. Add any needed statements to the TestFitnessTracker application to ensure that the overloaded constructor works correctly, save it and then test it
c Modify the FitnessTracker class so that the default constructor calls the threeparameter constructor. Save the class as FitnessTrackerjava. Create an application to test the new version of the class, and name it TestFitnessTrackerjava.Pleae help me solve this.Programming Exercise works correctly, and save it as TestFitnessTracker.java. statements to the TestFitnessTracker application to ensure that the overloaded constructor works correctly, save it and then test it TestFitnessTrackerjava.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
