 # Dr. LaCaire gives a set of exams during the semester in her chemist...

## Question

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 scores.

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
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 and 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 and 100.

4. The program must print:
a. The scores entered
c. Lowest Score dropped

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

public class CalcAverage {

private static Scanner scanner = new Scanner(System.in);

public static void main(String[] args) {
// 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)
int exam_num = (int) getInput("Enter number of exams for the chemistry class: ",
1, 6);
// 2. The number of exams will determine the size of array (5 points)

double[] scores = new double[exam_num];

// 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.
for (int i = 0; i < scores.length; i++) {
scores[i] = getInput("Enter the scores for exam #" + (i + 1) + ": ",
1, 100);
}

System.out.println("");
// 4. The program must print:
// a. The scores entered
System.out.print("Scores entered: ");
for (int i = 0; i < scores.length; i++) {
double score = scores[i];
System.out.print(score + " ");
}
System.out.println("");...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

\$20.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.