Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question

I need help with the content on the image below. The Code is Java.

JAVA
Assume that there are five classes in a school. Each class has a different size. Class one has 10 students,
class two has 2 students, class three has 6 students, class four has 5 students, and class five has 2 students.
They took math test and got the following results:
# student Class 1 Class 2 Class 3 Class 4 Class 5
70.5
90.0
99.9
65.0
44.5
82.3
50.0
60.0
55.9
100.0
100.0
85.5
25.4
30.3
75.5
100
88.7
95.6
97.8
55.8
39.5
68.4
96.9
100.0
28.7
1
2
3
4
7
8
9
10
Write a program that calculates the Math average of each class. You should meet the following
requirements:
• The program should declare a ragged array.
• The program should use nested for loop to calculate the math average of each class.
• The program only allows two decimal places. (Example 25.99)
The result of your program should similar to the following:
CA C:\WINDOWSsystem32\cmd.exe
Average of class 1: 75.46
Average of class 2: 55.00
Average of class 3: 75.37
Average of class 4: 66.70
Average of class 5: 77.95
Press any key to continue
expand button
Transcribed Image Text:JAVA Assume that there are five classes in a school. Each class has a different size. Class one has 10 students, class two has 2 students, class three has 6 students, class four has 5 students, and class five has 2 students. They took math test and got the following results: # student Class 1 Class 2 Class 3 Class 4 Class 5 70.5 90.0 99.9 65.0 44.5 82.3 50.0 60.0 55.9 100.0 100.0 85.5 25.4 30.3 75.5 100 88.7 95.6 97.8 55.8 39.5 68.4 96.9 100.0 28.7 1 2 3 4 7 8 9 10 Write a program that calculates the Math average of each class. You should meet the following requirements: • The program should declare a ragged array. • The program should use nested for loop to calculate the math average of each class. • The program only allows two decimal places. (Example 25.99) The result of your program should similar to the following: CA C:\WINDOWSsystem32\cmd.exe Average of class 1: 75.46 Average of class 2: 55.00 Average of class 3: 75.37 Average of class 4: 66.70 Average of class 5: 77.95 Press any key to continue
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
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
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education