Question: Construct C++ program. Explain on programing logic structures used in the solution; The sales manager of your company needs a sales analysis program to track

Construct C++ program.

Explain on programing logic structures used in the solution;

  1. The sales manager of your company needs a sales analysis program to track sales performances by salesperson and by quarter. Write a program using 2D array which requires user to enter the salespersons number, the quarter in which the sale took place and the sale amount. After scanning all sales transactions, the program should display a table in the form of below figure which includes totals by person and by quarter.

2019 Sales Analysis

Salesperson

Quarter 1

Quarter 2

Quarter 3

Quarter 4

TOTAL

0

2785.00

2282.00

5720.00

6440.00

17227.00

1

4715.00

1676.00

6067.00

929.00

13387.00

2

1253.00

1495.00

2884.00

4173.00

9805.00

3

3946.00

1508.00

2844.00

2969.00

11267.00

QUARTER TOTALS

12699.00

6961.00

17515.00

14511.00

  1. In order to use 1D or 2D array, programmer need to become familiar with declaring and manipulating arrays, as well as using arrays as parameters.
  1. Describe the need for an array when processing items that are the same data type and represent the same conceptual item.
  2. Discuss the syntax involved in accessing array components. Review the use of the array subscripting operator with the code 2(a).
  3. Describe some common operations typically performed on arrays.
  4. Explain the consequences of using an array index that is out of bounds and discuss some common coding errors that can result in an out of bounds array index.
  5. Explain in more detail why C++ only allows arrays to be passed as reference parameters.

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!