Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2. (30 points) A supermarket wants to keep statistical data about itscustomers. For that purpose, they want you to write the following java program:

image text in transcribed

Question 2. (30 points) A supermarket wants to keep statistical data about itscustomers. For that purpose, they want you to write the following java program: (10 pts.) In this first part your code will prompt the cashier to enter all names and prices. Your code will take names to a string array list and prices to double array list. (Hint: Because of a Java bug, you may need to use two scanner objects, one for string and charinput, and one for double input) (10 pts. Write a method to calculate the average, and standard deviation of the customer prices. This method takes the prices as input and prints the average and standard deviation. Average = (pricel + price2 + ... +priceN)/N (Total number of customers). Standard deviation = sqrt (pricel - average) + (price2 - average)2 + ..+(priceN- average)2/N (Total number of customers)). (10 pts.) Sort customer names alphabetical order (from "A" to "Z"). Do not forget to change their prices position according to new ordering

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

Become familiar with coupling, cohesion, and connascence.

Answered: 1 week ago

Question

5. List the forces that shape a groups decisions

Answered: 1 week ago

Question

4. Identify how culture affects appropriate leadership behavior

Answered: 1 week ago