	// Exam 3 content

	// Writing classes that model entities
	// - fields, constructors, getters, setters, etc.
	// - override toString()
	// - override equals()

	// Write a program that utilizes the entity class
	// - creating instances of the entity class
	// - storing them in an array
	// - passing the array of instances to a method

	// File I/O
	// - read data from a file
	// - store data in a file


import java.util.Scanner;

class Nov17 {
	public static void main(String[] args) {


		// array can hold 2 references to instances
		// of the Student class
		Student[] students = new Student[2];

		Student s1 = new Student(1000, "Alice", "Smith");
		students[0] = s1;

		Student s2 = new Student(1001, "Bob", "Ross");
		students[1] = s2;
	
		printArray(students);

		boolean areEqual = s1.equals(s2);
		System.out.println("equal: " + areEqual);

	}

	//create a method named printArray that takes an 
	// array of Students as an argument and calls toString
	// on each instance in the array

	static void printArray(Student[] arr) {
		for (Student s : arr) {
			System.out.println(s.toString());
		}
	}	

}

// end of file
