Sam, Tim, and I will develop the system with this list as the informal requirements for the system. We will transform these requirements into use cases.* I have found that writing use cases helps both me and the customer understand what the system needs to do. The cases are specified in sufficient detail so that we can appreciate the problem's scope and magnitude. Additional detail can be added later so that when it comes time to design or code, the necessary detail is available. Working through a system's use cases also helps to identify the users who should be consulted when their parts of the system undergo detailed specification and design.
Sam and I explore, in more detail, the first item on his list:
"Sam, who do you want to keep track of CDs?" I asked.
Sam replied, "What do you mean?"
I continued, "Do you want the customers to be able to check out their own CDs?"
"No," he answered, "only the clerk should perform checkout."
"Then let's go through the steps of checking out a CD, since that sounds like a primary use case," I suggested.
"How about returning a CD?" Sam queried.
"That sounds like another one, so why don't you tell me about both of them," I requested.
Sam explained the checkout and return procedures. After some discussion, I put his narration into the following informal use case descriptions. These use cases describe how the new system should work and are based on how the current manual process operates:
a. The customer brings a CD case to the clerk.
b. The clerk retrieves the actual CD corresponding to the case.
c. The customer presents his CD Store Customer Card. (The customer already has one of these for the manual system.) The clerk types the customer ID into the system.
d. The clerk types the CD ID into the system.
e. The system records that the CD is rented to that particular customer. It prints a rental contract.
f. The customer signs the rental contract.
g. The clerk files the rental contract in a file box named "Signed Rental Contracts."
a. The clerk types the CD ID into the system.
b. The system records that the CD has been returned.
c. The system determines whether late fees apply and informs the clerk if that is the case.
An informal use case description can lead to enlightenment, especially when combined with an examination of what can go wrong at each step. I asked Sam what the clerk did in their current system if a customer did not have his CD Store Customer Card. He said that the clerk looks for the corresponding card in the customer file. We captured this information in another informal case.
Checkout_a_CD (extension if no customer ID)
a . The customer identifies himself using a photo ID.
b. The clerk enters information from the ID into the system.
c. The system searches for the customer ID using the information from the photo ID. If no matching customer is found, the system indicates an error.
The use cases presented so far are informal. They mix user actions with system actions. Some authors (e.g., Larry L. Constantine and Lucy A.D. Lockwood in Software for Use: A Practical Guide to the Models and Methods of Usage Centered Design [Addison-Wesley Professional, 1999]) suggest that the use cases be written in a more technology-independent manner. Actions that are unrelated to system processing will drop out of the flow and appear as comments. For example, the Checkout_a_CD use case might look like this:
a . The user enters the customer ID and the CD ID into the system.
b. The system records the entry. It responds by creating a rental contract for the customer to sign.
Notice that the actual way in which the IDs are entered into the system is not specified. The IDs could be scanned in using a bar code reader, typed in, or spoken and translated by a speech recognition program.
Initial use case descriptions might state exactly how customers expect the system to work. Before implementing the use cases, you can rework them into a more abstract, less-technology-dependent description. Removing the implementation details can help focus on the business policies and procedures that need to be programmed.