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

Class Design

Self-test Questions



1

When objects are being designed in detail the signature of each operation has to be specified. Which of the following statements is consistent with the term operation signature?
A)Each operation in a class has the same signature.
B)The operation name and the number of parameters are part of the operation signature.
C)A class may not have two operations with the same name.
2

Which of the following best describes when primary operations should be shown on class diagrams?
A)All primary operations are shown on class diagrams in design.
B)Primary operations are shown in class diagrams only if they modify attribute values.
C)Primary operations are shown on design class diagrams if they are part of the public interface of the class.
3

Encapsulation is best enforced by which of the following decisions regarding object visibility?
A)All attributes and operations are private.
B)All attributes are private and all operations are public.
C)All attributes are private and public operations are kept to a minimum.
4

When is a UML interface used?
A)It describes boundary classes.
B)It describes an interface that a class may offer to another class.
C)It describes the human-computer interface.
5

Good coupling is best characterised by which of the following?
A)Keeping the number of message types between objects to a minimum.
B)Ensuring that sub-classes are not strongly linked to their superclass.
C)Ensuring that operations in the same class are linked.
6

Which of the following is a beneficial consequence of good cohesion in a class?
A)The attributes in the class will only be accessed by the operations of that class.
B)The class will exhibit high levels of encapsulation.
C)The operations in the class will be easier to maintain.
7

The Liskov Substitution Principle is best described by which of the following?
A)A derived object may be treated as if it is the base object.
B)A derived object should be replaced by its base object.
C)Derived objects should be used instead of base objects.
8

Which of the following statements best describes what is involved in the task of designing associations?
A)It is concerned with how links between objects should be implemented.
B)Its main focus is determining the multiplicity of the associations.
C)It is concerned with specifying operations that may use the links between objects.
9

How many collection classes could sensibly be used to implement a two-way many-to-many association?
A)Two or more.
B)Two.
C)One.
10

If there is a dependency constraint between two or more attributes which of the following statements applies?
A)The value of none of the attributes should be changed.
B)If the value of one of the attributes is changed then all the others must be updated by one or more synchronizing operations.
C)Any change to the value of any of the attributes may require the other dependent attributes to be updated by one or more synchronizing operations.
11

Which of the following statements best describe the application of referential integrity during object design?
A)An object may only refer to another object if they share a link.
B)When an object is deleted all objects to which it refers must be deleted.
C)Referential integrity only applies for one-to-one associations.