import java.util.Scanner; public class StudentRecord { public static void main (String[] args) { boolean inputOK = false; Scanner keyboard = new Scanner(System.in); double[] quizScores= new double[3]; double midterm = 0; double finalExam = 0; int count = 0; boolean anotherRecord = true; int students = 0; Student[] studRec = new Student[100]; while (anotherRecord = true) for (students = 0; students < 100; students++) { Student studRec = new Student[students](quizScores[0], quizScores[1], quizScores[2], midterm, finalExam); if(inputOK == false) { System.out.println("Please input the quiz scores, separated by spaces."); for (count = 0; count < 3; count++) quizScores[count] = keyboard.nextDouble(); for(count = 1; count < 4; count++) { if( quizScores[count] < 0 || quizScores[count] > 10) { System.out.println("Incorrect value for quiz " + count + ". Enter a "); System.out.println("score between 1 and 10 and press Space."); quizScores[count] = keyboard.nextDouble(); } else inputOK = true; } } inputOK = false; if(inputOK = false) { System.out.println("Please enter the midterm score and press Space."); midterm = keyboard.nextDouble(); if(midterm < 0 || midterm > 100) { System.out.println("Invalid value. Enter a number between 1 and 100."); midterm = keyboard.nextDouble(); } else inputOK = true; } inputOK = false; if(inputOK = false) { System.out.println("Please enter the final exam score and press Space."); finalExam = keyboard.nextDouble(); } double quizTotal = studRec.QuizTotal(quizScores[0], quizScores[1], quizScores[3]); System.out.println("Quiz total is " + quizTotal + " out of 30 possible points."); } } }