Using the online code for the example in this chapter as a starting point and the solution

Question:

Using the online code for the example in this chapter as a starting point and the solution from a previous exercise.

1. Implement (or modify your previous) Student: :DropCourse (). When a student drops a course, this event will cause the Course state to become state 2, New Space Available. With the state change, Notify () will then be called on the Course (subject), which will then Update () the list of observers (students on the waitlist). Update () will indirectly allow waitlisted student instances, if any, to now add the course.

2. Lastly, in DropCourse (), remember to remove the dropped course from the student's current course list.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer: