Algorithm Flashcards
1
Q
Algorithm
A
finite sequence of well-defined, computer-implementable instructions, typically to solve a class of problems
2
Q
code: custom equals for the class student
A
@override public boolean equals(Object student){ if(this == student) return true; if(student == null) return false; if(this.getClass() != student.getClass()) return false;
Student other = (Student) student;
return this.name.equals(other.name);
}
3
Q
loop invariance
A
later