Question
module project { package hotel.fivestar; import java.util.scanner; public class RunningLog { public static void main (string[] args) ( Scanner sc = new Scanner (system.in); //
module project {
package hotel.fivestar;
import java.util.scanner;
public class RunningLog {
public static void main (string[] args) (
Scanner sc = new Scanner (system.in);
// asking user to input the number of runs
System.out.print("Enter how many runs you want to run : ");
int noOfRuns = Integer.parseInt(sc.nextLine()); // taking the user input
// now iterating upto that numbers
for(int i=0; double time,distance,averagePace; //variables to store the time and distance // taking distance and time for each run system.out.print(" Enter the distance in miles : "); distance = Double.parseDouble (sc.nextLine()); System.out.print ("Enter the time taken to travel the distance : "); time = Double.parseDouble (sc.nextLine()); // now displaying the average for each run averagePace = time/distance; System.out.println("Average pace of Run-"+(i+i)+" is : "+averagePace+"(minutes per mile)"); } System.out.println(" Thank you for using my running Log Program"); } } } Please use the code above to do the following requirements: This weeks project work will build off the last one, Write a program that: Note: In general, Project work will be more free-form than other assignments. So in this case, your input/output format is more up to you. Please make it as usable and readable to the user as possible.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started