OOADQuestion-lect2 ObjectOrientedParadigm
OOADQuestion-lect2 ObjectOrientedParadigm
Question 6. Which two statements are true about interfaces? (Choose two)
A. The interface should have a clear purpose.
B. A single interface should include as many possible methods, if not all methods,
that may be shared by objects that implement the interface.
C. An interface should be used to restrict which methods are exposed to a client.
D. Classes may have multiple interfaces depending on the purpose of each
interface it implements.
1
Question 7. What is a named object in UML?
A. Matt:Employee
B. :Employee
C. Matt::Employee
D. ::employee
Question 8. An architect looks at two classes. The first class has the following
operations: getName(),getSize(),getTotal(), and findAverage(). The second
class has the following operations: getName(),getSize(), findAverage(),
findMinimum(), and findMaximum(). The two classes share the same
superclass. Which operations are most likely contained in the superclass?
A. getName(), getSize(), and findAverage()
B. findMaximum(), findMinimum(), getSize(), and getTotal()
C. getName(), findAverage(), and findMaximum()
D. getName(), getSize(), getTotal(), and findAverage()
2
Question 13. Objects that are polymorphic _____.
A. must have the same attributes
B. share all the same operations, and the operations perform the same
C. can only be implemented through interfaces
D. may have the same operation names but the operations perform differently
Question 14. Which two characteristics do all objects have? (Choose two)
A. primitives
B. state and behavior
C. interfaces
D. a unique identity
3
Question 19. Which statement is true about an active object?
A. It is an independent object that can communicate with other active objects
asynchronously.
B. It does not contain state.
C. It is dependent on the overall system execution.
D. It is unstructured to allow the class to be manipulated easily.
Question 22. In a state diagram, a state has two transitions. One of the
transitions is an internal transition and the other is an external transition.
Which state(s) can perform an exit action?
A. the internal transition only
B. the external transition only
C. neither the internal nor the external transition
D. both the internal and external transitions
4
Question 24 What is a gate?
A. a parameter that represents a message that crosses the boundary of an
interaction or interaction fragment
B. a defined protocol for accessing the internals of a subsystem
C. a decision point in a state machine that has more than two alternatives
D. a set of checkpoints each subsystem design must satisfy before it can be
assigned for implementation
A. fork
B. initial state
C. decision
D. transition
E. final state
F. event
G. state
H. guard condition
5
Question 26. In the diagram, what is H?
A. fork
B. initial state
C. decision
D. transition
E. final state
F. event
G. state
H. guard condition
Question 27. Which entity has a well-defined boundary and identity that
encapsulates state and behavior?
A. class
B. object
C. component
D. package
Question 28. In a dependency, through what reference does the client class
gain visibility to the supplier?
A. local reference
B. parameter reference
C. global reference
D. field reference
6
Question 30. In the diagram, what is F?
A. fork
B. initial state
C. decision
D. transition
E. final state
F. event
G. state
H. guard condition
A. forks
B. initial states
C. decisions
D. transitions
E. final states
F. events
G. states
7
H. guard conditions
A. fork
B. initial state
C. decision
D. transition
E. final state
F. event
G. state
H. guard condition
A. fork
B. initial state
C. decision
D. transition
E. final state
8
F. event
G. state
H. guard condition
A. fork
B. initial state
C. decision
D. transition
E. final state
F. event
G. state
H. guard condition
A. fork
9
B. initial state
C. decision
D. transition
E. final state
F. event
G. state
H. guard condition
A. fork
B. initial state
C. decision
D. transition
E. final state
F. event
G. state
H. guard condition