Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write two programs a class Grader.java (50 points), class FinalGrade.java (20), and a CalcAverage.java (30 points). Part1: Dr. LaCaire gives a set of exams during

Write two programs a class Grader.java (50 points), class FinalGrade.java (20), and a CalcAverage.java (30 points).

Part1: 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. (10 points)

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

3. A method getAverage that returns the average of the test scores with lowest dropped (10 points)

4. Draw a UML diagram to show the fields, constructor, and methods (10 points)

Part2: 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.

Part3: 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. (10 points) 2. The number of exams will determine the size of array (5 points) 3. The user is asked to enter the scores for each exam. Scores must be saved in a local array (10 points). 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

More Books

Students also viewed these Databases questions

Question

Whether the board has jurisdiction to conduct an election.

Answered: 1 week ago