McGraw-Hill OnlineMcGraw-Hill Higher EducationLearning Center
Student Centre | Lecturer Centre | Info Centre | HOME

Glossary
Q 18.C supplement
Self-test Questions

Cover
Object-Oriented Systems Analysis and Design Using UML, 2/e
Simon Bennett, Systems Architect with GEHE UK
Steve McRobb, Senior Lecturer, De Montfort University
Ray Farmer, Associate Dean, Coventry University

Designing Interface Objects

Self-test Questions



1

Which of the following types of class stereotype is always found in the presentation layer?
A)Boundary.
B)Control.
C)Entity.
2

Which of the following elements of the Model–View–Controller architecture is essentially part of the presentation layer?
A)Model.
B)View.
C)Controller.
3

Which of the following is not a reason for separating the display of instances of business classes from the business classes themselves?
A)For classes to be reusable they should not be tied to a particular way of displaying the attribute values of instances.
B)The state behaviour of the interface is different from the state behaviour of the business objects.
C)There is no one standard layout for the attributes of business objects, so the display is better handled by separate classes.
4

What is the presentation layer concerned with?
A)Presenting the attribute values of objects to the user and other systems.
B)Storing the data represented by the attribute values of objects.
C)Acting as an interface between the tiers of the three-tier architecture.
5

Which of the following is not a kind of prototype?
A)Horizontal.
B)Vertical.
C)Lateral.
6

Which of the following best describes a horizontal prototype?
A)A horizontal prototype deals only with the user interface.
B)A horizontal prototype deals with a single layer of a layered architecture.
C)A horizontal prototype takes one sub-system and develops it across all the layers.
7

Which of the following best describes a vertical prototype?
A)A vertical prototype is discarded after it has been used to test out some aspect of the design.
B)A vertical prototype deals with a single layer of a layered architecture.
C)A vertical prototype takes one sub-system and develops it across all the layers.
8

Which of the following best describes a throwaway prototype?
A)A throwaway prototype is discarded after it has been used to test out some aspect of the design.
B)A throwaway prototype takes one sub-system and develops it across all the layers.
C)A throwaway prototype is used to test the design of object deletion mechanisms.
9

Which of the following is not a reason for using prototyping in the design of the user interface?
A)Alternative approaches to the interface of a use case can be tried out.
B)Guidelines for the design of the interface can be tested.
C)Visual development environments can be used to blur the distinction between the interface and the business logic.
10

Which of the following is the stereotype for a boundary class?
A)<a onClick="window.open('/olcweb/cgi/pluginpop.cgi?it=gif::A::/sites/dl/free/0077098641/41598/ch17_q10_a.gif','popWin', 'width=109,height=120,resizable,scrollbars');" href="#"><img valign="absmiddle" height="16" width="16" border="0" src="/olcweb/styles/shared/linkicons/image.gif">A (50.0K)</a>
A
B)<a onClick="window.open('/olcweb/cgi/pluginpop.cgi?it=gif::B::/sites/dl/free/0077098641/41598/ch17_q10_b.gif','popWin', 'width=109,height=120,resizable,scrollbars');" href="#"><img valign="absmiddle" height="16" width="16" border="0" src="/olcweb/styles/shared/linkicons/image.gif">B (50.0K)</a>
B
C)<a onClick="window.open('/olcweb/cgi/pluginpop.cgi?it=gif::C::/sites/dl/free/0077098641/41598/ch17_q10_c.gif','popWin', 'width=109,height=120,resizable,scrollbars');" href="#"><img valign="absmiddle" height="16" width="16" border="0" src="/olcweb/styles/shared/linkicons/image.gif">C (50.0K)</a>
C
11

Boundary classes will usually have a dependency on classes in some kind of user interface package, such as the Java Abstract Windowing Toolkit or the Microsoft Foundation Classes. What kind of dependency is this likely to be?
A)«realize»
B)«import»
C)«include»
12

What notation is used in a sequence diagram to show that an object instance is created by a message?
A)The arrow head of the message points at the object at the top of the lifeline.
B)The arrow head of the message is open.
C)A large ‘C’ for ‘Constructor’ is shown on the object lifeline.
13

