public abstract class Find
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) Gradebook |
gradebook
The currently open Gradebook.
|
| Constructor and Description |
|---|
Find() |
| Modifier and Type | Method and Description |
|---|---|
(package private) abstract java.util.Collection<Assignment> |
findAssignments(java.lang.String name,
java.lang.String courseName)
Finds the Assignment associated with the given name and course.
|
(package private) abstract java.util.Collection<Student> |
findStudents(java.lang.String name,
java.lang.String courseName)
Finds the Student associated with the given name and course.
|
Gradebook gradebook
abstract java.util.Collection<Student> findStudents(java.lang.String name, java.lang.String courseName)
name - student namecourseName - name of course to search in
pre:
//
// The selected Course must either be null or exist in the gradebook.
//
courseName == null ||
exists (Course course; gradebook.courses.contains(course);
course.name == courseName);
post:
//
// Any students in the returned collection must fit the criteria.
// Their name must contain the search patterns, and they must be
// contained in a section within the selected course.
//
forall (Student student; return.contains(student);
exists (Course course; gradebook.courses.contains(course) &&
if (courseName != null) course.name == courseName;
exists (Section section; course.sections.contains(section);
exists (Student student; section.students.contains(student);
student.name.contains(name)))))abstract java.util.Collection<Assignment> findAssignments(java.lang.String name, java.lang.String courseName)
name - assignment namecourseName - name of course to search in
pre:
//
// The selected Course must either be null or exist in the gradebook.
//
courseName == null ||
exists (Course course; gradebook.courses.contains(course);
course.name == courseName);
post:
//
// Any Assignments in the returned collection must fit the criteria.
// Their name must contain the search patterns, and they must be
// contained in a section within the selected course.
//
forall (Assignment assignment; return.contains(assignment);
exists (Course course; gradebook.courses.contains(course) &&
if (courseName != null) course.name == courseName;
exists (Assignment assignment; course.assignments.contains(assignment);
assignment.name.contains(name))));