Question: Declare a class named ExerciseEntry. Inside the class, declare instance member variables for exerciseType ( type string ) , durationMinutes ( type int ) ,

Declare a class named ExerciseEntry.
Inside the class, declare instance member variables for exerciseType (type string), durationMinutes (type int), and intensityLevel (type int) to represent the RPE.
Declare a public static member variable named totalDurationMinutes to track the total exercise duration across all instances of the ExerciseEntry class.
Write a constructor for the ExerciseEntry class that accepts arguments for each instance member variable and initializes them. The constructor should also add the current entry's duration to the totalDurationMinutes static member variable.
Implement an instance member function named displayDetails to print the exercise type, duration, and intensity level.
Implement a static member function named getTotalDurationMinutes to return the total exercise duration for all entries.
1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!