Question: Java Programming . Please DONOT use built in fucntion . you can use arraylist,fuction, for, if . thank you Business P6.30 A supermarket wants to

Java Programming . Please DONOT use built in fucntion . you can use arraylist,fuction, for, if . thank you Java Programming . Please DONOT use built in fucntion . you can

Business P6.30 A supermarket wants to reward its best customer of each day, showing the custom- er's name on a screen in the supermarket. For that purpose, the customer's purchase amount is stored in an ArrayList Double and the customer's name is stored in a cor responding ArrayList Implement a method public static String nameOfBestCustomer(ArrayList customers) that returns the name of the customer with the largest sale. Write a program that prompts the cashier to enter all prices and names, adds them to two array lists, calls the method that you implemented, and displays the result price of 0 as a sentinel. Business P6.31 Improve the program of Exercise P6.30 so that it displays the top customers, that is, the topN customers with the largest sales, where topN is a value that the user of the program supplies Implement a method public static ArrayList customers, int topN) If there were fewer than topN customers, include all of them. Business P6.30 A supermarket wants to reward its best customer of each day, showing the custom- er's name on a screen in the supermarket. For that purpose, the customer's purchase amount is stored in an ArrayList Double and the customer's name is stored in a cor responding ArrayList Implement a method public static String nameOfBestCustomer(ArrayList customers) that returns the name of the customer with the largest sale. Write a program that prompts the cashier to enter all prices and names, adds them to two array lists, calls the method that you implemented, and displays the result price of 0 as a sentinel. Business P6.31 Improve the program of Exercise P6.30 so that it displays the top customers, that is, the topN customers with the largest sales, where topN is a value that the user of the program supplies Implement a method public static ArrayList customers, int topN) If there were fewer than topN customers, include all of them

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!