SE491 week 3 assignment
import java.util.*;
public class Payroll
{
public static void main(String args[])
{
String lastName;
double hours, netPay, grossPay;
double STD_PAYRATE = 15.50;
double WITHHOLDING_RATE = 0.20;
System.out.println("Enter employee last name: ");
Scanner input = new Scanner (System.in);
lastName = input.nextLine();
System.out.println("Enter hours worked for " + lastName +" >> ");
hours = input.nextDouble();
grossPay = hours * STD_PAYRATE;
netPay = grossPay - (grossPay * WITHHOLDING_RATE);
System.out.println("Net pay for " + lastName + " who worked for " +
hours + " hours is $" + String.format("%.2f",netPay));
}
}
5 years ago
10
Answer(1)![blurred-text]()
![]()
Purchase the answer to view it

NOT RATED
- Question1Code.docx
- Question1.docx
- ScreenShotQuestion2.docx