Question
Program in Java code pls!! Password Access: Modification use a method named check_pin(String pinNum), to determine if the user entered the correct pin. For the
Program in Java code pls!!
Password Access: Modification use a method named check_pin(String pinNum), to determine if the user entered the correct pin. For the user to gain access to the menu, they must enter a pin number (use pin 9999 for this first program). You will prompt the user for the pin number. If the pin is correct, then display the menu. If the pin is incorrect, end the program with a message Thank you for using our menu system.
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 (wage calculator) and 2 (tip calculator). In addition to using a function for the options, you will use a function for calculating the wages and return the value to the option function before continuing (name this function calc_wages). For the wage calculator, prompt for the users name and salary of an employee. Here the salary will denote an hourly wage, such as $9.25 (only an example). 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 users 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.
For the tip calculator, the tip is calculated based on the diners satisfaction level. The main function from part A shows the tip amount and satisfaction level. CHANGE: Also, print the diners final total with the tip included (formatted, also in dollars and cents). and another category for personal tip amount. Add another menu option (groceries) does nothing at this time
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