Question
**The programming language is Java*** PART A: Write a menu-driven program that will give the user the three choices: 1) Pay Calculator, 2) Bonus Calculator,
**The programming language is Java***
PART A: Write a menu-driven program that will give the user the three choices: 1) Pay Calculator, 2) Bonus Calculator, and 3) Exit. Pay Calculator Prompt for the employees name and salary of an employee. Here the salary will denote an hourly wage, 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 overtime pay). Print the employees name, hours worked, overtime hours worked (do not show overtime, if there is none), regular hours pay, overtime hours pay (do not show overtime pay if there is none), and total pay. Bonus Calculator A company rewards salespeople for the number of sales over 5 and if the average sale is over $500. Prompt for the employees name, number of sales, and total sales amount. For every sale over 5 the employee is awarded $25. If the average sale is more than $500, employees are awarded 20% of the amount over $500 (e.g. the average is $750, the employee's would be awarded 20% of $250). Print the employees name, number of sales, . total sales amount, average sales amount, bonus on number of sales, bonus on average sale, and total bonus amount. The exit choice will display a statement that the program will end and thank the user for using the program. Your program should be complete and with correct convention and commenting. To obtain 50 of 100 points, your program must compile and run. 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).
PART B : Adding loops and methods to our Part A menu-driven program that will give the user the three choices: 1) Pay Calculator, 2) Bonus Calculator, and 3) Exit. Modification: The program will loop on the menu (allow user to continue to choose option 1 and option 2) until the user chooses option 3. You will also implement the use of methods/functions for options 1 (pay calculator) and 2 (bonus calculator). In addition to using a function for the options, you will use a function for calculating the pay (calc_pay) and bonus (calc_bonus). Pay Calculator Prompt for the employees name and salary of an employee. Here the salary will denote an hourly wage, such as $9.25. Then ask how many hours the employee worked in the past week. Be sure to accept fractional hours. CHANGE: The user can ONLY enter a maximum of 40 hours for regular pay. If the user has worked more than 40 hours, ask for the number of overtime hours. Compute the pay. Any overtime work (over 40 hours per week) is paid at 150 percent of the regular wage (1.5 the overtime pay). Print the employees name, hours worked, overtime hours worked (do not show overtime, if there is none), regular hours pay, overtime hours pay (do not show overtime pay if there is none), and total pay. Bonus Calculator A company rewards salespeople for the number of sales over 5 and if the average sale is over $500. Prompt for the employees name, number of sales, and total sales amount. For every sale over 5 the employee is awarded $25. CHANGE: For every sale over 10 the employee is awarded $50. For every sale over 15 the employee is awarded $100. If the average sale is more than $500, employees are awarded 20% of the amount over $500 (e.g. the average is $750, the employees would be awarded 20% of $250). Print the employees name, number of sales, total sales amount, average sales amount, bonus on number of sales, bonus on average sale, and total bonus amount. The exit choice will display a statement that the program will end and thank the user for using the program. Your program should be complete and with correct convention and commenting. To obtain 50 of 100 points, your program must compile and run. 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) ** I ONLY NEED THE ANSWER TO PART C PLEASE AND THANK YOU!**
Adding Arrays and File Input/Output to our Part B menu-driven program that will give the user the following choices: Pay Calculator, Bonus Calculator, Wage Report, Bonus Report and Exit. Modification: Your program will now be able to store multiple records for calculating wages and tips. To do so, add the following: For the pay calculator: after gathering the requested information and calculating the pay, store the individual's information to a file (with labels) in a single line. You cannot loop within the task, so just add one entry and return to the menu. This builds on Part B so include that information and any new requirements listed below. [This will require a little thought to work with modification C below] For the bonus calculator: store each name and total bonus in a 2 dimensional array. Add a new menu item that will show a report in the console of all individuals whose pay you calculated. You will need to read the information from the file and format to make it easier to read on the screen with the employee's name listed first and each data element listed on a separate line along with a label. There should be two lined between each record. Add a menu item that will provide a listing of all earned bonus amounts sorted largest to smallest along with the name of the employee. At the end, include a total amount of all bonuses as well. For the exit option, ask the user if they are sure they want to exit. If they do not, return to the menu and continue per usual. If they want to continue, display the number of wages calculated and the number of groceries sold. Once you show these messages, then display a "Thank you message" for using the program. All boundaries should be tested. This means a user should not be able to enter negative numbers for any input (input validation) or values outside of the bounds of requirements. **Remember to follow minimum requirements from Part B and make any necessary modifications accordingly. Your program should be complete and with correct convention and commenting. To obtain 50 of 100 points, your program must compile and run. 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)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