Write a program that reads in the hourly wage of an employee. Then ask how many hours the employee worked in the past week. Be sure to accept fractional hours. Compute the pay. Any overtime work (over 40 hours per week) is paid at 150 percent of the regular wage. Solve this problem by implementing a class Paycheck.

Complete the following file:


Use the following file:


import java.util.Scanner;

   This program calculates the pay of an employee.
public class PayCalculator
   public static void main(String[] args)
      Scanner in = new Scanner(System.in);
      System.out.println("Hourly wage: ");
      double hourlyWage = in.nextDouble();

      System.out.println("Hours worked: ");
      double hours = in.nextDouble();

      PayCheck aPayCheck = new PayCheck(hourlyWage, hours);

      System.out.println("Pay: " + aPayCheck.getPay());