0% found this document useful (0 votes)
5 views1 page

Object Oriented Programming Using c++[0873-0873]

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Object Oriented Programming Using c++[0873-0873]

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Chapter 16

846

17. True or false: Attribution is one of the major class relationships.


18. Assume there is an association between class A and class B. Also, objA is an object of
class A, and objB is an object of class B. Which of the following applies?
a. objA may send a message to objB.
b. Class B must be a subclass of class A, or vice versa.
c. objB must be an attribute of class A, or vice versa.
d. objB may help objA carry out a task.
19. The LANDLORD program makes use of
a. generalization.
b. association.
c. insubordination.
d. aggregation.
20. True or false: In a class diagram, an association is shown as a relationship between
objects.
21. In a sequence diagram
a. time goes from left to right.
b. associations go from right to left.
c. horizontal arrows represent messages.
d. vertical dotted lines represent lifetime.
22. A sequence diagram shows messages from one ________ to another.
23. True or false: A sequence diagram often describes a single use case.
24. In a sequence diagram, when a new class instance is created
a. a rectangle with its name is drawn at the appropriate vertical coordinate.
b. a large X marks the point in time.
c. its activity box begins.
d. its lifeline begins.

Projects
We don’t have room in this book for exercises involving the kind of projects involved in this
chapter. However, we list some suggestions for projects you may want to pursue on your own.
1. Reread the explanation of the HORSE program from Chapter 10, “Pointers,” but do not
look at the code. Create a use case diagram and a class diagram for this program. Use the
results to create a .H file, and compare your results with the program. There are many
correct results.

You might also like