next up previous
Next: Sample output Up: No Title Previous: No Title

Description of the problem

This assignment is to implement an interactive version of the student registration problem in the Pipe-Filter paradigm. The student registration problem is discussed in the Student Registration Problem handout, which you should have received with this. You are provided with a working implementation of the registration system in Java, and are asked to extend this implementation with new functionality.

The version of the current system will register students for sets of sections, checking for and discarding requests to register in sections which are full or conflict with other requests in the same set of sections. Specifically, this version implements a pipe and filter system that accepts a student ID and a list of section numbers; this is sent through pipes to a filter which will check each section against prior sections requested for that student in this session (prior registrations are ignored). If the meeting times for the new section overlap with the prior requests in this session, the new request will be discarded; otherwise, it will be sent through its output pipe to a filter which will discard requests to register in full sections. Finally, output is sent to a filter which will register the student for the specified courses and sends the student registration information to its output pipe (which is connected to the console).

Please read the ``Setting Up and Running Java Assignments'' handout; this will describe in detail how to set up your environment and how to use file input for the program. The user interface and repository access (in the Java package JDBCObject) are outside the bounds of the assignment; concentrate your attention and effort on the architectural concerns and code within in the pipefilter package, but feel free to look at the code to see what it is doing.


To run the current program, enter the following:

	java pipefilter.RegisterStudents <filename>

You will be provided with the source code for the pipe-and-filter part of the system; additionally, Java ``packages'' (similar to C libraries) are provided which contain utilities, user interfaces, and repository access code that you will be using. This code will be made available as described in the Setup and Running Java Assignments handout. Please read the Java documentation at

http://msepc15.sp.cs.cmu.edu/javadoc/packages.html
for the Registration package, or refer to it when you need to read or store information from the repository. (The package is big, but provides all of the data access you will need for these assignments. The javadoc documentation will be moved to the regular 15-675 web site later, but will remain available at the above location.)


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

1.
Provide notification of full sections (the provided system discards these sections but provides no notification). Ensure that the output for a student is printed in the manner shown in the example output below. (Really big hint: this will be easiest if you provide additional output streams for the two filters and merge their output into a single resulting stream, which can be sent as input to another filter or to the output stream.)

2.
Allow students to request courses in addition to specific sections. Requesting a course should automatically select the section with the highest preference rating for that student. (Hints: the pipefilter.PFAdapter has an unimplemented method to handle this input, and a GUI allowing selection of courses is provided with the command-line option ``sections-and-courses''. A Preferences.rate() method is provided to rate sections.)

3.
Sort the list of registered courses by their first meeting times. (Hint: See the Useful.SortedList class and the Useful.Sortable interface for sorting functionality.)



 
next up previous
Next: Sample output Up: No Title Previous: No Title
Tom Conversion Service