What notation is used in a sequence diagram to show that an object instance is destroyed as a result of receiving a message?
A)A large ‘X’ is shown on the lifeline.
B)The arrow head of the message is open.
C)A large ‘D’ for ‘Destructor’ is shown on the lifeline.
14

Which of the following statements best describes the excerpt from a class diagram shown below?

<a onClick="window.open('/olcweb/cgi/pluginpop.cgi?it=gif::Fig. 17.14::/sites/dl/free/0077098641/41598/ch17_q14_q.gif','popWin', 'width=595,height=262,resizable,scrollbars');" href="#"><img valign="absmiddle" height="16" width="16" border="0" src="/olcweb/styles/shared/linkicons/image.gif">Fig. 17.14 (50.0K)</a>
Fig. 17.14

A)CheckCampaignBudgetUI inherits its behaviour from ClientLister. ListClients contains one or more ClientListers.
B)ListClients inherits its behaviour from ClientLister. CheckCampaignBudgetUI is a user interface class because of its relationship with ClientLister.
C)CheckCampaignBudgetUI implements the ClientLister interface. ListClients uses the operations of the interface when sending messages to CheckCampaignBudgetUI.
15

Which of the following is meant by the large rectangle in the diagram below?

<a onClick="window.open('/olcweb/cgi/pluginpop.cgi?it=gif::Fig. 17.15::/sites/dl/free/0077098641/41598/ch17_q15_q.gif','popWin', 'width=554,height=262,resizable,scrollbars');" href="#"><img valign="absmiddle" height="16" width="16" border="0" src="/olcweb/styles/shared/linkicons/image.gif">Fig. 17.15 (50.0K)</a>
Fig. 17.15

A)The messages within the rectangle result in the destruction of the :ListClients object.
B)The messages in the rectangle are repeated.
C)The messages in the rectangle are all sent by the same object.
16

Which of the objects in the diagram below would need to implement the ItemListener interface in order to respond to the itemStateChanged(evt) message?

<a onClick="window.open('/olcweb/cgi/pluginpop.cgi?it=gif::Fig. 17.16::/sites/dl/free/0077098641/41598/ch17_q16_q.gif','popWin', 'width=591,height=297,resizable,scrollbars');" href="#"><img valign="absmiddle" height="16" width="16" border="0" src="/olcweb/styles/shared/linkicons/image.gif">Fig. 17.16 (50.0K)</a>
Fig. 17.16

A)clientChoice:Choice.
B)CheckCampaignBudgetUI.
C)CheckCampaignBudget.
17

Which three patterns do Gamma et al. use to describe the Model–View–Controller architecture?
A)Model, View and Controller.
B)Façade, ItemListener and Controller.
C)Observer, Composite and Strategy.
18

Why are statecharts used to model the user interface?
A)To model the permitted states of the user interface and the events that cause the user interface to change state.
B)To model the lifetime of all the user interface classes beyond the existence of a particular instance of the interface.
C)To show the sequential view of the user working through the user interface from top to bottom.
19

Which of the following can be achieved by modelling the state of the user interface?
A)Passing responsibility for all validation to the controller class.
B)Constraining the behaviour of the interface to prevent users making errors.
C)Describing the high-level requirements and main user tasks.
20

What is the purpose of the history indicator in a statechart?
A)It shows that the state nested within another state will be recorded, and if a transition is made back to the history indicator, then the object will return to the recorded state.
B)When a transition enters the nested state it will restart at the start state.
C)If a transition is made to the history indicator then the object will return to the immediately preceding state, as if the transition had never happened.
21

Which of the following is the notation for the deep history indicator?
A)H in a circle.
B)H* in a circle.
C)«history» in a round-cornered rectangle.
22

What is recorded in an event–action table?
A)The actions that objects can carry out and the events that take place as a result of those actions.
B)Events that objects can respond to and the actions that take place in response to those events.
C)Current states, events that can occur in each state, the actions associated with the combination of state and event, and the next states after the actions have taken place.