Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you help me with this program its in c++ EGR 126 Program 10 - Stat:s The objective of this Program is to process and

Can you help me with this program its in c++

image text in transcribed

image text in transcribedimage text in transcribedimage text in transcribed

EGR 126 Program 10 - Stat:s The objective of this Program is to process and determine statistics for several different data sets, as well as process and determine statistics for a data set formed by combining all the input data sets into one data set. This program is a required program for the course. The score on this program will not be dropped when calculating the final course grade. The program will input the individual data sets from different files, process each data set in order, and will save the data values to form a combined data set. The combined data set wll then be processed in the same manner as the individual data sets. For each data set input to the program, as well as for the combined data set, the following information will be printed the unsorted data, as input to the program or as saved into the array for the combined data set the sorted data, from smallest to largest values the mean of the data set the median of the data set the mode of the data set, including cases of bimodal data You should use a loop to process the data sets, using the same array repeatedly for each input data set. As you complete the processing of each array, move the data into another array that will hold all of the combined data. You should not use a separate array for each data set. You may use vectors instead of arrays if you choose. Do not combine the data sets into one file. Do not make a fourth file containing the combined data set Do not re-read the values from the files when forming the array of combined values. You may design your program to expect any data set will be no larger than 100 elements, and thus the combined data set would be no greater than 300 elements Potentially your program could process several different data sets, though you will only use the 3 sets provided for your submission. Design your program for generality: The code should not need to be changed if you were asked to run this program with 4 different data sets, or with 10 different data sets, or even 100 different data sets (except maybe change the dimensions of the arrays used). Your output should contain a print of both the unsorted data values and the sorted data values as well as the mean, median, and mode values of each of the input data sets, as well as for the combined data set. For compactness, print the output in an arrangement of columns, rather than one element per line. Make sure everything is well labeled and clear Your program should have the following functions A function to print an array You will call this function to print an unsorted array, and then a second time to print a sorted array A function to sort an array A function to calculate the mean A function to calculate the median A function to calculate the mode You may use other functions as desired. You do not need to write your own functions, particularly the ones to sort the array, or to calculate the mode. You may use routines given in the course documents, from the textbook, or from another source Document the source of any routine that you did not write, including any comments on use and/or modifications. For submission, run the program with the data sets PI0statdata/.txt P10statdata2.txt and P/0statdata3 txt ?n Blackboard. These data sets are set up with a sentinel of-999 at the end, and each contain a different number of numbers. Do not change or combine these files. The data filenames should be read into your program, and the program is only run once. You should strive to demonstrate your programming prowess. Be sure to include sufficient comments. Uplated 5/27/2017 Page 1 of 1 EGR 126 Program 10 - Stat:s The objective of this Program is to process and determine statistics for several different data sets, as well as process and determine statistics for a data set formed by combining all the input data sets into one data set. This program is a required program for the course. The score on this program will not be dropped when calculating the final course grade. The program will input the individual data sets from different files, process each data set in order, and will save the data values to form a combined data set. The combined data set wll then be processed in the same manner as the individual data sets. For each data set input to the program, as well as for the combined data set, the following information will be printed the unsorted data, as input to the program or as saved into the array for the combined data set the sorted data, from smallest to largest values the mean of the data set the median of the data set the mode of the data set, including cases of bimodal data You should use a loop to process the data sets, using the same array repeatedly for each input data set. As you complete the processing of each array, move the data into another array that will hold all of the combined data. You should not use a separate array for each data set. You may use vectors instead of arrays if you choose. Do not combine the data sets into one file. Do not make a fourth file containing the combined data set Do not re-read the values from the files when forming the array of combined values. You may design your program to expect any data set will be no larger than 100 elements, and thus the combined data set would be no greater than 300 elements Potentially your program could process several different data sets, though you will only use the 3 sets provided for your submission. Design your program for generality: The code should not need to be changed if you were asked to run this program with 4 different data sets, or with 10 different data sets, or even 100 different data sets (except maybe change the dimensions of the arrays used). Your output should contain a print of both the unsorted data values and the sorted data values as well as the mean, median, and mode values of each of the input data sets, as well as for the combined data set. For compactness, print the output in an arrangement of columns, rather than one element per line. Make sure everything is well labeled and clear Your program should have the following functions A function to print an array You will call this function to print an unsorted array, and then a second time to print a sorted array A function to sort an array A function to calculate the mean A function to calculate the median A function to calculate the mode You may use other functions as desired. You do not need to write your own functions, particularly the ones to sort the array, or to calculate the mode. You may use routines given in the course documents, from the textbook, or from another source Document the source of any routine that you did not write, including any comments on use and/or modifications. For submission, run the program with the data sets PI0statdata/.txt P10statdata2.txt and P/0statdata3 txt ?n Blackboard. These data sets are set up with a sentinel of-999 at the end, and each contain a different number of numbers. Do not change or combine these files. The data filenames should be read into your program, and the program is only run once. You should strive to demonstrate your programming prowess. Be sure to include sufficient comments. Uplated 5/27/2017 Page 1 of 1

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

More Books

Students also viewed these Databases questions