Location: [CPSC 333] [Assignments] Assignment #4
This page was most recently modified on April 1, 1997.
This assignment is to be prepared and submitted by groups of at most four students - preferably, who are all in the same lab section. Each group of students should submit one copy of their solution.
Three questions are listed below. However, only the first two are to be handed in (you can think of the third question as a ``thought exercise,'' and as an example of the kind of question I might have asked, under slightly different circumstances). Unless it's discovered that one or the other of the first two questions is substantially more difficult or time consuming than the other, the first two questions will be equally weighted when the assignment is marked.
Extension: The assignment is now due at 9am on Friday, April 4.
Use CRC Modeling to allocate responsibilities and identify collaborators for a modified version of the ``Accounts Management System'' that was considered for previous assignments. The modified version of the system can keep track of accounts for multiple users (although only one user can use the system at a time), and has a somewhat more modern user interface than the original version of the system.
You should submit, as your solution, a ``CRC card'' for each of the (``problem domain'') classes shown on the class diagram that is included as part of the description of the above system. Now, each of these classes will likely need to interact with additional ``implementation'' classes (representing data structures, part of the user interface, and so on), and it will be difficult to model that, since detailed information about interface class libraries, etc., hasn't been provided. So, don't worry about that! However, the information you submit should include all the interaction between the problem domain classes that is needed for this system.
In order to do this, you should consider all of the events for the previous version of the system that were included in the instructor's solutions for the first question on Assignment 2, as well as events with the following names.
The first two events can only occur when the system starts up. The rest of the events (including versions of all the events that have been listed before) can only occur after a user has successfully logged on. The final event should cause the system to ask for confirmation that the deletion be performed and, if confirmation is received, then the information should be deleted and the session terminated (that is, a ``quit'' should be performed).
In order to make your solution markable, submit a set of message threads for these events, so that the markers can determine that the set of responsibilities and collaborators that you've obtained is complete.
Finally one more piece of advice should be noted before you look at a more complete description of the above system: Don't let the description of the interface influence your solution too much! In particular, keep in mind that services provided by different objects, in different classes definitely can make changes to the information displayed in a single window.
A specification of the ``Transactions'' informational cluster, that is part of the solutions for the first question of Assignment 3, is now available.
Use the Standard Template Library in order to implement this as a class (or, perhaps, a small set of classes) in C++, and hand in the source code you generated.
You will need to write a small number of type definitions (several of which refer to parts of the Standard Template Library) and functions for each of the functions included in the informational cluster's ``interface.'' You may need some auxiliary functions that these call, as well. You should find that these are all quite short and that some (or all) make use of the functions that the Standard Template Library provides.
The library will also be installed, so that you can try to use it to assess your solution. However, it appears that the C++ compilers that are available to you don't support the features that the library requires. For this reason, it won't be necessary that your source code can be compiled successfully on our system (and no attempt will be made to compile it when your code is assessed). Of course, you should try as hard as you can to make sure that the only reasons, for your code not to compile correctly, involve limitations in the available C++ compilers.
NOTE: YOU ARE NOT REQUIRED TO HAND IN A SOLUTION FOR THIS FINAL QUESTION!
Furthermore, your solution won't be marked if you do submit one.
How could you continue the exercise described in Question #1, in order to add ``implementation'' classes for data structures, a graphical user interface, etc?
The best documented (and, possibly, simply the best) graphical user interface available for you to read about is the Java interface library. Information about this will be made available at some point before the end of the course, in case you'd like to see what this might include.
Notes on the additional lectures on object-oriented design (including Coad and Yourdon's method, and design patterns and frameworks) might also be useful here; the additional references given at the end of the introduction to object-oriented design could be useful, too.
Ideally, the ``requirements specification,'' that you've been given to start with, should be complete enough so that you can complete this design exercise. However, you may send email to the course instructor, in case you need to know additional information about the system that's to be designed.
Answers for reasonable questions will be posted to the course newsgroup and will also be made available, on this page.