Answer:
import java.util.Scanner;
public class WeeklySalary {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter Hourly wage");
double hourlyWage = in.nextDouble();
System.out.println("Enter total hours worked in the week");
int hoursWorked = in.nextInt();
int overtime = hoursWorked - 40;
double weeklyWage = 40*hourlyWage;
System.out.println("Total Over Time Hours is: "+overtime);
double overTimeWage = overtime*(hourlyWage*1.5);
System.out.println("Wage for full time: "+ weeklyWage);
System.out.println("Wage for over time: "+ overTimeWage);
}
}
Explanation: