Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following java program has syntax errors and will not compile. The attached

ID: 3885785 • Letter: T

Question

The following java program has syntax errors and will not compile. The attached file contains this code. Please correct the syntax errors so the program compiles cleanly and attach your corrected java file.

import java.util.*;

public class Question_11

     public static final RATE = 35.75;

    public void main(String[] args) {

        wages

        Scanner console = new Scanner(System.in);

        System.out.println("Please enter the number of hours worked: ");

        hours = console.nextDouble();

        wages := hours * RATE

        System.out.println("The calculated wages = " + wages);

    }

}

Explanation / Answer

import java.util.*;
import java.util.Scanner;
public class Question_11 {
public static final double RATE = 35.75;
public static void main(String[] args) {
double wages=1;
double hours;
Scanner console = new Scanner(System.in);
System.out.println("Please enter the number of hours worked: ");
hours = console.nextDouble();
wages = hours * RATE;
System.out.println("The calculated wages = " + wages);
}
}