/* * Created: *** put the date here *** * * Author: *** put your name here *** * * The program will read information about students and their * scores from a file, and output the name of each student with * all his/her scores and the total score, plus the average score * of the class, and the name and total score of the students with * the highest and lowest total score. */ import java.util.Scanner; public class Lab7 { public static void main(String[] args) { // Fill in the body according to the following comments // Input file name // Input number of students // Input all student records and create Student array and // integer array for total scores // Compute total scores and find students with lowest and // highest total score // Compute average total score // Output results } // Given a Scanner in, this method prompts the user to enter // a file name, inputs it, and returns it. private static String getFileName(Scanner in) { // Fill in the body // Do not declare the Scanner variable in this method. // You must use the value this method receives in the // argument (in). } // Given the number of students records n to input, this // method creates an array of Student of the appropriate size, // reads n student records using the FileIOHelper, and stores // them in the array, and finally returns the Student array. private static Student[] getStudents(int n) { // Fill in the body } // Given an array of Student records, an array with the total scores, // the indices in the arrays of the students with the highest and // lowest total scores, and the average total score for the class, // this method outputs a table of all the students appropriately // formatted, plus the total number of students, the average score // of the class, and the name and total score of the students with // the highest and lowest total score. private static void outputResults( Student[] students, int[] totalScores, int maxIndex, int minIndex, int average ) { // Fill in the body } // Given a Student record, the total score for the student, // and the average total score for all the students, this method // outputs one line in the result table appropriately formatted. private static void outputStudent(Student s, int total, int avg) { // Fill in the body } // Given the number of students, this method outputs a message // stating what the total number of students in the class is. private static void outputNumberOfStudents(int n) { // Fill in the body } // Given the average total score of all students, this method // outputs a message stating what the average total score of // the class is. private static void outputAverage(int average) { // Fill in the body } // Given the Student with highest total score and the student's // total score, this method outputs a message stating the name // of the student and the highest score. private static void outputMaxStudent( Student student, int score ) { // Fill in the body } // Given the Student with lowest total score and the student's // total score, this method outputs a message stating the name // of the student and the lowest score. private static void outputMinStudent( Student student, int score ) { // Fill in the body } }