//Calculates the pay, after taxes for an employee import java.util.*; public class PayCalculator{ final static double OT_START = 40; final static double OT_ADJUST = 0.5; final static double TAX = 0.2; public static void main(String[] arg){ Scanner input = new Scanner(System.in); System.out.println("Please enter the total hours worked: "); int hours = input.nextInt(); System.out.println("Please enter the hourly rate: "); int payRate = input.nextInt(); System.out.println("The net pay is:$" + netpay); } //This method calculates the netpay private static double calculateNetPay(double hours, double rate){ double grosspay, overtime, netpay; grosspay = hours * rate; overtime = ((hours * rate) - OT_START) * OT_ADJUST; netpay = overtime + grosspay - TAX; return 0.0; //add so that sample will compile } }
Im trying to return the net pay... for some reason im lost