I am trying to edit a code we were given and it's not working for me when I incorporate the scanner code
Basically every place where the code says 'public static void', it says there is an illegal start of expression
I HAVE to use methods for this code I know there's an easier way but I can't do it that way and a lot of the times it says it can't read the reader.nextDouble
import java.util.Scanner;
public class Share {
private static double hourlyWage;
private static double regularHours;
private static double overtimeHours;
private static double regularPay;
private static double overtimePay;
private static double total;
public static void main(String Args[])
{
Scanner reader = new Scanner(System.in);
{
//method call statements
setHourlyWage();
setRegHours();
setOvertimeHours();
calcRegPay();
calcOvertimePay();
calcTotal();
printResults();
}
public static void setHourlyWage()
{
System.out.print("Enter Hourly Wage: ");
hourlyWage = reader.nextDouble();
}
public static void setRegHours() header lines
{
System.out.print("Enter Regular Hours: ");
regularHours = reader.nextDouble();
}
public static void setOvertimeHours()
{
System.out.print("Enter Overtime Hours: ");
overtimeHours = reader.nextDouble();
}
public static void calcRegPay()
{
regularPay = hourlyWage * regularHours;
}
public static void calcOvertimePay();
{
overtimePay = overtimeHours * 1.5 * hourlyWage;
}
public static void calcTotal();
{
total = hourlyWage * regularHours + (overtimeHours * 1.5 * hourlyWage);
}
public static void printResults();
{
System.out.print("The total regular pay is ");
System.out.println(regularPay);
System.out.print("The total overtime pay is ");
System.out.println(overtimePay);
System.out.print("The total weekly wage is ");
System.out.println(total);
}
}