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 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 74.20 3 50.67 4 82.57 70.00 The highest average is 82.57 and it is for class 4.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

write an algorithm in java of

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 with 1 images

Blurred answer
Knowledge Booster
Matrix multiplication
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education