CSCI 140/L Java Project: Menu-Driven System Part A Write a menu-driven program that will give the user the three choices: 1) Wage calculator, 2) Coupon Calculator, and 3) Exit. Class Name: PartA Wage Calculator: For the wage calculator, prompt for the name and hourly pay rate of an employee. Here the hourly pay rate is a floating-point number, such as $9.25. Then ask how many hours the employee worked in the past week. Be sure to accept fractional hours. Compute the pay. Any overtime work (over 40 hours per week) is paid at 150 percent of the regular wage (1.5 the hourly pay rate). Print the employee's name, regular hours worked, regular hours pay, overtime hours worked (do not show overtime hours, if there are none), overtime hours pay (do not show overtime pay if there is none), and total pay. [Do not prompt for overtime hours] Coupon Calculator: For the coupon caleculator, the total coupon amount is calculated based on the type of items purchased. Ask for the shopper's total purchase amount. Then show the following options to determine coupon amount: 1=Auto Parts, 2=Fragrances, 3=Accessories. If the choice is 1, calculate a 10 percent coupon. If the choice is 2, calculate a 15 percent coupon. If the choice is 3, calculate a 20 percent coupon. Print the choice and coupon amount in dollars and cents. [Format: "Your coupon is $10.00 (Auto Parts) "] Exit: The exit choice will display a statement that the program will end and thank the user for using the program. [They must choose to exit the menu, not default out – it is a menu option] Your program should be complete and with correct convention (ie. variable naming and declaration/NO on-the-fly declarations) and commenting (correct header with well-formed pseudocode). To obtain 50 of 100 points, your program must compile and begin execution. You will obtain 30 points if your program runs correctly. You will obtain 20 points for all other convention and commenting (this includes file and class naming convention). All output should be properly formatted and user friendly. Your program should NOT loop on the menu (we will execute the program for each option). Once complete, you will submit your .java file using the ProjectPartA link in Moodle. See the next page for an example program execution.
CSCI 140/L Java Project: Menu-Driven System Part A Write a menu-driven program that will give the user the three choices: 1) Wage calculator, 2) Coupon Calculator, and 3) Exit. Class Name: PartA Wage Calculator: For the wage calculator, prompt for the name and hourly pay rate of an employee. Here the hourly pay rate is a floating-point number, such as $9.25. Then ask how many hours the employee worked in the past week. Be sure to accept fractional hours. Compute the pay. Any overtime work (over 40 hours per week) is paid at 150 percent of the regular wage (1.5 the hourly pay rate). Print the employee's name, regular hours worked, regular hours pay, overtime hours worked (do not show overtime hours, if there are none), overtime hours pay (do not show overtime pay if there is none), and total pay. [Do not prompt for overtime hours] Coupon Calculator: For the coupon caleculator, the total coupon amount is calculated based on the type of items purchased. Ask for the shopper's total purchase amount. Then show the following options to determine coupon amount: 1=Auto Parts, 2=Fragrances, 3=Accessories. If the choice is 1, calculate a 10 percent coupon. If the choice is 2, calculate a 15 percent coupon. If the choice is 3, calculate a 20 percent coupon. Print the choice and coupon amount in dollars and cents. [Format: "Your coupon is $10.00 (Auto Parts) "] Exit: The exit choice will display a statement that the program will end and thank the user for using the program. [They must choose to exit the menu, not default out – it is a menu option] Your program should be complete and with correct convention (ie. variable naming and declaration/NO on-the-fly declarations) and commenting (correct header with well-formed pseudocode). To obtain 50 of 100 points, your program must compile and begin execution. You will obtain 30 points if your program runs correctly. You will obtain 20 points for all other convention and commenting (this includes file and class naming convention). All output should be properly formatted and user friendly. Your program should NOT loop on the menu (we will execute the program for each option). Once complete, you will submit your .java file using the ProjectPartA link in Moodle. See the next page for an example program execution.
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...
Related questions
Question
![Example Program Execution
Example output
Calculator Menu
Hello Ashley Long
1) Wage Calculator
Your regular hours worked are 40. Your overtime ho
| 2) Coupon Calculator
urs worked are 4.
Your regular pay: $3,048.00
Your overtime pay: $457.20
3) Exit
Please enter your choice: 1
Please enter your name: Ashley Long
Your total pay: $3,505.20
Please enter your hourly wage: 76.20
Thank you for using the Wage Calculator Ashley!
Please enter your hours worked: 44
Have a great day!
Calculator Menu
1) Wage Calculator
2) Coupon Calculator
3) Exit
Please enter your choice: 2
Please enter your purchase amount $: 100.00
Please enter purchase type (1=Auto Parts, 2=Fragrances, 3=Accessories): 1
Your coupon amount is $10.00 (Auto Parts).
Thank you for using the Coupon Calculator!
Have a great day!
Calculator Menu
1) Wage Calculator
2) Coupon Calculator
3) Exit
This program will now end.
Please enter your choice: 3
Thank you for using our program!](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F56d518f4-6728-46d4-b128-6a2cbf0d4d38%2Fcc93d1d9-1a7f-4aa6-8bcf-dab152d3a5db%2Fw8yqhi_processed.png&w=3840&q=75)
Transcribed Image Text:Example Program Execution
Example output
Calculator Menu
Hello Ashley Long
1) Wage Calculator
Your regular hours worked are 40. Your overtime ho
| 2) Coupon Calculator
urs worked are 4.
Your regular pay: $3,048.00
Your overtime pay: $457.20
3) Exit
Please enter your choice: 1
Please enter your name: Ashley Long
Your total pay: $3,505.20
Please enter your hourly wage: 76.20
Thank you for using the Wage Calculator Ashley!
Please enter your hours worked: 44
Have a great day!
Calculator Menu
1) Wage Calculator
2) Coupon Calculator
3) Exit
Please enter your choice: 2
Please enter your purchase amount $: 100.00
Please enter purchase type (1=Auto Parts, 2=Fragrances, 3=Accessories): 1
Your coupon amount is $10.00 (Auto Parts).
Thank you for using the Coupon Calculator!
Have a great day!
Calculator Menu
1) Wage Calculator
2) Coupon Calculator
3) Exit
This program will now end.
Please enter your choice: 3
Thank you for using our program!
![CSCI 140/L Java Project: Menu-Driven System Part A
Write a menu-driven program that will give the user the three choices: 1) Wage calculator, 2)
Coupon Calculator, and 3) Exit. Class Name: PartA
Wage Calculator: For the wage calculator, prompt for the name and hourly pay rate of an
employee. Here the hourly pay rate is a floating-point number, such as $9.25. Then ask how
many hours the employee worked in the past week. Be sure to accept fractional hours. Compute
the pay. Any overtime work (over 40 hours per week) is paid at 150 percent of the regular wage
(1.5 the hourly pay rate). Print the employee's name, regular hours worked, regular hours pay,
overtime hours worked (do not show overtime hours, if there are none), overtime hours pay (do
not show overtime pay if there is none), and total pay. [Do not prompt for overtime hours]
Coupon Calculator: For the coupon calculator, the total coupon amount is calculated based on
the type of items purchased. Ask for the shopper's total purchase amount. Then show the
following options to determine coupon amount: 1=Auto Parts, 2=Fragrances, 3=Accessories. If
the choice is 1, calculate a 10 percent coupon. If the choice is 2, calculate a 15 percent coupon. If
the choice is 3, calculate a 20 percent coupon. Print the choice and coupon amount in dollars and
cents. [Format: “Your coupon is $10.00 (Auto Parts) "]
Exit: The exit choice will display a statement that the program will end and thank the user for
using the program. [They must choose to exit the menu, not default out – it is a menu option]
Your program should be complete and with correct convention (ie. variable naming and
declaration/NO on-the-fly declarations) and commenting (correct header with well-formed
pseudocode). To obtain 50 of 100 points, your program must compile and begin execution. You
will obtain 30 points if your program runs correctly. You will obtain 20 points for all other
convention and commenting (this includes file and class naming convention). All output should
be properly formatted and user friendly. Your program should NOT loop on the menu (we will
execute the program for each option).
Once complete, you will submit your java file using the ProjectPartA link in Moodle. See the
next page for an example program execution.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F56d518f4-6728-46d4-b128-6a2cbf0d4d38%2Fcc93d1d9-1a7f-4aa6-8bcf-dab152d3a5db%2F442g0if_processed.png&w=3840&q=75)
Transcribed Image Text:CSCI 140/L Java Project: Menu-Driven System Part A
Write a menu-driven program that will give the user the three choices: 1) Wage calculator, 2)
Coupon Calculator, and 3) Exit. Class Name: PartA
Wage Calculator: For the wage calculator, prompt for the name and hourly pay rate of an
employee. Here the hourly pay rate is a floating-point number, such as $9.25. Then ask how
many hours the employee worked in the past week. Be sure to accept fractional hours. Compute
the pay. Any overtime work (over 40 hours per week) is paid at 150 percent of the regular wage
(1.5 the hourly pay rate). Print the employee's name, regular hours worked, regular hours pay,
overtime hours worked (do not show overtime hours, if there are none), overtime hours pay (do
not show overtime pay if there is none), and total pay. [Do not prompt for overtime hours]
Coupon Calculator: For the coupon calculator, the total coupon amount is calculated based on
the type of items purchased. Ask for the shopper's total purchase amount. Then show the
following options to determine coupon amount: 1=Auto Parts, 2=Fragrances, 3=Accessories. If
the choice is 1, calculate a 10 percent coupon. If the choice is 2, calculate a 15 percent coupon. If
the choice is 3, calculate a 20 percent coupon. Print the choice and coupon amount in dollars and
cents. [Format: “Your coupon is $10.00 (Auto Parts) "]
Exit: The exit choice will display a statement that the program will end and thank the user for
using the program. [They must choose to exit the menu, not default out – it is a menu option]
Your program should be complete and with correct convention (ie. variable naming and
declaration/NO on-the-fly declarations) and commenting (correct header with well-formed
pseudocode). To obtain 50 of 100 points, your program must compile and begin execution. You
will obtain 30 points if your program runs correctly. You will obtain 20 points for all other
convention and commenting (this includes file and class naming convention). All output should
be properly formatted and user friendly. Your program should NOT loop on the menu (we will
execute the program for each option).
Once complete, you will submit your java file using the ProjectPartA link in Moodle. See the
next page for an example program execution.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY