Question: how do i fix these errors and make it run completely ? 1. Write a class that uses four values to represent the seconds it

how do i fix these errors and make it run completely ?
how do i fix these errors and make it run completely ?
1. Write a class that uses four values to represent the seconds
it took for a mile runner to run each lap of his

1. Write a class that uses four values to represent the seconds it took for a mile runner to run each lap of his race. 2. Calculate how long in minutes and seconds, it took the runner to run the full mile. Display this value to the user. 3. Calculate how long was the average lap and display this value to the user. Sample Run Output: How many seconds for lap one: 50 How many seconds for lap two: 52 How many seconds for tap three: 49 How many seconds for lap four: 50 The total time it took to run the mile: 3 minutes and 21 seconds The average lap time was 50.25 seconds Resource Path Location Type Description Errors (3 items) Scanner cannot be resolved to a type Scanner cannot be resolved to a type Syntax error, insert "O" to complete Expression Project2.java Project2.java Project2.java /Project2/src /Project2/src /Project2/src line 5 line 5 line 5 Java Problem Java Problem Java Problem Writable Smart Insert 5:12 [7] public class Project2 3 public static void main(String[] args) 4 5 Scanner sc = new Scanner; 5 //variable declaration 7 int one, two, three, four, i; 8 int jk; 9 float average; 2 1 System.out.print("How many seconds for lap one: "); 2. 7/reads the input 3 one = sc.nextInt(); 4 System.out.print("How many seconds for lap two: "); 1/reads the input two = sc.nextInt(); System.out.print("How many seconds for lap three: "); //reads the input three = sc.nextInt(); System.out.print("How many seconds for lap four: "); 7/reads the input four = sc.nextInt(); //calculates the minutes & seconds i = (one+two+three+four); j = 1/60; j = j'60; k=i- j; j - 1/60; //calculates the average 2 average = ((float)i/4); 3 1/prints the statement System.out.println("The total time it took to run the mile: "+j+" minutes "+k+" seconds "); System.out.println("The average lap time was "+average+" seconds "); } 5

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 Databases Questions!