Write a program that reads in the names and scores of students and then computes
ID: 440649 • Letter: W
Question
Write a program that reads in the names and scores of students and then computes and displays the names of the students with the highest and lowest scores. A simple method of carrying out this task would be to have two parallel arrays. String[] names; int[] scores; However, you should avoid parallel arrays in your solution. First, write a class Student to solve the parallel array problem. Leave the StudentScores class and tester class for the following exercises. A Student simply holds a student name and a score. What is your Student class?Explanation / Answer
import java.util.Scanner; public class Lab7 { public static void main(String[] args) { // Input file name Scanner in = new Scanner(System.in); String filename = getFileName(in); // Input number of students int Student [students] = getStudents (FileIOHelper. getNumberOfStudents (filename)); // Input all students records and create Student array and // integer array for total scores int[] totalScores = new int [students.length]; for(int i = 0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.