Question
1. An employee is paid at a rate of $16.78 per hour for regular hours worked in a week. Any hours over that are paid
1. An employee is paid at a rate of $16.78 per hour for regular hours worked in a week. Any hours over that are paid at the overtime rate of one and one-half times that. From the workers gross pay, 6% is withheld for Social Security tax, 14% is withheld for federal income tax, 5% is withheld for state income tax, and $10 per week is withheld for union dues. If the worker has three or more dependents, then an additional $35 is withheld to cover the extra cost of health insurance beyond what the employer pays. Write a Java program that will read in the number of hours worked in a week and the number of dependents as input and that will then output the workers gross pay, each withholding amount, and the net take-home pay for the week. (Please include comments)
2. Write a Java program that will read a line of text as input and then display the line with the first word moved to the end of the line. For example, a possible sample interaction with the user might be
Enter a line of text. No punctuation please.
Java is the language
I have rephrased that line to read:
Is the language Java
Assume that there is no space before the first word and that the end of the first word is indicated by a blank, not by a comma or other punctuation. Note that the new first word must begin with a capital letter.
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