Need help understanding how to use 2d arrays with 3d arrays. First part is the program and below that is my confusing attempt. If I could get a small example or tips, anything would be very helpful, thanks.
/*
Create two and three dimensional arrays to store all input and output data and fill these arrays by the data read from the input file and by the computed data. The data of all students will be stored in these arrays before writing it to the output file.
As you know, all elements of an array must be of same type. Therefore, you will be creating different arrays to store different types of data. For an example you could have the following array declarations:
o A two dimensional array nonNumeric1 of type string to store headings, Student name, Student ID, Student Telephone, Student Address, Student Social Security Number, title of course 1, title of course 2, title of course 3. For three students it may look like nonNumeric1 [3] [9]
o A two dimensional array numeric 1 of type int to store the age and the number of years at university. For three students it may look like
numeric1 [3] [2].
o A three dimensional array numeric2 of type double to store input data (read from input file) for three students, three courses and five exams, and computed Numerical Grades. For three students it may look like
Numeric2 [3] [3] [6]
o A two dimensional array letterGrade of type char to store letter grades of three students and three courses. For three students and three courses it may look like letterGrade [3] [3].
· Read the input from the Input File. Report should be based on three students each taking three courses. It means that you will be using a nested “for” loop. The outer loop will be on students, the middle loop will be on courses and the inner loop will be on five Exams. Use the Computed Numerical grade to determine commend/warning comments as follows:
o If the CNG is < 70, Warn: Your grade is too low and needs improvements
o If the CNG is >= 95, Commend: Congratulations, Your performance is Excellent
· In your loops, you should also check that arrays do not get out of bound.
· At the end when all the input and output data has been stored in arrays, you will write all the data from arrays to the output file.
*/
////////////////////Below is what I have come up with so far//////////////////