// 9/13/2017 /** The Payroll class calculates the Net Pay for two * employees. This is version 1 of the Payroll class. */ public class Payroll { /** * pay is calculated by multiplying hours times rate, and * then subtracting 11% for taxes. */ public static void main(String[] args) { final double TAXES = .11; // employees pay 11% income tax double taxes=0.0, rate=0.0; double hoursWorked=0; String name="John Doe"; rate=17; hoursWorked=10; double pay = rate * hoursWorked; taxes = TAXES*pay; pay-=taxes; System.out.println("Net pay for " + name + " is: $" + pay); // now process 2nd employee name="Alice Smith"; rate=23; hoursWorked=12.75; pay = rate * hoursWorked; taxes = TAXES*pay; pay-=taxes; System.out.println("Net pay for " + name + " is: $" + pay); } }