Question
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
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