CSI 3371 Exam 2

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which of the following statements about UML dependencies are true? (mult. answers) 1. a dependency represents a transient relationship between class objects 2. when an object A creates another object B, a create dependency exists between the objects A and B. 3. A dependency in UML should always be implemented in Java by defining a reference as a class member 4. 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 5. a solid line with an arrow at the one end is used to depict all types of dependencies

1, 2, 4

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) 1. B records A 2. B knows about A 3. B closely uses A 4. all of the above

1, 3

On p. 125, low __________ is represented by the Swiss Army Knife with multiple tools. On the other hand, the knife with only one blade represents high __________. On that same page, two people rowing represents tight __________ -- in other words, both must cooperate to make progress. In the boat with only one person rowing, there is no need for cooperation since only one person is rowing -- in other words, their behavior is no longer __________.

cohesion, cohesion, coupling, coupled

In the Low Coupling example in textbook, which of the following is a true statement as a solution in assigning responsibilities? (MULTIPLE ANSWERS) 1. We make Register call create on Payment so that the Sale class doesn't have to 2. We remove the call to create() from Register to Payment and place that responsibility with Sale 3. Because Register no longer has to know about Payment and only about Sale, instead of both, we have decreased the coupling of our objects 4. None of the above

2, 3

When talking about the GRASP Controller pattern the book mentions two types of controllers, what are they? (MULTIPLE ASNWERS) 1. primary controller 2. session controller 3. facade controller 4. intermediate controller

2, 3

Which of the following statements about GRASP is correct? (MULTIPLE ASNWERS) 1. GRASP is a visual modeling tool just like UML 2. GRASP is a methodology for object-oriented design based on responsibility-driven design 3. GRASP consists of a collection of design patterns that help us think in terms of object-oriented design 4. GRASP is not well suited for visual modeling

2, 3

"Interaction diagram" in a design model is a generalization used to refer to more specialized UML diagram types. What are those types? (MULT ANS) 1. system diagram 2. sequence diagram 3. state diagram 4. communication diagram 5. system sequence diagram 6. use case diagram

2, 4

Which GRASP pattern could we use when we are concerned about change in the system and its impact? 1. creator 2. information expert 3. high cohesion 4. low coupling

3, 4

Which one of the following are true statements about UML stereo types? Select all correct answers. 1. They are shown in curly braces ("{ }"). 2. ordered and disjoint are examples of stereotypes. 3. destroy and create (used on sequence diagrams) are examples of stereotypes. 4. A stereotype represents a refinement of an existing modeling concept. 5. A stereotype is defined within in a UML profile. 6. The UML does not allow any user-defined stereotypes. 7. The Object Management Group (OMG) provides many pre-defined stereotypes in the UML specification.

3, 4, 5, 7

What is a good example that should be shown as an "attribute" in a UML class diagram?

A pure data value, for example a number or text

A Conceptual (Domain) Model is _______

A representation of concepts in the problem domain

Which of the following is NOT a good description on information that should be described in a contract? * Name of operation, and parameters * Preconditions * Use cases this operation can occur with * Postconditions * All actions to be performed during the operation * Noteworthy assumptions about the state of the system or objects in the domain model before execution of the operation. * All primary actors of the use case that this operation can occur with

All actions to be performed during the operation, all primary actors of the use case that this operation can occur with

Which of the following is NOT a category that postconditions of an operation contract fall into? - Instance creation or deletion - Attribute change of value - Associations formed or broken - An algorithm or solution of the operation

An algorithm or solution of the operation

When constructing a domain model, __________

Association names should start with a capital letter and two classes may have several different associations between them.

Which of the following is true? - In OO design, a pattern is a named and well-known problem which can be applied to new contexts. - The problem "Who creates object X" is a knowing responsibility. - The domain model illustrates software classes while the design model illustrates conceptual classes. - Controller pattern decides what first object after UI layer should receive the message from UI layer.

Controller pattern decides what first object after UI layer should receive the message from UI layer.

(T/F) A domain model represents software classes.

False

(T/F) A foreign key attribute should be listed in the attribute compartment of a class to show its association to the other conceptual class.

False

(T/F) An SSD does not show inter-system events.

False

(T/F) Most SSDs are created in inception.

False

(T/F) SSD stands for Static Sequence Diagram.

False

(T/F) System events should be expressed in terms of the physical input device.

False

(T/F) UML SSDs are used to illustrate the system internal behaviors as UML Sequence Diagrams (SDs) do.

False

(T/F) Using evolutionary development, it is important to create a domain model that is as accurate as possible before creating sequence diagrams.

False

One way to identify concepts to include in a Conceptual (Domain) Model is to __________

Find nouns or noun-phrases in the problem description, use cases, and requirements specification.

What is the best way to determine the functional requirements of a program?

Find steps in use case scenarios that have a phrase similar to "the system does ..." or are in the system response column.

What is the acronym for UML's formal specification language for constraints? - UCL (Unified Constraint Language) - OCL (Object Constraint Language) - DCL (Design Constraint Language) - none of the above

OCL (Object Constraint Language)

Concepts in a conceptual (domain) model should include __________

Physical objects, places, transactions, events, policies, catalogs, contracts

The title of Section 2.6 is Design: Assigning __________, which constitutes __________ and not analysis. Analysis focuses on the "what" and design focuses on the __________. Also, analysis uses abstract __________, whereas software design deals with concrete software __________.

Responsibilities, design, how, concepts, objects

What does "RDD" stand for? - Requirments-Driven Design - Relation-Driven Design - Responsibility-Driven Design - Reasoning-Driven Design

Responsibility-Driven Design

What are good examples of specialization in a requirements model?

Student specializes Person. Oak specializes Tree.

(T/F) A domain model can be seen as a "visual dictionary" of terms or concepts that are associated with the given problem domain.

True

(T/F) A domain model is the most important model created during object-oriented analysis.

True

(T/F) An SSD is a picture that shows, for one particular scenario of a use case, the events that external actors generate.

True

(T/F) An association between two conceptual classes is inherently bidirectional. In other words, each class is aware of the other class via the identified association.

True

(T/F) For the events shown by external actors, an order is also shown.

True

Rather than use an attribute as a key that associates two types, you should do what?

Use an association.

The artifacts that can help your requirements modeling are use case diagrams, use cases and requirements-level class diagrams. Among these, behavioral aspects of the domain are described in _____

Use case diagrams only

Which of the following is true? (MULTIPLE ASNWERS) 1. If A uses B closely, then A is a creator of B. 2. Levels of coupling could be considered in isolation from Expert. 3. A facade could be any concept which the designer chooses to represent the whole system or a subsystem. 4. An interface-as-controller design increases the opportunity to reuse logic in future applications. 5. A class which is partially responsible for interacting with relational databases has Low cohesion.

1

Who are the four authors who wrote the "Bible" of design pattern books, often referred to as the GoF, "Gang-Of-Four". 1. Erich Gamma 2. Richard Helm 3. Ralph Johnson 4. Martin Fowler 5. Craig Larman 6. John Vlissides

1, 2, 3, 6

which one of the following is a true statement about synchronous messages? - when an object sends a synchronous message, it must wait for a response - A synchronous message is one sent by two objects at the same time. - A synchronous message always starts with the letter s. - Synchronous messages must always have a guard condition. - A synchronous message is represented by a line with a half arrow head.

When an object sends a synchronous message, it must wait for a response.

When there are other design alternatives, the book suggests to take a look at what? - coupling - cohesion - both - neither

both

When a class diagram is used for the purpose of representing a problem domain we call it a what? - domain class diagram - design class diagram - architectural class diagram - system class diagram - deployment class diagram

domain class diagram

What type of modeling are interaction diagrams used for? - dynamic - static

dynamic

(T/F) It is NOT possible to nest frames in a frame within a sequence diagram.

false

(T/F) while drawing an SSD, it is NOT relevant to know what events are coming into the system

false

Responsibility-driven design classifies responsibilities as: Type 1 responsibility (__________): Memorizing data or references Type 2 responsibility (__________): Performing computations Type 3 responsibility (__________): Communicating with other objects.

knowing, doing, communicating

Which of the following is NOT illustared in UML class diagrams? - classes - interfaces - dependencies - associations - lifelines

lifelines

In figure 18.6 on pg. 330, which message is the system message? - makeNewSale - Register's call to create Sale - Sale's call to create LineItems - none of the above

makeNewSale

The development of a conceptual (domain) model __________

may occur in parallel to the development of the use cases.

