Java Programming: 6.) Acme Parts runs a small factory and employs workers who are paid one of three hourly rates depending on their shift: first shift, $17 per hour; second shift, $18.50 per hour; third shift, $22 per hour. Each factory worker might work any number of hours per week; and hours greater than 40 are paid at one and one-half times the usual rate. In addition, second- and third shift workers can elect to participate in the retirement plan, for which 3 percent of the worker’s gross pay is deducted from the paychecks. Write a program that prompts the user for hours worked and the shift number; if the shift number is 2 or 3, prompt the user to enter the worker’s choice to participate in the retirement plan. Display (1) the hours, (2) the shift, (3) the hourly pay rate, (4) the regular pay, (5) overtime pay, (6) the total of regular and overtime pay, (7) the retirement deduction, if any, and (8) the net pay. Save the file as AcmePay.java. Input/output would be appreciated!

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Java Programming: 6.) Acme Parts runs a small factory and employs workers who are paid one of three hourly rates depending on their shift: first shift, $17 per hour; second shift, $18.50 per hour; third shift, $22 per hour. Each factory worker might work any number of hours per week; and hours greater than 40 are paid at one and one-half times the usual rate. In addition, second- and third shift workers can elect to participate in the retirement plan, for which 3 percent of the worker’s gross pay is deducted from the paychecks. Write a program that prompts the user for hours worked and the shift number; if the shift number is 2 or 3, prompt the user to enter the worker’s choice to participate in the retirement plan. Display (1) the hours, (2) the shift, (3) the hourly pay rate, (4) the regular pay, (5) overtime pay, (6) the total of regular and overtime pay, (7) the retirement deduction, if any, and (8) the net pay. Save the file as AcmePay.java. Input/output would be appreciated!
The output echoes the input
uuyRestRoom.java.
U all invalid code, display an appropriate message and set the price to 0.
139 for king, and $165 for a suite with a king bed and
b. Add a prompt to the ShadyRestRoom application to ask the user to specify a (1) lake view or a (2) park
view, but ask that question only if the bed size entry is valid. Add $15 to the price of any room with a lake
view. If the view value is invalid, display an appropriate message and assume that the price is for a room
with a lake view. Save the file as Shady RestRoom2.java.
4. Write a program for Horizon Phones, a provider of cellular phone service. Prompt a user for maximum monthly
values for talk minutes needed, text messages needed, and gigabytes of data needed, and then display a
recommendation for the best plan for the customer's needs. A customer who needs fewer than 500 minutes of talk
and no text or data should buy Plan A at $49 per month. A customer who needs fewer than 500 minutes of talk and
any text messages should buy Plan B at $55 per month. A customer who needs 500 or more minutes of talk and
no data should buy either Plan C for up to 100 text messages at $61 per month or Plan D for 100 text messages or
more at $70 per month. A customer who needs any data should buy Plan E for up to 3 gigabytes at $79 per month
or Plan F for 3 gigabytes or more at $87 per month. Save the file as CellPhoneService.java.
5.
a. Write an application that uses the LocalDate class to access the current date. Prompt a user for a
month, day, and year. Display a message that specifies whether the entered date is (1) not this year,
(2) in an earlier month this year, (3) in a later month this year, or (4) this month. Save the file as
Past PresentFuture.java.
b. Use the Web to learn how to use the LocalDate Boolean methods is Before (), isAfter (), and
equals (). Use your knowledge to write a program that prompts a user for a month, day, and year, and
then displays a message specifying whether the entered day is in the past, the current date, or in the
future. Save the file as Past PresentFuture2.java.
6. Acme Parts runs a small factory and employs workers who are paid one of three hourly rates depending on
their shift: first shift, $17 per hour; second shift, $18.50 per hour; third shift, $22 per hour. Each factory worker
might work any number of hours per week; any hours greater than 40 are paid at one and one-half times the
usual rate. In addition, second- and third-shift workers can elect to participate in the retirement plan, for which
Transcribed Image Text:The output echoes the input uuyRestRoom.java. U all invalid code, display an appropriate message and set the price to 0. 139 for king, and $165 for a suite with a king bed and b. Add a prompt to the ShadyRestRoom application to ask the user to specify a (1) lake view or a (2) park view, but ask that question only if the bed size entry is valid. Add $15 to the price of any room with a lake view. If the view value is invalid, display an appropriate message and assume that the price is for a room with a lake view. Save the file as Shady RestRoom2.java. 4. Write a program for Horizon Phones, a provider of cellular phone service. Prompt a user for maximum monthly values for talk minutes needed, text messages needed, and gigabytes of data needed, and then display a recommendation for the best plan for the customer's needs. A customer who needs fewer than 500 minutes of talk and no text or data should buy Plan A at $49 per month. A customer who needs fewer than 500 minutes of talk and any text messages should buy Plan B at $55 per month. A customer who needs 500 or more minutes of talk and no data should buy either Plan C for up to 100 text messages at $61 per month or Plan D for 100 text messages or more at $70 per month. A customer who needs any data should buy Plan E for up to 3 gigabytes at $79 per month or Plan F for 3 gigabytes or more at $87 per month. Save the file as CellPhoneService.java. 5. a. Write an application that uses the LocalDate class to access the current date. Prompt a user for a month, day, and year. Display a message that specifies whether the entered date is (1) not this year, (2) in an earlier month this year, (3) in a later month this year, or (4) this month. Save the file as Past PresentFuture.java. b. Use the Web to learn how to use the LocalDate Boolean methods is Before (), isAfter (), and equals (). Use your knowledge to write a program that prompts a user for a month, day, and year, and then displays a message specifying whether the entered day is in the past, the current date, or in the future. Save the file as Past PresentFuture2.java. 6. Acme Parts runs a small factory and employs workers who are paid one of three hourly rates depending on their shift: first shift, $17 per hour; second shift, $18.50 per hour; third shift, $22 per hour. Each factory worker might work any number of hours per week; any hours greater than 40 are paid at one and one-half times the usual rate. In addition, second- and third-shift workers can elect to participate in the retirement plan, for which
Downloads - Chapter5/src/AcmePay.java
- Eclipse IDE
File Edit Source Refactor Navigate Search Project Run Window Help
Package Explorer X 03:0
ShadyRestRoom.java
esc
Chapter5
src
→l
✓(default package)
> AcmePay.java
>
>
> JRE System Library [JavaSE-1.8]
> Person
Shady RestRoom.java
Shady RestRoom2.java
69°F
Mostly sunny
?
Q
(a)
12
2
W
f3
#
25
6
7
8
9)
1
2 public class Acme Pay (
3
40
3
10
*
E
}
public static void main(String[] args) {
// TODO Auto-generated method stub
f4
$
IDI
4
R
ShadyRestRoom2.java
60
%
5
Writable
16
T
0
AcmePay.java X
6
hp
4-
&
Smart Insert
Y
I
7
fe
4+
*
1:1:0
8
U
144
(
9
110
Transcribed Image Text:Downloads - Chapter5/src/AcmePay.java - Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help Package Explorer X 03:0 ShadyRestRoom.java esc Chapter5 src →l ✓(default package) > AcmePay.java > > > JRE System Library [JavaSE-1.8] > Person Shady RestRoom.java Shady RestRoom2.java 69°F Mostly sunny ? Q (a) 12 2 W f3 # 25 6 7 8 9) 1 2 public class Acme Pay ( 3 40 3 10 * E } public static void main(String[] args) { // TODO Auto-generated method stub f4 $ IDI 4 R ShadyRestRoom2.java 60 % 5 Writable 16 T 0 AcmePay.java X 6 hp 4- & Smart Insert Y I 7 fe 4+ * 1:1:0 8 U 144 ( 9 110
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY