AverageGrade. Assume the professor gives five exams during the semester with grades 0 through 100 and...

50.1K

Verified Solution

Question

Programming

AverageGrade. Assume the professor gives five exams during thesemester with grades 0 through 100 and drops one of the exams withthe lowest grade. Write a program to find the average of theremaining four grades. The program should use a class named Examsthat has 1. An instance variable to hold a list of five grades, 2.A method that calculate and return average. 3. A string that returnthe “exams Average” for printing. Your program output should promptfor an input for each grade. Use any number between 0 and 100. Yoursubmission should include compiled output.

use java

Answer & Explanation Solved by verified expert
4.0 Ratings (508 Votes)
Codeimport javautil import javautilScannerclass Exams public static int gradesnew int5 it is instance variable of class to holds grades public static double avarage0 public static double    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students