next up previous
Next: The Current System Up: No Title Previous: No Title

Description of the Problem

This assignment, once again, is to implement an interactive version of the Student Registration system (described in the Student Registration Problem handout) in the implicit invocation paradigm. You will be provided with a partial Java implementation of the system and asked to identify and make the necessary modifications.

The provided system is capable only of registering students for sections of courses. Unlike the first assignments this version also allows dropping courses. Here is a transcript of a sample session of the current system: (See the Setting Up and Running the Java Assignments handout for a description of the input file format.)

  >java implicitinvocation.CreateBindings con:
  R 1 S 35 S 168 S 466
  R 2 S 5711 S 12011 S 173
  F

  Sections filled this session are:
    Section 466
    Section 12011

  D 2 S 12011
  F

  Sections filled this session are:
    Section 466

  ^Z

Your assignment is to modify the existing code to support the following changes:

1.
Respond to attempted registration in full sections:

(a)
If a student attempts to register in a full section, change the registration into any open section (if one is available). (It is not important to detect conflicts during this process.)

(b)
Report to the user that the section was full, and the alternate section selected. (Hint: Use the provided FeedbackUI component; the output does not need to be fancy. This will also properly account for file-based or graphic interface input.)

2.
Report to the user when full sections become open (which will only happen as a result of a student dropping a course that had been full).

3.
Don't allow registration in conflicting sections (sections which meet at the same time). (You may cancel either or both registration in the case of conflict.) Provide feedback to the user of the system, reporting which section(s) for which registration failed, and which requests were cancelled.

If a student requests a section that is full and the system generates an alternate (from #1 above), then the alternate may conflict with the other sections requested. If that is the case, treat the alternate the same as any other section. The selection of alternates does not have to check for conflict, and detection of conflict should work the same way whether the sections are original requests or alternates to full sections.

4.
At the end of the sessions, print a sorted list of Student's names who registered in this session. (Hints: See the Useful.Sortable and Useful.SortedList classes and the Student.getLMFName() method.)

Here is a sample session of the new system:

  >java implicitinvocation.CreateBindings con:
  R 3 S 563 S 921 S 1744
  R 2001 S 1257 S 5712 S 1134

  Section 1257 conflicts with section 1134.
  Registration for section 1134 cancelled.

  F

  Sections filled this session are:

  R 999 S 666 S 333 S 111

  Section 666 was full; registration changed to Section 665.

  ^Z


next up previous
Next: The Current System Up: No Title Previous: No Title
Tom Conversion Service