Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

what am i doing wrong? im teying to make a code to produce the bottom picture! public class ActivityiPayStub public static final double OVERTIME_RATE -

what am i doing wrong? im teying to make a code to produce the bottom picture! image text in transcribed
image text in transcribed
public class ActivityiPayStub public static final double OVERTIME_RATE - 1.5; It all starts with the main method. * @param args command line arguments (not used) public static void main(String[] args) Scanner keyboard = new Scanner(System.in); System.out.print("Enter employee name: "); String employeeName - keyboard.nextLine(); Scanner keyboard1 - new Scanner(System.in); System.out.print("Enter employee SSN (incl. hyphens: "); String socialSecurity - keyboard.nextLine(): Scanner keyboard2 - new Scanner(System.in); System.out.print("Enter number of regular hours worked: "); double regular Hours - keyboard.nextDouble(); Scanner keyboard3 = new Scanner(System.in); System.out.print("Enter number of overtime hours worked: "); double overtimehours - keyboard.nextDouble(); Scanner keyboard4 = new Scanner(System.in); System.out.print("Enter hourly pay rate: "); double regularpay - keyboard.nextDouble(); String format - "Name: %-375 SAN: X-11s "; System.out.printf(format, employee Name, social Security); String format 1 - "Regular Hours: X-8s Reg Rate: 5%-85 Reg Pay: "; System.out.printf(formati, regular Hours, regularRate, regular Pay); String format 2 - "Overtine Hours: %-8s OT Rate: $-Bs OT Pay: Sin": System.out.printf(format2, overTinehours, overTimeRate, overTimePay); String for at3 - "Gross Pay: $ "; System.out.printf(format 3, grossPay); String format 4 --SS withholding: $ ": System.out.printf(format4, sswithholding); String formats - "Federal Taxi sin": System.out.printf(formats, federalTax); String formato - "Net Pay: Sin"; double regularRate - keyboard.nextDouble double regular Pay - keyboard.nextDouble(); double overTimeRate - keyboard.nextDouble(); double overTinePay - keyboard.nextDouble(); double grossPay - (regularPay regular Hours); double sswithholding - (grossPay 0.10); double federalTax - (grossPay - sswithholding - 0.28) Enter employee name: Liga Enter employee SSN (incl. hyphens) : 333-33-3333 Enter number of regular hours worked: 10 Enter number of overtime hours worked: 0 Enter hourly pay rate: 5.0 Reg Rate: $15.00 OT Rate: $22.50 SSN: 222-22-2222 Reg Pay: $600.00 OT Pay: $337.50 Name: Marge Regular Hours: 40 Overtime Hours: 15 Gross Pay: $937.50 SS Withholding: $93.75 Federal Tax: $168.75 Net Pay: $675.00 New gross pay: $1250.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions

Question

How is Karen Slagles argument an example of confirmation bias?

Answered: 1 week ago