Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C++ Please Problem A: Computing simple statistics on data residing in different files and recording the results in a file. (20 points) In this

IN C++ Please

image text in transcribed

image text in transcribed

image text in transcribed

Problem A: Computing simple statistics on data residing in different files and recording the results in a file. (20 points) In this problem, you will create a C++ program that reads in data from multiple different files that each store salary data in the same format; compute simple statistics on the data and write the simple statistics your program computes out to a single output file (the output file your program creates is designed to be used in Problem B of this assignment) Each file your program obtains input from will have the same format. Each file should contain a list of salaries from groups of workers who perfom similar functions in a company (e.g management, engineering, administrative assistance, and union-controlled manufacuring work) For example, the file named asalaries.dat, which is one of the files that we gave you with this assignment, contains the following data 5000.00 53000.00 58000.50 9000.00 5000.75 Your program should determine the following quantities for each file it reads: The minimum salary value stored in the file mum salary value stored in the file The average value of all the salaries stored in the file he maxi hould output the name of the input file Once this is completed for an input file, your program s and the results of the computations on the data stored in the input file (maximum salary minimum salary, and average of all the salaries in the file), to the output file. Note, your program will write the results it computes for each input file into a single output file -that is, one output file will be used to store all the results. Your program will then prompt the user to see if they would like to enter another input file for processing ided the following files for you to use as you carry out the analysis, design, We have prov implementation, and testing required to develop your solution to this problem: asalaries.dat, esalaries.dat, msalaries.dat, and usalaries.dat An example run illustrating how your program should behave is specified on the following page - note, user input is in BOLD Problem A: Computing simple statistics on data residing in different files and recording the results in a file. (20 points) In this problem, you will create a C++ program that reads in data from multiple different files that each store salary data in the same format; compute simple statistics on the data and write the simple statistics your program computes out to a single output file (the output file your program creates is designed to be used in Problem B of this assignment) Each file your program obtains input from will have the same format. Each file should contain a list of salaries from groups of workers who perfom similar functions in a company (e.g management, engineering, administrative assistance, and union-controlled manufacuring work) For example, the file named asalaries.dat, which is one of the files that we gave you with this assignment, contains the following data 5000.00 53000.00 58000.50 9000.00 5000.75 Your program should determine the following quantities for each file it reads: The minimum salary value stored in the file mum salary value stored in the file The average value of all the salaries stored in the file he maxi hould output the name of the input file Once this is completed for an input file, your program s and the results of the computations on the data stored in the input file (maximum salary minimum salary, and average of all the salaries in the file), to the output file. Note, your program will write the results it computes for each input file into a single output file -that is, one output file will be used to store all the results. Your program will then prompt the user to see if they would like to enter another input file for processing ided the following files for you to use as you carry out the analysis, design, We have prov implementation, and testing required to develop your solution to this problem: asalaries.dat, esalaries.dat, msalaries.dat, and usalaries.dat An example run illustrating how your program should behave is specified on the following page - note, user input is in BOLD

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

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions

Question

Distinguish between poor and good positive and neutral messages.

Answered: 1 week ago

Question

Describe the four specific guidelines for using the direct plan.

Answered: 1 week ago