import java.util.Date; import java.util.Arrays; import java.util.Scanner; class student { private String name; private String hairColor; private int SAT; //no-arg constructor student() { //sets data fields to some default values name = "default"; hairColor = "unknown"; SAT = -1; } //constructor with two parameters student(String n, String hc) { this.name = n;this.hairColor = hc; // this keyword refers to object itself this.SAT = -1; } //constructor with one parameter student(String name) { this.name = name; this.hairColor = "unknown"; this.SAT = -1; } // mutator method, sets the name field public void setName(String name) { this.name = name; } // accessor method, retrieves the name field public String getName() { return this.name; } // mutator public void setSATscore(int satscore) { this.SAT = satscore; } // accessor public int getSATscore() { return this.SAT; } } public class student_code { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); // declare an array of 3 students student[] s = new student[3]; for(int i=0;i<3;i++) // loop through array { System.out.print("Enter the name of student " + i + ":"); s[i] = new student(scanner.next()); // instantiate a student with constructor that has 1 parameter (name) System.out.print("Enter the SAT score of student " + i + ":"); s[i].setSATscore(scanner.nextInt()); // sets SAT score } int SATaccumulator = 0; // SAT score accumulator initialized with 0 for(int i=0;i