For this assignment, write a program called Payday.java that will compute and print a person's paycheck. The program will ask the user for the number of hours they worked and their hourly payrate. It will ask the person if they are a union member, in which case 5% of the salary will be withheld for union dues. It will ask the person if the percentage they wish to set aside for their medical savings account. It will then apply a sliding tax scale, defined as follows: Greater than or equal to $2,500 $1,500 up to $2,500 $500 up to $1,500 Less than $500 25% 15% 10% 5% The program must then print a formatted paycheck that shows their gross pay, union deduction, medical deduction, taxes withheld, and net pay. Use a function to determine the tax rate. Use a different function to print the nicely formatted paycheck. Your program should operate like this: Payday V1.0 Enter name: Ray Klump Enter hours worked: 43.25 Enter hourly pay rate: 17.50 Are you a union member (y or n)? y What percentage do you want to withhold for your medical savings account? 5.25 --PAYCHECK --- $ 756.88 Gross Pay Union dues $ 37.84 Med Witholding $ 39.74 Taxes $ 67.93 Net Pay $ 611.37 Prepared for Ray Klump Thank you for using this program.
For this assignment, write a program called Payday.java that will compute and print a person's paycheck. The program will ask the user for the number of hours they worked and their hourly payrate. It will ask the person if they are a union member, in which case 5% of the salary will be withheld for union dues. It will ask the person if the percentage they wish to set aside for their medical savings account. It will then apply a sliding tax scale, defined as follows: Greater than or equal to $2,500 $1,500 up to $2,500 $500 up to $1,500 Less than $500 25% 15% 10% 5% The program must then print a formatted paycheck that shows their gross pay, union deduction, medical deduction, taxes withheld, and net pay. Use a function to determine the tax rate. Use a different function to print the nicely formatted paycheck. Your program should operate like this: Payday V1.0 Enter name: Ray Klump Enter hours worked: 43.25 Enter hourly pay rate: 17.50 Are you a union member (y or n)? y What percentage do you want to withhold for your medical savings account? 5.25 --PAYCHECK --- $ 756.88 Gross Pay Union dues $ 37.84 Med Witholding $ 39.74 Taxes $ 67.93 Net Pay $ 611.37 Prepared for Ray Klump Thank you for using this program.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Use java.

Transcribed Image Text:For this assignment, write a program called Payday.java that will compute and print a person's
paycheck. The program will ask the user for the number of hours they worked and their hourly payrate.
It will ask the person if they are a union member, in which case 5% of the salary will be withheld for
union dues. It will ask the person if the percentage they wish to set aside for their medical savings
account. It will then apply a sliding tax scale, defined as follows:
Greater than or equal to $2,500
$1,500 up to $2,500
$500 up to $1,500
25%
15%
10%
Less than $500
5%
The program must then print a formatted paycheck that shows their gross pay, union deduction,
medical deduction, taxes withheld, and net pay.
Use a function to determine the tax rate. Use a different function to print the nicely formatted
paycheck.
Your program should operate like this:
Payday V1.0
Enter name: Ray Klump
Enter hours worked: 43.25
Enter hourly pay rate: 17.50
Are you a union member (y or n)? y
What percentage do you want to withhold for your medical savings account? 5.25
--PAYCHECK -
$ 756.88
Gross Pay
Union dues
37.84
Med Witholding $
39.74
Тахes
$
67.93
Net Pay
$ 611.37
Prepared for Ray Klump
Thank you for using this program.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images

Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education