Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An employee is paid at a rate of $18.28 per hour for the first 40 hours worked in a week. Any hours over that are

An employee is paid at a rate of $18.28 per hour for the first 40 hours worked in a week. Any hours over that are paid at the overtime rate of one and a half times that. From the worker's gross pay, 6% is withheld for social security tax, 13% is withheld for federal income tax, 5% is withheld for state income tax, and $11 per week is withheld for union dues. If the worker has two or more dependents, then an additional $35 is withheld each week to cover the extra cost of health insurance beyond what the employer pays.

Remember: Use variables or named constants to store all numbers so that they can be changed later on if necessary. Do not repeat calculations unnecessarily! Test your program with different values for the variables to make sure it works in all scenarios!

Write a program in JAVA that stores the number of hours worked in a week and the number of dependants and then will output the worker's gross pay, each withholding amount, and the net take-home pay for the week.

Ask the user for the number of hours worked in a week and the number of dependents as input, and then print out the same information as in Part 1. Perform input validation to make sure the numbers entered by the user are reasonable (non-negative, not unusually large, etc).

Let the calculations repeat until the user wishes to quit the program.

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

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

1. Describe the power of nonverbal communication

Answered: 1 week ago

Question

How could assessment be used in an employee development program?

Answered: 1 week ago