Question: java code Your goal is to record the sales for different types of soda and determine the total sales and the names of the highest

java code

Your goal is to record the sales for different types of soda

Your goal is to record the sales for different types of soda and determine the total sales and the names of the highest and lowest selling soda. Ask the user how many soda types of soda they want to sell. Do NOT accept negative values for this number. (2 points) Use the number that the user entered to execute a loop to enter the names of the sodas into a name array. (3 points) Loop through the soda name array asking the user for the number of bottles sold for each type of soda. Do not accept negative values for the number of bottles sold. Store these numbers into an integer array. (4 points) Display the total sales and the names of the highest selling and lowest selling sodas. (6 points) Example Output: How many types of soda would you like to enter: -1 How many types of soda would you like to enter: 3 Enter the name of soda type 1: Sprite Enter the name of soda type 1: Pepsi Enter the name of soda type 1: Mountain Dew Enter the number of Sprite bottles sold: -5 Enter the number of Sprite bottles sold: 125 Enter the number of Pepsi bottles sold: 107 Enter the number of Mountain Dew bottles sold: 203 Total Sold: 435 Highest Sold: Mountain Dew Lowest Sold: Pepsi

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 Programming Questions!