A Math teacher is teaching Math course to a set of classes (each class may have different number of students) and want to check the behavior of his students in a homework report. The teacher gave the classes the same exam and marked their answer and wants to know the class whose students got the highest average. Help the teacher in the required analysis of student's marks by implementing a Java program ClassAverageMArks2DimmArray using 2-dimensional array to store the students marks and then compute the average of each class student's marks. The program has the following specification: • A Method titled averageClassMarks for computing the average (as double) of a class students marks (given to the method as a single-dimensional array) • Another Method titled averageAllclassesMarks for computing the average (as single array of double) of all the classes class student's marks (given to the method as a 2- dimensional array). This method has to repeatedly call the first method averageClassMarks to calculate the average of student's marks in each class. • The program reads from the user the number of classes and then reads the classes student's marks (as integer values) line by line. Each line has the number of students in the class then the student's marks. • The program calls method averageAllClassesMarks to calculate all the average values of marks of all the classes. Again, method averageAllClassesMarks has to repeatedly call the first method averageClassMarks. • Finally, the program then prints all the average values (rounded to 2 decimal points) of all classes student's marks and the highest average mark as well. • The program has to work EXACTLY as given in the following sample run. Sample Run: Enter number of classes: 5 Enter student's marks of al1 the classes line by line such that, each line contains first the number of students in a class followed by the student's marks: 6 50 84 76 94 62 98 5 42 64 97 88 80 6 25 35 86 47 36 75 7 59 74 96 94 82 75 98 4 88 62 56 74 Classes average marks: Class Average 33 .7ר 1 2 74.20 3 50.67 4 82.57 70.00 The highest average is 82.57 and it is for class 4.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

The program has to work EXACTLY as given in the following sample run

A Math teacher is teaching Math course to a set of classes (each class may have different number
of students) and want to check the behavior of his students in a homework report. The teacher
gave the classes the same exam and marked their answer and wants to know the class whose
students got the highest average.
Help the teacher in the required analysis of student's marks by implementing a Java program
ClassAverageMArks2DimmArray using 2-dimensional array to store the students marks
and then compute the average of each class student's marks. The program has the following
specification:
• A Method titled averageClassMarks for computing the average (as double) of a class
students marks (given to the method as a single-dimensional array)
• Another Method titled averageAliclassesMarks for computing the average (as
single array of double) of all the classes class student's marks (given to the method as a 2-
dimensional array). This method has to repeatedly call the first method
averageClassMarks to calculate the average of student's marks in each class.
• The program reads from the user the number of classes and then reads the classes
student's marks (as integer values) line by line. Each line has the number of students in
the class then the student's marks.
• The program calls method averageAllClassesMarks to calculate all the average
values of marks of all the classes. Again, method averageAllClassesMarks has to
repeatedly call the first method averageClassMarks.
Finally, the program then prints all the average values (rounded to 2 decimal points) of all
classes student's marks and the highest average mark as well.
• The program has to work EXACTLY as given in the following sample run.
Sample Run:
Enter number of classes: 5
Enter student's marks of all the classes line by line such that, each
line contains first the number of students in a class followed by the
student's marks:
6 50 84 76 94 62 98
5 42 64 97 88 80
6 25 35 86 47 36 75
7 59 74 96 94 82 75 98
4 88 62 56 74
Classes average marks:
Class Average
1.
77.33
2
74.20
3
50.67
82.57
70.00
The highest average is 82.57 and it is for class 4.
Transcribed Image Text:A Math teacher is teaching Math course to a set of classes (each class may have different number of students) and want to check the behavior of his students in a homework report. The teacher gave the classes the same exam and marked their answer and wants to know the class whose students got the highest average. Help the teacher in the required analysis of student's marks by implementing a Java program ClassAverageMArks2DimmArray using 2-dimensional array to store the students marks and then compute the average of each class student's marks. The program has the following specification: • A Method titled averageClassMarks for computing the average (as double) of a class students marks (given to the method as a single-dimensional array) • Another Method titled averageAliclassesMarks for computing the average (as single array of double) of all the classes class student's marks (given to the method as a 2- dimensional array). This method has to repeatedly call the first method averageClassMarks to calculate the average of student's marks in each class. • The program reads from the user the number of classes and then reads the classes student's marks (as integer values) line by line. Each line has the number of students in the class then the student's marks. • The program calls method averageAllClassesMarks to calculate all the average values of marks of all the classes. Again, method averageAllClassesMarks has to repeatedly call the first method averageClassMarks. Finally, the program then prints all the average values (rounded to 2 decimal points) of all classes student's marks and the highest average mark as well. • The program has to work EXACTLY as given in the following sample run. Sample Run: Enter number of classes: 5 Enter student's marks of all the classes line by line such that, each line contains first the number of students in a class followed by the student's marks: 6 50 84 76 94 62 98 5 42 64 97 88 80 6 25 35 86 47 36 75 7 59 74 96 94 82 75 98 4 88 62 56 74 Classes average marks: Class Average 1. 77.33 2 74.20 3 50.67 82.57 70.00 The highest average is 82.57 and it is for class 4.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY