Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please I need someone to solve this C++ programming - Create parallel arrays. - Populate the array with data using a loop. - Calculate statistics

Please I need someone to solve this C++ programming

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

- Create parallel arrays. - Populate the array with data using a loop. - Calculate statistics on the data in the array using some simple operations of C++. - Print the data and some additional information based on the calculations. \# 2 Program Requirements*t Your assignment is to create a program that does the following: 1. Create a pair of parallel arrays, each pair of elements with the same index go together. e.g. g[0] and s[0] contain related data. a. The first array has 12 strings, or characters (choose one) that will contain the month name/symbol. This array will hold the a unique identifier for each row*t of data. Give this array a logical name (see the style guide cplusplus.com). b. The second array has 12 doubles (e.g. 16279.25). This array will hold the total sales for the month. This array also needs a logical name. 2. Print a welcome message for your user_with your name in it. 3. Write a menu loop** to allow the user to input data into the arrays**. This can be a function. a. Show a menu with options to add an item, print the data, and exit now. b. Prompt the user to enter their choice. validate the input. c. Use a if..else if..else or a switch case statement to choose the right actions for the user's choice. If their choice is invalid, show an error message and repeat the menu. d. If they choose exit now, the program should end smoothly after doing the closing work below. 4. If the user chooses add data**, write a prompt to ask for the month name (or letter) and the total sales for that month on the same line. Validate the input. The program should return to the menu when the data is added. The user should enter the data like this: January 76321.56 5. If the user chooses print the data, write a loop to print the data from the two arrays in a table format. For example: 6. If the user chooses exit now**, do the following: a. Calculate the mean and median of this set of scores, save this information in a seperate variable. You should sort the data first and then find the median. **ints:** https://www.mathsisfun.com/median.html and https://www. mathsisfun.com/mean.html and https://www. toptal.com/developers/sorting-algorithms/bubble-sort b. Identify the top three months based on total sales. 5. Then write a loop** to print the data in from the two arrays in a table format but add a third column for results. The data can be sorted or left in the original order. a. In results, for the top three months, show "Outstanding Sales". b. In results, for all months with sales that are higher than the mean b. In results, tor all months with sales that are hugher than the mean (notice this is different from the median), show "Above Average Sales". c. After the table of data, print the average (mean) and median sales amounts in currency format (with a \$) and label them clearly. Example: The mean is $54280.32, and the median is $53781.50. 6. Follow Professional Standards: For details see the Programming Style Guide in Canvas. Use logical variable names and function names - do not make me guess. Greet the user with the name of the program and your name. Indicate that the program ended normally by saying Bye or Indent properly

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

Big Data 29th British National Conference On Databases Bncod 2013 Oxford Uk July 2013 Proceedings Lncs 7968

Authors: Dan Olteanu ,Georg Gottlob ,Christian Schallhart

2013th Edition

3642394663, 978-3642394669

More Books

Students also viewed these Databases questions

Question

Do you think it is difficult to manage metadata? Why or why not?

Answered: 1 week ago