Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA Write a program that calculates the class average. The program will ask a user to input the number of students and input each grade
JAVA
Write a program that calculates the class average. The program will ask a user to input the number of students and input each grade of students. Then, the program calculates the average of the class and select highest and lowest grade of the class. Your program should meet the following requirements:
- You must use a single-dimensional array.
- Define three static methods - one for getting the highest score, one for getting the lowest score, the other for calculating the average.
- Array size should be determined by user input (number of students).
- Ask a user to input each grade of students (use for loop).
- All grades you input should be double data types and must be saved in an array.
- The average of the class should have two decimal places.
- Include comments explaining the code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started