Fig. 2-33 shows several __________ at the top of the diagram, each represented by a rectangle. Each rectangle labeled with a colon followed by a class name represents an anonymous __________. The k:Key object, however, is a named object -- its name is "k".

objects, object

a sequence diagram describes... - only the interactions between objects; it does not describe what happens inside of an object - how an object state changes as a result of receiving an event - the interactions between objects and the activities that take place within an object - how an object is transformed by message - a detailed algorithm for a method

only the interactions between objects; it does not describe what happens inside of an object

Which of the following is NOT a true statement about operation contracts? - Operation contracts are useful to understand and identify what should happen when a complex system operation is invoked - postconditions in operation contracts should be expressed in the context of the domain model objects - postconditions in operation contracts should always be expressed in the present tense - when new instances are created, it is likely that associations to several objects need be established

postconditions in operation contracts should always be expressed in the present tense

a lifeline in a sequence diagram - represents an instance - represents a class - represents the body of a method - represents the exception handling mechanisms of an object - represents associations

represents an instance

On pg. 336 under, "calculating sale total" who did they determine to be responsible for calculating the sale total? - register - sale - salelineitem - none of the above

sale

A system sequence diagram is a visual representation of a usage __________ -- what we have called the "Main Success Scenario". In Fig. 2-20 the User represents the primary __________ from the use case and the system is represented as a single object. Here System is a class and the colon in front of the class name indicates that the rectangle represents an instance of System, i.e., an __________. The key purpose of the system sequence diagram (SSD) is to characterise the conversation that occurs between the actors and the __________, where the system is treated as a "black box".

scenario, actor, object, system

We show a strong aggregation (composition) with which type of arrow in association? - solid arrow - solid diamond arrow - open arrow - dashed arrow

solid diamond arrow

How are asynchronous messages shown in sequence diagrams? - filled arrow with solid line - filled arrow with dashed line - stick arrow with solid line - stick arrow with dashed line - dashed arrow with dashed line

stick arrow with solid line

A use case realization describes how a particular use case is realized with the Design model in terms of what? - the related objects - the associations between objects - the collaborating objects - none of the above

the collaborating objects

(T/F) A low cohesive object with many source lines of code probably collaborates with many other objects and all that interaction tends to also create high coupling.

true

(T/F) UML class diagrams support showing template classes that are typically known as templates or parameterized types in many programming languages.

true

True of false. Patterns help to facilitate communication.

true

____ is the ability of one object to "see" or have a reference to another object. - transparency - visibility - navigability - none of the above

visibility

how do we indicate a singleton instance in a class diagram? - <<singleton>> - with a '1' in the upper right-hand corner - just draw a single one - none of the above

with a '1' in the upper right-hand corner

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 subsystem design describes only the signatures of operations in a subsystem's interface. - A subsystem design describes the internal detail of a design. - A good subsystem design can commence after the subsystem interfaces are defined. - A subsystem design describes how a subsystem discharges of its responsibilities. - A subsystem design can consist of class diagrams and interaction diagrams that describe the inner workings of a subsystem.

A subsystem design describes only the signatures of operations in a subsystem's interface.

which one of the following is NOT true for an association - a binary relationship between two classes must be represented by two separate associations - a link between objects is an instance of an association between the object classes - an association must have either a name or role names at its ends - an association must have at least two ends - an association must have multiplicities at both ends

a binary relationship between two classes must be represented by two separate associations

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? - fragments can be nested - the alt fragment is used to show alternative interactions - the par fragment is used to show groups of interactions that can occur in parallel - a neg fragment describes interactions that are optional - a fragment can span multiple lifelines

a neg fragment describes interactions that are optional

Communication diagrams work well for which of the following? - UML as sketch - formal modeling - agile modeling environment - all of the above

all of the above


Set pelajaran terkait

Penny Ultrasound chapter 16 the Female Pelvis

View Set

Learn Python the Hard Way Ex41.py: "Learning to Speak Object Oriented"

View Set

BRS Pharmacology - Chapter 12 Cancer Chemotherapy

View Set

Fashion Business Practices Midterm

View Set

HELP DESK TIER 1 INTERVIEW QUESTIONS

View Set

ECON 102 Chapter 1 (Economics: Foundations and Models)

View Set

chapter 8-9 insuring your life and health

View Set