Submit via Blackboard.
Assignment: Consider the
from the lecture slides.
Note that the slides discuss 3 variations of the class -
an original, broken, version,
and two repaired versions.
Further, there are two rep-invariants: call them
Members2. Replace the type
isMember()observer method so that you can determine whether or not a given person is a member.
nullpersons can't join or leave. Either JavaDoc or postcondition descriptions are fine. Note that you'll have to decide what to do about null arguments to the observer method
Membersbreaks one of the rep-invariants. Of course, this requires a call to
Memberssatisfies the appropriate rep-invariant, but fails to satisfy its contract.
Members2. All four of these tests, obviously, must pass. Make sure you associate the appropriate rep-invariant with