Structured version Judge2.java (follow this model) -------------------------------------------------- // Stuart Reges // 10/18/04 // // This program finds the average score received by each of two athletes. import java.util.*; public class Judge2 { public static final int NUM_JUDGES = 5; public static void main(String[] args) { giveIntro(); Scanner console = new Scanner(System.in); double score1 = getScore(console); double score2 = getScore(console); reportResults(score1, score2); } // introduces the program to the user public static void giveIntro() { System.out.println("This program reads in a series of judges' scores"); System.out.println("for two different athletes and computes an"); System.out.println("average score for each."); System.out.println(); } // prompts for one athlete's scores, returning the average score public static double getScore(Scanner console) { System.out.println("Enter next athlete information:"); double total = 0; for (int i = 1; i <= NUM_JUDGES; i++) { System.out.print(" judge #" + i + " score? "); double score = console.nextDouble(); total += score; } System.out.println(); return total/NUM_JUDGES; } // reports the overall athlete scores to the user public static void reportResults(double score1, double score2) { System.out.println("Athlete #1 average score = " + score1); System.out.println("Athlete #2 average score = " + score2); } }