Write a menu-driven program that will give the user the three choices: 1) Wage calculator, 2)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. Example Program Execution Example output Calculator Menu Hello Ashley Long 1) Wage Calculator 2) Coupon Calculator 3) Exit Please enter your choice: 1 Your regular hours worked are 40. Your overtime ho urs worked are 4. Your regular pay: $3,048.00 Your overtime pay: $457.20 Your total pay: $3,505.20 Please enter your name: Ashley Long Please enter your hourly wage: 76.20 Please enter your hours worked: 44 Thank you for using the Wage Calculator Ashley! 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! 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. Example Program Execution Example output Calculator Menu Hello Ashley Long 1) Wage Calculator 2) Coupon Calculator 3) Exit Please enter your choice: 1 Your regular hours worked are 40. Your overtime ho urs worked are 4. Your regular pay: $3,048.00 Your overtime pay: $457.20 Your total pay: $3,505.20 Please enter your name: Ashley Long Please enter your hourly wage: 76.20 Please enter your hours worked: 44 Thank you for using the Wage Calculator Ashley! 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! 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. Example Program Execution Example output Calculator Menu Hello Ashley Long 1) Wage Calculator 2) Coupon Calculator 3) Exit Please enter your choice: 1 Your regular hours worked are 40. Your overtime ho urs worked are 4. Your regular pay: $3,048.00 Your overtime pay: $457.20 Your total pay: $3,505.20 Please enter your name: Ashley Long Please enter your hourly wage: 76.20 Please enter your hours worked: 44 Thank you for using the Wage Calculator Ashley! 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! 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. Example Program Execution Example output Calculator Menu Hello Ashley Long 1) Wage Calculator 2) Coupon Calculator 3) Exit Please enter your choice: 1 Your regular hours worked are 40. Your overtime ho urs worked are 4. Your regular pay: $3,048.00 Your overtime pay: $457.20 Your total pay: $3,505.20 Please enter your name: Ashley Long Please enter your hourly wage: 76.20 Please enter your hours worked: 44 Thank you for using the Wage Calculator Ashley! 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! 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. Example Program Execution Example output Calculator Menu Hello Ashley Long 1) Wage Calculator 2) Coupon Calculator 3) Exit Please enter your choice: 1 Your regular hours worked are 40. Your overtime ho urs worked are 4. Your regular pay: $3,048.00 Your overtime pay: $457.20 Your total pay: $3,505.20 Please enter your name: Ashley Long Please enter your hourly wage: 76.20 Please enter your hours worked: 44 Thank you for using the Wage Calculator Ashley! 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! 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. Example Program Execution Example output Calculator Menu Hello Ashley Long 1) Wage Calculator 2) Coupon Calculator 3) Exit Please enter your choice: 1 Your regular hours worked are 40. Your overtime ho urs worked are 4. Your regular pay: $3,048.00 Your overtime pay: $457.20 Your total pay: $3,505.20 Please enter your name: Ashley Long Please enter your hourly wage: 76.20 Please enter your hours worked: 44 Thank you for using the Wage Calculator Ashley! 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!
Expert Answer:
Answer rating: 100% (QA)
import javautilScanner public class JamarcusSmithProjectPartB public static Scanner scanner new S... View the full answer
Related Book For
Principles of Communications Systems, Modulation and Noise
ISBN: 978-8126556793
7th edition
Authors: Rodger E. Ziemer, William H. Tranter
Posted Date:
Students also viewed these organizational behavior questions
-
Write a menu-driven program that will give the user the three choices: 1) Wage calculator, 2) Tip Calculator, and 3) Exit. Class Name: Party Password Access: For the user to gain access to the menu,...
-
1. Consider the initial value problem (IVP) y' = ey+cos x, y(0)=0. The power series solution of the IVP is given by y(x) = ax + ax + a3x + ... a3. Use the method of direct substitution to determine...
-
Give the structure of an alkene that will give the following carbonyl compounds upon ozonolysis followed by reduction with (CH 3 ) 2 S. (a) CH 3 CHO only (b) CH 3 CHO and CH 3 CH 2 CHO (c) (CH 3 ) 2...
-
Data Set 14 in Appendix B lists highway fuel consumption amounts (mi/gal) for cars categorized by size (small, midsize, large). If we use those highway fuel consumption amounts arranged into the...
-
A group of 30-year-olds is interviewed to determine whether the type of music most listened to by people in their age category is independent of the geographic location of their residence. Use the...
-
An open water tank in air springs a leak at position-2 in Fig. 14-2, where the pressure due to the water at position-1 is 500 kPa. What is the velocity of escape of the water through the hole? Fig....
-
Use a dot plot to display the data, which represent the weights (in kilograms) of 20 polar bears. Organize the data using the indicated type of graph. Describe any patterns. 426 428 436 545 510 386...
-
The new director of special events at a large university has decided to completely revamp graduation ceremonies. Toward that end, a PERT chart of the major activities has been developed. The chart...
-
What do you think you can do in your leadership role to empower others? What is your definition of a servant leader? What are your personal leadership strengths? What roles do you allow fellow staff...
-
The Digital Guardian Company issues policies that protect clients from downtime costs due to computer system failures. It is very important to process the policies quickly because long cycle times...
-
Discussion question Getting It All Wrong (pages 302-303) - Share the basic concepts of "sell or process further" financial analysis decisions (please provide an example). - After reviewing "Getting...
-
(L05) Grant, a single taxpayer, has qualified business income and the following qualified business deductions after considering the wage limitation and the specified services limitation, generated...
-
Did You Know 2019 6:13 minutes https://www.youtube.com/watch?v=bTM06NZOyDQ&t=3s This video helps us visualize the rate of technical change in the environment. Choose one fact and discuss how it may...
-
The nation of Pecunia had a current account deficit of $1 billion and a nonreserve financial account surplus of $500 million in 2021. a. What was the balance of payments of Pecunia in that year? What...
-
The purpose of this exercise is to explore the portrayal of organizational behaviour on television. Most experts on the function of TV as a communication medium agree on two points. First, although...
-
The purpose of this exercise is to learn about an organization that has implemented advanced information technology and the effect it has had on organizational structure and job design. This exercise...
-
For more than 10 years you have been a human resources manager at a welding and machining company that has remained fairly stable. The business has 20-25 employees, most of whom have been with the...
-
You have accepted the engagement of auditing the financial statements of the C. Reis Company, a small manufacturing firm that has been your auditee for several years. Because you were busy writing...
-
An attenuator with loss L 1 is followed by an amplifier with noise figure F and gain G a = 1 /L. (a) Find the noise figure of the cascade at tempera true T 0 . (b) Consider the cascade of two...
-
A channel of bandwidth 1 MHz with N 0 = 10 -9 W/Hz is available through which it is desired to transmit data with an M-ary communication system at 4 Mbps. (a) What are candidate modulation schemes?...
-
Write a MATLAB simulation of GMSK that will simulate the modulated waveform. From this, compute and plot the power spectral density of the modulated waveform. Include the special case of ordinary MSK...
-
Oxygen at \(30{ }^{\circ} \mathrm{C}\) and \(300 \mathrm{kPa}\) absolute pressure expands isothermally to an absolute pressure of \(120 \mathrm{kPa}\). Determine the final density of the gas.
-
Compare the isentropic bulk modulus of air at \(101 \mathrm{kPa}\) (abs) with that of water at the same pressure.
-
Natural gas at \(70{ }^{\circ} \mathrm{F}\) and standard atmospheric pressure of 14.7 psi (abs) is compressed isentropically to a new absolute pressure of 70 psi. Determine the final density and...
Study smarter with the SolutionInn App