Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello I need help with modifing this code. It is a working code but I need some

ID: 3646486 • Letter: H

Question

Hello I need help with modifing this code. It is a working code but I need some modifications on it. The following is what I need help with Modify your program to do the following: 1.From Previous programming project (If the sales associate selects option 1, the program should allow the sales associate to input their name, address, and e-mail address.Your program should then display this customer information to the screen with a message that the customer has been added to the customer list.)Modify your option 1 by adding the new customer information to an external file.(Hint*See Section 4.10 in the textbook) 2.Modify your program and add a new menu option for price lookup.If the sales associate selects the option for price lookup the program should allow the sales associate to choose a product from the following options: 1.Shoes 2.T-shirts 3.Shorts 4.Caps 5.Jackets Once they have selected the type of product the cost of the item will be displayed to the screen. 3.Modify your option 3, total bill so that the customer information is retrieved from the external file.Also, modify your program to retrieve the price of the product.
Your program should now ask the sales associate for the following information:customers name, the product and the quantity.The price should be retrieved from your program.The customer
Hello I need help with modifing this code. It is a working code but I need some modifications on it. The following is what I need help with Modify your program to do the following: 1.From Previous programming project (If the sales associate selects option 1, the program should allow the sales associate to input their name, address, and e-mail address.Your program should then display this customer information to the screen with a message that the customer has been added to the customer list.)Modify your option 1 by adding the new customer information to an external file.(Hint*See Section 4.10 in the textbook) 2.Modify your program and add a new menu option for price lookup.If the sales associate selects the option for price lookup the program should allow the sales associate to choose a product from the following options: 1.Shoes 2.T-shirts 3.Shorts 4.Caps 5.Jackets Once they have selected the type of product the cost of the item will be displayed to the screen. 3.Modify your option 3, total bill so that the customer information is retrieved from the external file.Also, modify your program to retrieve the price of the product.
Your program should now ask the sales associate for the following information:customers name, the product and the quantity.The price should be retrieved from your program.The customer

Explanation / Answer

This is the code you want: import java.util.Scanner; public class TelephoneBillAmount { private static float TAXRATE = 0.07f; private static float MINRATE = 0.05f; private static float FEES = 1.00f; public static void main(String[] args) { float customersBillAmount[] = new float[10]; int customersCount = 0; float compTotal = 0; int menuOption; Scanner kb = new Scanner(System.in); do { System.out.println("-----------------------------------------"); System.out.println("Customer Menu"); System.out.println("-----------------------------------------"); System.out.println(" 1) Enter customer information"); System.out.println(" 2) Print average bill information"); System.out.println(" 3) Exit"); System.out.print(" Choose an option: "); menuOption = kb.nextInt(); switch (menuOption) { case 1: System.out.println("-----------------------------------------"); System.out.println("New Customer Information"); System.out.println("-----------------------------------------"); kb.nextLine(); System.out.print("Customer Name: "); String custName = kb.nextLine(); System.out.print("Customer Email: "); String custEmail = kb.nextLine(); System.out.print("Min Used: "); int minUsed = kb.nextInt(); float billAmt = calculateTotalBill(minUsed); compTotal += billAmt; customersBillAmount[customersCount++] = billAmt; System.out.println(String.format("Total Bill Amount: %.2f ", billAmt)); break; case 2: System.out.println("-----------------------------------------"); System.out.println("Customers Statistics"); System.out.println("-----------------------------------------"); System.out.println(String.format("Total Customers Entered: %d", customersCount)); System.out.println(String.format("Total Bill Amount: %.2f", compTotal)); float avgBill = compTotal / (float) customersCount; System.out.println(String.format("Average Bill Amount: %.2f", avgBill)); break; } } while (menuOption != 3); } public static float calculateTotalBill(int minUsed) { float minAmt = minUsed * MINRATE; float taxAmt = minAmt * TAXRATE; float billAmt = minAmt + taxAmt + FEES; return billAmt; } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote