Exam 2 Flashcards
(71 cards)
How do we indicate a Singleton instance in a class diagram?
With a ‘1’ in the upper right-hand corner
A sequence diagram describes
only the interactions between objects; it does not describe what happens inside of an object.
Which of the following statements about UML dependencies are true? (multiple answers)
A. A dependency represents a transient relationship between class objects.
B. When an object A creates another object B, a create dependency exists between the objects A and B.
C. A dependency in UML should always be implemented in Java by defining a reference as a class member.
D. If an object of class A is passed in as a parameter to a method defined in class B, then a dependency exists between class A and class B.
E. A solid line with an arrow at the one end is used to depict all types of dependencies.
A, B, D
A lifeline in a sequence diagram
represents an instance.
To handle the logic (e.g., looping) required for a sequence being modeled, we can use frames with appropriate operators (e.g., loop for looping), which is formally called “sequence diagram fragments.” Which one of the following statements about sequence diagram fragments is not true?
A. Fragments can be nested.
B. The alt fragment is used to show alternative interactions.
C. The par fragment is used to show groups of interactions that can occur in parallel.
D. A neg fragment describes interactions that are optional.
E. A fragment can span multiple lifelines.
D
Which one of the following is not true for an association?
A. A binary relationship between two classes must be represented by two separate associations.
B. A link between objects is an instance of an association between the object classes.
C. An association must have either a name or role names at its ends.
D. An association must have at least two ends.
E. An association must have multiplicities at both ends.
A.
Which one of the following is a true statement about synchronous messages?
A. When an object sends a synchronous message, it must wait for a response.
B. A synchronous message is one sent by two objects at the same time.
C. A synchronous message always starts with the letter s.
D. Synchronous messages must always have a guard condition.
E. A synchronous message is represented by a line with a half arrow head.
A
Which one of the following is not a true statement about subsystem design?
Note: While the architectural modeling is done to show static/dynamic relations among subsystems, the subsystem modeling shows the design of each subsystem.
A. A subsystem design describes only the signatures of operations in a subsystem’s interface.
B. A subsystem design describes the internal detail of a design.
C. A good subsystem design can commence after the subsystem interfaces are defined.
D. A subsystem design describes how a subsystem discharges of its responsibilities.
E. A subsystem design can consist of class diagrams and interaction diagrams that describe the inner workings of a subsystem.
A
What type of modeling are interaction diagrams used for?
Dynamic
Which of the following is not illustrated in UML class diagrams?
A. Classes
B. Interfaces
C. Dependencies
D. Associations
E. Lifelines
E
“Interaction diagram” in a design model is a generalization used to refer to more specialized UML diagram types. What are those types? (multiple answers)
A. System diagram
B. Sequence diagram
C. State diagram
D. Communication diagram
E. System sequence diagram
F. Use case diagram
B & D
Communication diagrams work well for which of the following?
A. UML as sketch
B. Formal modeling
C. Agile modeling environment
D. All of the above
D
True or false. It is not possible to nest frames in a frame within a sequence diagram.
False
How are asynchronous messages shown in sequence diagrams?
A. Filled arrow with solid line
B. Filled arrow with dashed line
C. Stick arrow with solid line
D. Stick arrow with dashed line
E. Dashed arrow with dashed line
C
When the class diagram notation is used for the purpose of representing a problem domain, what do we call it?
A. Domain class diagram
B. Design class diagram
C. Architectural class diagram
D. System class diagram
E. Deployment class diagram
A
Which one of the following are true statements about UML stereo types? Select all correct answers.
A. They are shown in curly braces (“{ }”).
B. ordered and disjoint are examples of stereotypes.
C. destroy and create (used on sequence diagrams) are examples of stereotypes.
D. A stereotype represents a refinement of an existing modeling concept.
E. A stereotype is defined within in a UML profile.
F. The UML does not allow any user-defined stereotypes.
G. The Object Management Group (OMG) provides many pre-defined stereotypes in the UML specification.
C, D, E, G
We show a strong aggregation (composition) with which type of arrow in association?
Solid Diamond Arrow
What is the acronym for UML’s formal specification language for constraints?
OCL (Object Constraint Language)
True or false. UML class diagrams support showing template classes that are typically known as templates or parameterized types in many programming languages.
True
With regard to the creator pattern, we should assign class B the responsibility of creating an instance of class A if which of the following conditions are true? (multiple answers)
A. B records A
B. B knows about A
C. B closely uses A
D. All of the above
A, C
Who are the four authors who wrote the “Bible” of design pattern books, often referred to as the “Gang-Of-Four” (GoF)?
Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
Which of the following statements about GRASP is correct? (multiple answers)
A. GRASP is a visual modeling tool just like UML
B. GRASP is a methodology for object-oriented design based on responsibility-driven design
C. GRASP consists of a collection of design patterns that help us think in terms of object-oriented design
D. GRASP is not well suited for visual modeling
B & C
Which of the following is true? (multiple answers)
A. If A uses B closely, then A is a creator of B. Levels of coupling could be considered in isolation from Expert.
C. A facade could be any concept which the designer chooses to represent the whole system or a subsystem.
D. An interface-as-controller design increases the opportunity to reuse logic in future applications.
E. A class which is partially responsible for interacting with relational databases has Low cohesion.
A & C
Which of the following is true?
A. In OO design, a pattern is a named and well-known problem which can be applied to new contexts.
B. The problem “Who creates object X” is a knowing responsibility.
C. The domain model illustrates software classes while the design model illustrates conceptual classes.
D. Controller pattern decides what first object after UI layer should receive the message from UI layer.
D