Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write two programs a class Grader.java , class FinalGrade.java , and a CalcAverage.java. Dr. LaCaire gives a set of exams during the semester in her

Write two programs a class Grader.java , class FinalGrade.java , and a CalcAverage.java.

Dr. LaCaire gives a set of exams during the semester in her chemistry class. At the end of the semester, she drops each of students lowest test score before averaging the scores. She has asked you to write a program that will read a students test scores as input and calculate the average with the lowest dropped. She also wants you to create another program that accepts the adjusted Average and returns the course grade.

The following pseudocode shows the steps for calculating the average of a set of test scores, with the lowest score dropped:

Calculate the total of the scores

Find the lowest score Subtract the lowest score from the total.

This gives the adjusted total Divide the adjusted total by (number of scores -1).This is the average.

You will create a class Grader.java. with:

1. Constructor that accepts a double array of test scors.

2. The Grader class will have a method named getLowestScore that returns the lowest score in the array.

3. A method getAverage that returns the average of the test scores with lowest dropped.

4. Draw a UML diagram to show the fields, constructor, and methods.

FinalGrade.java a class that has accepts the adjusted average and returns a letter for the grade. See the previous lab that has similar program. This class contains one method that return the FinalGrade letter for the class.

CalcAverage.java is the program that will test the Grader Class. The CalcAverage will ask the user to:

1. Enter the number of exams for the chemistry class. Input Validation number of exams between 1 6 and i.e. no negative numbers accepted.

2. The number of exams will determine the size of array

3. The user is asked to enter the scores for each exam. Scores must be saved in a local array.

Input Validations: Scores must be 1 100.

4. The program must print:

a. The scores entered

b. Adjusted Average

c. Lowest Score dropped

d. Course Grade

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

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

What additional information do we need?

Answered: 1 week ago

Question

List the common methods used in selecting human resources. page 239

Answered: 1 week ago

Question

Please show work and explain steps. Multinational finance

Answered: 1 week ago

Question

LO2 Discuss important legal areas regarding safety and health.

Answered: 1 week ago