Creates an instance of the fifiworkoutjava classnbspgets


LiFiUnit6.java

Provide a driver class that has the following items:

  • Creates an instance of the FiFiWorkout.java class.
  • Gets input for first name.
  • Create a constant to hold the desired duration of workout. Set it to 30.
  • Create a constant to hold the desired number of reps. Set it to 20.
  • Use a looping structure to get input until either "M' or 'W' are entered. Accept M or m and W or w. Use the string class to convert it to upper case.
  • Use a switch structure to work with either the 'M' or 'W'.
  • If M or Machine is selected:
    • Get input for the machine name such as "elliptical" or "treadmill".
    • Get the duration in minutes of the workout performed.
  • If W or Weights is selected:
    • Get input for the weight in integer.
    • Get input for the number of reps performed.
  • After the input has been accepted above:
  • If the workout duration or reps are equal to or above the desired, then output "Good Job" as shown in the sample, including the duration, reps, machine, desired duration, or desired reps. See sample for exact output.

60%

LiFiWorkout.java

Provide a workout class to hold instance variables as required by the driver.

Include accessor and mutator methods for each even if they aren't required by the driver.

Sample output is provided below. Be sure to mimic it exactly except for values entered.

30% 

NOTE: Complete your activity and submit it by clicking "Submit Assignment"

 

Total Percentage

100%

Sample

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Creates an instance of the fifiworkoutjava classnbspgets
Reference No:- TGS01182796

Expected delivery within 24 Hours