Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab Description Create an average class that will average a list of grades, dropping the low grade in the list. Format the average to two

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Lab Description Create an average class that will average a list of grades, dropping the low grade in the list. Format the average to two decimal places. Sample Data: 9 10 5 20 100 100 100 90 80 84 11 22 33 44 55 66 77 8575 62 4852 29 100 50 290 80 90 70 0 100 100 90 85 67 85 48 38 49 100 90 95 98 100 97 100 90 100 100 100 100 100 100 100 100 100 100 100 100 0 0 80 90 80 60 Files Needed Average.1ava AverageRunner.java Sample Output 9 10 5 20 100 100 100 90 80 84 average65.89 11 22 33 44 55 66 77 8575 62 average = 57.67 48 52 29 100 50 29 70 80 90 70 average65.44 0 100 100 90 85 67 85 48 38 49 average - 73.56 100 90 95 98 100 97 average98.00 100 90 100 100 100 100 average = 100.00 100 100 100 100 100 100 100 100 0 average = 100.00 90 80 90 B0 60 average 85.00 import java.util.Scanner; import static java.lang.System.* import java.io.IOException; import java.io.File; public class AverageRunner public static void main( String args throws IOException import java.util.Scanner; import static java.lang.System.* public class Average private String line; //write two constructors //write a setLine method private int getLowest() int lowest=Integer.MAX VALUE; return lowest; public double getAverage() double average 0.0 return average; //write a getLine method //write a toString method 9 10 5 20 100 100 100 90 80 84 11 22 33 44 55 66 77 85 75 62 48 52 29 100 50 29 70 80 90 70 0 100 100 90 85 67 85 48 38 49 100 90 95 98 100 97 100 90 100 100 100 100 100 100 100 100 100 100 100 100 0 90 80 90 80 60

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions