Question: Write a program that uses two parallel 5 element arrays: an array of strings that holds the five salsa names, and an array of

Write a program that uses two parallel 5 element arrays: an array of strings that holds the five salsa names,

Write a program that uses two parallel 5 element arrays: an array of strings that holds the five salsa names, and an array of integers that holds the number of jars sold during the past month for each salsa type. The salsa names should be stored using an initialization list at the time the name array is created. The program should prompt the user to enter the number of jars sold for each type. Validate the input by not accepting negative values for number of jars sold. Once this sales data has been entered, the program should produce a report that displays the number of jars sold for each salsa type, the total number of jars sold for all salsa types, and the names of the highest selling and lowest selling products. You are required to create 3 functions. One function should calculate the total number of jars sold for all types. The second function should find the position and the name of the highest selling salsa. The third function should find the position and the name of the lowest selling salsa. Note: Here is sample input and the report. C:\Qt\Tools\QtCreator\bin\qtcreator_process_stub.exe Jars sold last month of mild : 556 Jars sold last month of medium: 734 Jars sold last month of sweet : 230 Jars sold last month of hot : 652 Jars sold last month of zesty : 894 Name Salsa Sales Report mild medium Sweet hot zesty Jars Sold Total Sales: High Seller: zesty Low Seller: sweet 556 734 230 652 894 3066

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javautilScanner public class SalsaSalesProgram public static void mainString args String sals... View full answer

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 Computer Network Questions!