Question
Introduction to computer class, Java programming through eclipse: Ue the following criteria to create the code: SALARY Input first and last name - Output the
Introduction to computer class, Java programming through eclipse:
Ue the following criteria to create the code: SALARY
Input first and last name
- Output the names last, first in your output
- Make the federal withholding rate a constant 20% (not an input value)
No state tax
Generate two new values: regular pay and overtime pay
- 40 hours workedor less
- Regular pay is pay rate * hours worked
- Overtime pay is 0
Otherwise
- Regular pay is pay rate * 40
- Overtime is pay rate * (hours 40)* 1.5
- Gross pay is then regular pay + overtime pay
Output should be similar to the instructions in the bookexcept:
- Regular and overtime pay includedostate tax not included
- all currency should be rounded to 2 decimals
SAMPLE CODE:
Sample run: Enter first and last name: Fred Flintstone Enter hours worked: 40.25 Enter hourly pay rate: $36.00 Employee name: Flintstone, Fred Hours worked: 40.25 Hourly Rate: $36.00 Gross Pay: $1453.50 Regular Pay: $1440.00 Overtime Pay: $13.50 Deductions: Federal Tax: $290.70 Total deductions: $290.70 Net Pay: $1162.80
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started