Hi Johanna,
As you would have gone through the archives of this forum, you would have discovered that this application is based on
Role pattern.
The new requirement specifies that a instructor can be a student and a student can be a instructor.This implies that a Candidate can play 2
roles, i.e Instructor and Student.Hence we have a class diagram as shown by Figure C.
Also, any Candidate (who could be a Student or an Instructor) would want to know the other registered Candidates, as per the original requirement.Hence the Role class defines a method,
getRegisteredCandidates() : Candidate[] , which will be implemented by its subclasses to get the registered candidates for a particular instance of Student or Instructor.
Let us try to implement this Role pattern to make things would become clearer.
-- Sandeep
SCJP2, OCSD (Oracle JDeveloper), OCED(Oracle Internet Platform)