A supermarket wants to reward its best customer of each day


A supermarket wants to reward its best customer of each day, showing the customer's name on a screen in the supermarket. For that purpose, the customer's purchase amount is stored in an arraylist and the customer's name is stored in a corresponding arraylist.

Implement a method

Public static string nameofBestCustomer (array sales.

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 results. Use a price of 0 as a sentinel.

Must use constants, implement validations for numeric input and comment program.

Solution Preview :

Prepared by a verified Expert
Business Management: A supermarket wants to reward its best customer of each day
Reference No:- TGS01670057

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)