import java.util.*; public class Payroll { public static void main(String args[]

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));
}
}

The post import java.util.*;
public class Payroll
{
public static void main(String args[] appeared first on Assignmentio.

GET HELP WITH YOUR HOMEWORK PAPERS @ 25% OFF

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

Write My Paper Button

WeCreativez WhatsApp Support
We are here to answer your questions. Ask us anything!
👋 Hi, how can I help?
Scroll to Top