Lecture 8 Objectives


At the end of today's class you should

KNOW:

BE ABLE TO:

Sample Exam Question:

A student class is defined as follows:

class Student{
  String name;
  int studentID;  // ID number that uniquely identifies student

  Student (String name, int studentID){
    this.name = name;
    this.studentID = studentID;
  }
}
Write an equals() method for the Student class that returns true if the two students being compared have the same ID number.