Deck 12: Other Class and Object Relationships
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/30
Play
Full screen (f)
Deck 12: Other Class and Object Relationships
1
The ends of an association relationship are marked by unfilled diamonds.
False
2
Iterative design is best described as
A)a design approach that focuses on parts of a design independently of others.
B)improving or adding to a design as one's understanding of the problem increases.
C)reusing design components from the same project or other projects.
D)emphasizing the relationships between classes throughout the design process.
A)a design approach that focuses on parts of a design independently of others.
B)improving or adding to a design as one's understanding of the problem increases.
C)reusing design components from the same project or other projects.
D)emphasizing the relationships between classes throughout the design process.
B
3
A trip includes stops at four well-known tourist sites is an example of
A)association.
B)composition.
C)generalization/specialization.
D)aggregation.
A)association.
B)composition.
C)generalization/specialization.
D)aggregation.
D
4
Associations provide the connections with which objects of different classes can interact.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
5
Which of the following statements is not true of a composite?
A)A composite may add additional parts during its lifetime.
B)A composite may destroy one or more of its parts during its lifetime.
C)A composite may share a part with one or more other composites.
D)A composite has responsibility for the disposition of its parts.
A)A composite may add additional parts during its lifetime.
B)A composite may destroy one or more of its parts during its lifetime.
C)A composite may share a part with one or more other composites.
D)A composite has responsibility for the disposition of its parts.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
6
A role name is used to distinguish between the parent and the child in a relationship.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
7
A role name is optional for a relationship that is a self-association.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
8
The multiplicity symbol that indicates a person can work for at most one company at any one time is
A)1.1
B)n 1
C)0.1
D)1,1
A)1.1
B)n 1
C)0.1
D)1,1
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
9
Which of the following statements is not a common advantage of object-oriented design?
A)higher productivity
B)higher quality
C)increased reuse
D)increased maintenance
A)higher productivity
B)higher quality
C)increased reuse
D)increased maintenance
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
10
A relationship where the lifetimes of parts are independent of the lifetime of the whole is best described as a(n)
A)generalization/specialization.
B)composition.
C)aggregation.
D)association.
A)generalization/specialization.
B)composition.
C)aggregation.
D)association.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
11
Which of the symbols below means "zero or more,without limit"?
A)0).*
B)0).
C)0,1,2,…
D)-1..*
A)0).*
B)0).
C)0,1,2,…
D)-1..*
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
12
A relationship where the whole is responsible for the disposition of its parts is called
A)generalization/specialization.
B)association.
C)composition.
D)aggregation.
A)generalization/specialization.
B)association.
C)composition.
D)aggregation.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
13
The multiplicity symbol 1..4 means
A)1 or 4
B)1 and 2 and 3 and 4
C)2 or 3
D)1 or 2 or 3 or 4
A)1 or 4
B)1 and 2 and 3 and 4
C)2 or 3
D)1 or 2 or 3 or 4
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
14
A magazine for teens is a kind of publication is an example of
A)composition.
B)generalization/specialization.
C)aggregation.
D)association.
A)composition.
B)generalization/specialization.
C)aggregation.
D)association.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
15
The phrase "has-a" relationship is sometimes used in connection with
A)aggregation.
B)association.
C)composition.
D)generalization/specialization.
A)aggregation.
B)association.
C)composition.
D)generalization/specialization.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
16
A line connecting two classes on a class diagram represents a
A)binary association.
B)binary aggregation.
C)message.
D)switch.
A)binary association.
B)binary aggregation.
C)message.
D)switch.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
17
An inner class
A)operates with complete independence from its enclosing class.
B)contains one or more components that are part of an aggregation.
C)has access to all of its enclosing class's members,even if they are private.
D)is a common means of implementing composite relationships.
A)operates with complete independence from its enclosing class.
B)contains one or more components that are part of an aggregation.
C)has access to all of its enclosing class's members,even if they are private.
D)is a common means of implementing composite relationships.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
18
An object may be a part of only one composite at a time.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
19
A composite relationship is represented on a class diagram by a(n)
A)unfilled diamond.
B)unfilled arrow.
C)solid-filled diamond.
D)solid-filled arrow.
A)unfilled diamond.
B)unfilled arrow.
C)solid-filled diamond.
D)solid-filled arrow.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
20
A class that has one or more classes defined within it is called a(n)
A)superclass.
B)container class.
C)inner class.
D)enclosing class.
A)superclass.
B)container class.
C)inner class.
D)enclosing class.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
21
An aggregate can send messages to its parts during processing.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
22
Cycles are not allowed in the paths of aggregation links.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
23
An object-oriented approach to design tends to promote programmer productivity.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
24
An aggregate class can have multiple parts.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
25
Applications designed using an object-oriented approach are resistant to change.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
26
An enclosing class cannot contain private data members.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
27
An inner class inherits data and methods from its enclosing class.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
28
Composition is not a form of aggregation.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
29
The methods of a composite class must check for memory allocation/deallocation situations.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
30
Removing a part from a relationship is a way of destroying the part.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck