Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description Remember that arrays are defined to hold collections of data that is of the same type. When using 1D arrays, we can work with

Description

Remember that arrays are defined to hold collections of data that is of the same type. When using 1D arrays, we can work with multiple arrays of different data types in parallel. For now, dont worry about creating classes or methods; simply create the arrays and loops to solve the problem. Your job is to create a simple program for a company that sells BBQ sauce. Follow the instructions below.

Directions

1.Using C# Begin an empty console application.

2. Create an array of strings to hold the names of the types of sauce that the company sells: Eastern Carolina, Western Carolina, Kansas City, SC Mustard, and Texas.

3. Create an empty array to store the price of each type of sauce.

4. Create an empty array to store the number of jars (of each sauce) that the company sold last year.

5. Write a loop that asks the user to enter the information to store in the price and number of jars array. Note: You can do this in one loop.

6. Output all arrays using the following format: Name, Price, and Number of Jars. (Each line should display all three pieces of information for each type of sauce).

7. Write a loop to find the most popular sauce that the company sells. Output the price and the name of this sauce, along with the number of jars that were sold.

8. Allow the user to search the array of names for a certain type of sauce. Note: you will need to ask the user what he wants to look for (you can assume the user knows the names). Display the price of the sauce that the user entered.

9. Sort and display the types of sauce by popularity, from the most to least popular.

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

=+ 5. Do Europeans work more or fewer hours than Americans?

Answered: 1 week ago