Question: I am taking a C++ programing course and need to know this source code please. You have been tasked by the IT department of Acme

I am taking a C++ programing course and need to know this source code please.

You have been tasked by the IT department of Acme Electronics to write a program to generate a report about last years sales. The report created by the program will be the table shown below. It will also display the division and quarter with the highest sales and the division and quarter with the lowest sales for the year.

The program will need to use a 2-Dimensional array. This array that will hold the sales totals for 4 divisions and for 4 quarters. The array must be created to also hold the total for each division and for each quarter (in other words the total for each column and each row, when thinking about the array as a table or spreadsheet). These totals will be calculated by the program once the values have been inputted by the user. This array will have the quarters as the columns and the divisions as the rows. The last column will hold the totals for the rows (division totals) and the last row will hold the totals for the columns (quarter totals). Note: the very last element in the array will not be used.

Another array should be used to store the division names of North, South, East, and West. This array will be used when getting the inputs from the user and for the outputs.

The program should use two global constants called ROWS and COLS.

The program must provide the following functions:

double CalculateTotal(double [][COLS]);

Calculates the total of the complete array except for the totals in the last column and last row.

Returns the total.

double CalculateAverage(double [][COLS]);

Calculates the average of all the values in the array except for the column and row with the totals in them.

Returns the average.

double CalculateRowTotal(double [][COLS], int);

Calculates the total for row that is specified by the second parameter.

Returns the total for the specified row.

double CalculateColumnTotal(double [][COLS], int);

Calculates the total for a column that is specified by the second parameter.

Returns the total for the specified column.

double FindHighest(double [][COLS], int&, int&);

Finds the highest sales in the array.

Provides the index values (row, column) of where the highest value is located in the array.

Returns the highest amount.

double FindLowest(double [][COLS], int&, int&);

Finds the lowest sales in the array.

Provides the index values of where the lowest value is located in the array.

Returns the lowest amount.

The program should output a table in the same format as below which will then be followed by the division and quarter with the highest value and the division and quarter with the lowest value.

Quarter 1

Quarter 2

Quarter 3

Quarter 4

Division Total

North

South

East

West

Quarter Total

Pseudocode must be provided in the comment block at the top of the file.

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!