In Java
Please use // comments
Task
Assume you work in a tutoring center, which operates Mon-Wed. The center keeps track of how many students come to the center each day, and the number of students per tutor they see. Write a Java program that uses the 2D array tutorData below (the array is hardcoded in your program):
int[][] tutorData = { // total students per day (M T W, column) per tutor (row)
{ 25, 3, 0 }, // Tutor1
{ 14, 5, 12 }, // Tutor2
{ 33, 22, 10 }, // Tutor3
{ 0, 20, 5 } // Tutor4
};
The program declares and instantiates a two-dimensional int array tutorData[][] as given above. It uses variables numOfTutors for the total number of rows, and numOfDays for the number of columns; this means, numOfTutors is 4 and numOfDays is 3. You must use these variables when needed in your code rather than constants (3 or 4) or the corresponding .length. Of course, you can initialize these variables using the appropriate .length. The program produces the exact output that follows (without the border of course):
Tutor1 met 25 (M) 3 (T) 0 (W) students.
Tutor2 met 14 (M) 5 (T) 12 (W) students.
Tutor3 met 33 (M) 22 (T) 10 (W) students.
Tutor4 met 0 (M) 20 (T) 5 (W) students.
M: 72, T: 50, W: 27
Tutor1: 28, Tutor2: 31, Tutor3: 65, Tutor4: 25.
Max students per day: 72. Max Students per tutor: 65.
Total number of students using the center: 149