Question: 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 =

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

}

}

add overtime and write a Visual logic program or a flow diagram for it

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!