1. Engineering
  2. Computer Science
  3. use java please code using a beginners approach do not...

Question: use java please code using a beginners approach do not...

Question details
USE JAVA. Please code using a beginners approach! Do not use advanced coding, please simplify.
.. Business P7.12 A supermarket wants to reward its best customer of each day Business P7.12 A supermarket wants to reward ts best customer of cachdax.showing the cus- tomers name on a screen in the supermarket. For that purpose, the store ke Arraylist Customers. In the Store class, implement methods eps an public String nameOfBestCustomer O to record the sale and return the name of the customer with the largest s Write a program that prompts the cashier to enter all prices and na a Store object, and displays the best customers name. Use a price of 0 as a sentinel. ale. mes, adds them to
import java.util.*: * Code for P7.12 * @author public class Store public String nameOfBestCustomer (ArrayList<Double> sales, ArrayList<String customers String top // task: store the name of the best customer into String variable top /1 Your work starts here // Your work ends here return top: public static void main(Stringil args) arrayList<Double> price new ArraylisrcDouble> 0: ArrayListくString> names-new ArrayList<String>(); scanner în = new Scanner (System.in); // task: use while loop to receive and store prices and last nanes from the console untii the sentinel price is recieved // Your work starts here
/I Your work ends here return top: public static void main (Stringtl args) ArrayList<Double> price new ArrayList<Double> 0: ArrayList<String> names . new ArrayList<String>(); Scanner in-new Scanner (Systen.in): /I task: use while loop to receive and store prices and last names from the console until the sentinel price 0 is recieved /1 Your work starts here /1 Your work ends here Store top new Stoze O System.our.printin (Best customers nane + top.nameOfBestcustoner (price, names)):
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution