Question: You will create two small programs this week utilizing array concepts from the Array review presentation, review lecture and material from our current textbook. Program

 You will create two small programs this week utilizing array concepts

You will create two small programs this week utilizing array concepts from the Array review presentation, review lecture and material from our current textbook. Program #1: Write a program that lets a maker of chips and salsa keep track of sales for five different types of salsa: mild, medium, sweet, hot and zesty. The program should use two parallel 5-element arrays: an array of strings that holds the five salsa names, and an array of intergeters 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 of the name array is created. The program should prompt the user to enter the number of jars sold for each type. Once this sales data has been entered, the program should produce a report that displays sales for each salsa types, total sales, and the names of the highest selling and lowest selling products. Input validation: Do no accept negative values for the number of jars sold. Program #2: Magic 8 Ball Wirte a program that simulates a Magic 8 Ball, which is a fortune-telling toy that displays a random response to a yes or no question. The program should include the following responses: Yes, of course! Without a doubt, yes. You can count on it. For sure! Ask me later. I'm not sure. I can't tell you right now. I'll tell you after my nap. No Way! I don't think so. Without a doubt, no. The answer is clearly NO! The program should read the responses from a text file into an array or vector. It should prompt the user to ask a question, and then display one of the responses, randomly selected from the array or vector. The program should repeat until the user is ready to quit

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