In the last closed lab, given a simple application that counted the number of occurrences of letters in a given text input, you created a small application that counted the number of occurrences of words in a given text input. You were also given several maintenance activities.
The closed lab had two main objectives:
The two applications used different data structures to collect and store the data, and some of the maintenance activities may have revealed the need for additional or different components to support some or all of the new functionality. The objective of this homework is for you to outline the design of a new abstract (kernel) component that would be useful in solving a general application involving counting occurrences of (arbitrary) items (including the two problems you dealt with in closed lab). Another example of such an application could be a web site shopping cart, which is used to keep track of the various items the customer is thinking of buying and how many instances of each item.
A simple and non-exhaustive list of the requirements for the new component are the following:
The component does not need to support directly all extra features discussed in the closed lab maintenance activities. For instance, the ability to print the output in sorted order could conceivably be achieved by using a sorting machine.
A new abstract kernel component provides the client view. As you know, that includes
In this homework you are still doing a preliminary, exploratory design, so we don't expect a finished, polished product (but it must be well thought out and readable). Here is what you should turn in as your homework: