Question: Can someone help me with creating the definitions for these functions in a C++ program C++ Function Name Purpose ReadSalesFromFile Reads sales data from the

Can someone help me with creating the definitions for these functions in a C++ program

Can someone help me with creating the definitions for these functions in

a C++ program C++ Function Name Purpose ReadSalesFromFile Reads sales data from

C++ Function Name Purpose ReadSalesFromFile Reads sales data from the given filename and populates multiple arrays of data. THIS FUNCTION SHOULD NOT PRINT ANYTHING ON SCREEN. Only reads from the input file. Parameters(4): inputfilename, first name array, last name array, and sales array Return Type: void SalesReport Writes a sales report to a given output filename. The report should be formatted the same as the example report given below. You should use columns in the body of your report (setw). Inside this function it should call the FindMaxSaleslndex, FindMinSaleslndex, CalculateAvgSales, and CalculateTotalSales functions to get data to write in the report. THIS FUNCTION SHOULD NOT PRINT ANYTHING ON SCREEN. Only write to the output file. Parameters(5): outputfilename, first name array, last name array, sales array, number of element in array. Return Type: void FindMaxSaleslndex Searches the sales array for the maximum sales amount. It should return the index of the maximum sales. It should set the maximum sales reference parameter to the maximum sales in the array. This function should not print anything on screen. THIS FUNCTION SHOULD NOT PRINT ANYTHING ON SCREEN Parameters(3): sales array, number of element in array, maximum sales (pass by reference) Return Type: int FindMinSaleslndex Searches the sales array for the minimum sales amount. It should return the index of the minimum sales. It should set the minimum sales reference parameter to the minimum sales in the array. THIS FUNCTION SHOULD NOT PRINT ANYTHING ON SCREEN. Parameters(3): sales array, number of elements in array, minimum sales (pass by reference). Return Type: int CalculateAvgSales Calculates the average sales for the array. THIS FUNCTION SHOULD NOT PRINT ANYTHING ON SCREEN. Parameters(2): sales array, number of element in array Return Type: double CalculateTotalSales Calculates the total sales for the array. THIS FUNCTION SHOULD NOT PRINT ANYTHING ON SCREEN. Parameters(2): sales array, number of element in array Return Type: double

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!