requirements bull analyze the problem outline


Requirements:

• Analyze the problem; outline the problem and its solution requirements.
• Design an algorithm to solve the problem.
• Implement the algorithm in C++, and verify that the algorithm works.

Part 1

Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. The program should output the average high, average low, and the highest and lowest temperatures for the year. Your program must consist of the following functions:

a. Function getData: This function reads and stores data in the twodimensional array.
b. Function averageHigh: This function calculates and returns the average high temperature for the year.
c. Function averageLow: This function calculates and returns the average low temperature for the year.
d. Function indexHighTemp: This function returns the index of the highest high temperature in the array.
e. Function indexLowTemp: This function returns the index of the lowest low temperature in the array.

Part 2

Write a program to calculate students' average test scores and their grades.

You may assume the following input data:

Johnson 85 83 77 91 76
Aniston 80 90 95 93 48
Cooper 78 81 11 90 73
Gupta 92 83 30 69 87
Blair 23 45 96 38 59
Clark 60 85 45 39 67
Kennedy 77 31 52 74 83
Bronson 93 94 89 77 97
Sunny 79 85 28 93 82
Smith 85 72 49 75 63

Use three arrays: a one-dimensional array to store the students' names, a (parallel) two- dimensional array to store the test scores, and a parallel one dimensional array to store grades.

Your program must contain at least the following functions: a function to read and store data into two arrays, a function to calculate the average test score and grade, and a function to output the results. Have your program also output the class average.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: requirements bull analyze the problem outline
Reference No:- TGS0445914

Now Priced at $40 (50% Discount)

Recommended (92%)

Rated (4.4/5)