Solutions to End-of-Chapter Problems
Review Questions
1. What is meant by the term use case realization?
The term realization means to create or bring into reality. Hence use case realization means to bring the use case to life or into reality by defining the detail steps and processes required to implement it.
2. What are the benefits of knowing and using design patterns?
Design patterns are a widely held approach to implementing standard programming constructs. It is important to know about and to understand both the idea of design patterns and to have a repertoire of understood patterns. Just as the vocabulary for any discipline is important in order to be educated in that discipline, system developers should be aware and have a working knowledge of design patterns.
3. What is the contribution to systems development by the Gang of Four?
The Gang of Four were the first developers to specifically define the idea of design patterns and to identify several fundamental common design patterns.
4. What are the five components of a standard design pattern definition?
The name, the description of the problem or need, the description of the solution, an example or diagram of the solution, and specific benefits or consequences of this solution.
5. List five elements included in a sequence diagram.
An actor, objects, lifelines, activation lifelines, messages, and loop control boxes.
6. How does a sequence diagram differ from an SSD?
A systems sequence diagram only has one object, the :system. A sequence diagram explodes the system object into all of the internal objects of the system. The idea is similar to a black box test and a white box test – one looks only at the outside while the other observes the details of what is going on inside.
7. What is the difference between designing with CRC cards and designing with sequence diagrams?
CRD cards is a more elementary process. It does not try to identify the messages at the same level of detail as is done with a sequence diagram. CRC cards gives an overview of the process, but leaves many details to the programmer. Sequence diagram goes more in depth.
8. Explain the syntax of a message on a sequence diagram.
- ‘*’ – means multiply occurring or looping
- [true/false] – means test condition which is tested before the message is sent
- return-value – is the return value which is returned to the originator of the message
- := — is used to denote that a return value exists
- message-name – this is the message name or service requested
- (parameter-list) – this is the list of data parameters being sent with the message
9. What is the purpose of the first-cut sequence diagram? What kinds of classes are included?
The purpose of the first-cut sequence diagram is to design and describe the logic within the problem domain objects, or the set of messages and connections between the various problem domain classes, e.g. business layer logic. Only problem domain classes are included.
10. What is the purpose of the use case controller?
A use case controller class is a completely artificial class that is used to provide a link between the view layer and the domain layer. A controller helps reduce the coupling between the view and domain layers in that the view layer does not need to know about all the classes in the domain layer. It only needs to know about the controller.
11. What is meant by an activation lifeline? How is it used on a sequence diagram?
An activation lifeline indicates the active execution or ‘life’ of the destination object. It is used as part of the lifeline of an object, but denoting that period of time when the object is actively executing some logic.
12. Describe the three major steps in developing the set of messages for the first-cut sequence diagram.
1. Start with each input message and identify all information and services that it will need in order to complete the requested service, e.g. identify all internal messages.
2. Identify all of the classes that will be involved to process.
3. Make sure each internal message is complete with parameters, true/false condition, and looping.