1/180
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Which of the following is the best description of a Controller?
a) An expert class
b) A creator class
c) An object that controls the behavior of many other system objects.
d) An object that is responsible for handling a system operation.
e) a command pattern that handles individual elements.
D.
A lifeline in a sequence diagram
a) represents an instance
b) represents a class
c) represents the body of a method
d) represents the exception handling mechanism of an object
e) represents associations
A.
Which of the following is a true statement about synchronous message?
a) A synchronous message always starts with the letter s
b) A synchronous message is represented by a line with a half arrow head
c) When an object sends a synchronous message it must wait for a response
d) A synchronous message is one sent by two objects at the same time
e) Synchronous messages must always have guard condition.
C.
GoF patterns are classified based on three purpose categories: creational, structural, and behavioral patterns. Which of the following is NOT what GoF behavioral patterns are concerned with?
a) algorithms
b) how objects are created
c) patterns of objects and classes
d) assignment of responsibilities between objects
e) patterns of communications between objects
B.
Briefly explain each of the following so that the difference in modeling view can be highlighted:
a) a system sequence diagram (SSD)
b) An architectural sequence diagram (or a subsystem sequence diagram) that is a part of an architectural model
c) A sequence diagram (SD) **
a) The system is viewed as a black box, implementation is hidden, and all that is shown is requests from user and responses from the system (the interaction between the user and system).
b) This modeling view focuses on subsystems and interfaces where subsystems can handle specific requests, but there is still some level of abstraction.
c) This modeling removes the layer of abstraction set forth by the SSD, showing all system calls as well as the respective instances of classes and objects that handle user requests and have specific responsibilities.
The following is a design class model and a sequence diagram for a payroll management subsystem: { See Notes for part 3 diagrams }
Read this then answer: https://docs.google.com/document/d/13uVAbDXzTPB6RzvlRFhhcjrj6H41K2o2FE1z0_HrGZs/edit?usp=sharing
1) A payrollManager object must have at least one Employee object associated with it [T/F]
2) A Bonus object is not allowed to have any Employee objects associated with it [T/F]
3) An Employee object can access the PayRollManager object it is connected to [T/F]
4) The design explicitly states that a Bonus object can access any Employee objects associated with it [T/F]
5) There can be a Division object with no employees [T/F]
6) All Employee objects that are associated with a Division object are associated with the same PayrollManager object [T/F]
1) False
2) False
3) False
4) False
5) True
6) False
EXAM2_6
GRASP Controller: https://en.wikipedia.org/wiki/GRASP_(object-oriented_design)#Controller
The GRASP concept of a Controller does not appear to be fully supported. There does not appear to be an obvious interface which delegates requests and enables PayrollManager to generate payrolls.
Changing employee type would be relatively easy. To add this functionality, simply add a setType() method to the Employee class which will allow us to change an employee's type.
Adding a new employee type would also be easy. We would simply add any additional types to the EmployeeType enumeration; however, each employee has a specific pay rate associated with it, so adding a new type would also require a new rate to be defined.
Bonuses have a few dependents so this would be slightly difficult to add. To do so, a new bonus type would be added to the Bonus class. However, each bonus is associated with a pay rate so a new bonus rate must also be defined.
??? LAST PART ???
Be able t do Q9 from in class pop quiz over observer pattern
see quiz handout pic on phone
GoF patterns are classified based on three purpose categories: creational, structural, and behavioral patterns. Which one of the following is NOT what GoF (Gang of Four) behavioral patterns are concerned with?
how objects are created
Which of the following is true with GoF design patterns?
Command pattern separates (or decouples) the invoker from the receiver by creating an interface in-between them.
Which of the following can be one best answer to the question "why is the Facade pattern a useful wrapper for a subsystem"?
It provides a simple interface for clients to use a complex subsystem
Why is Singleton pattern used?
To insure that there is only one instance of a particular class
Which design pattern best matches with the following description?
It accesses elements of a container without exposing its representation. It is useful when multiple traversal algorithms are required over a container but a uniform traversal interface over different containers is desirable.
Iterator Pattern
Which design pattern best matches with the following description?
It centralizes operations on an object structure so that they can vary independently but still behave polymorphically. It is useful when classes define many unrelated operations and class relationships of objects in the structure rarely change, but the operations on them change often.
Visitor Pattern
Which design pattern best matches with the following description?
It converts the interface of a class into an interface that a client expects and allows incompatible classes to work together. It is useful when one needs to adapt the interface of an existing class to satisfy client interface requirements (e.g., legacy software, 3rd party software).
Adaptor Pattern
Which design pattern best matches with the following description?
It creates families of related objects without specifying class names and is used when clients cannot anticipate groups of classes to instantiate.
Abstract Factory Pattern
Which design pattern best matches with the following description?
It defines a one-to-many dependency between objects so that all dependents are notified & updated when one object changes its state.
Observer Pattern
Which design pattern best matches with the following description?
It is used when we want to augment objects with new responsibilities but extension by subclassing is impractical.
Decorator Pattern
Which design pattern best matches with the following description?
It defines a family of algorithms, and encapsulates each algorithm to make entire algorithms interchangeable. It is useful when an object should be configurable with one of many algorithms, and all algorithms can be encapsulated, and one interface covers all encapsulations. [Hint: encapsulating each collision detection algorithm]
Strategy Pattern
Which design pattern best matches with the following description?
It encapsulates the request for a service and is used to parameterize objects with an action to perform and to specify, queue, & execute requests at different times. It allows a multilevel undo/redo typically.
Command Pattern
Which design pattern best matches with the following description?
It is used when objects must be composed recursively, and no distinction between individual & composed elements, and objects in structure can be treated uniformly.
Composite Pattern
The title of Section 2.6 is Designing: 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
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
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 age, 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
T/F: Most SSDs are created in inception.
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
Which of the following is NOT a category that post-conditions of an operation contract fall into?
a) Instance creation or deletion.
b) Attribute change of value.
c) Associations formed or broken.
d) An algorithm or solution of the operation.
d
Which of the following is NOT a true statement about operation contracts?
a) Operation contracts are useful to understand and identify what should happen when a complex system operation is invoked.
b) Post-conditions in operation contracts should be expressed in the context of the Domain Model objects.
c) Post-conditions in operation contracts should always be expressed in the present tense.
d) When new instances are created, it is likely that associations to several objects need to be established.
c
T/F: While drawing an SSD, it is NOT relevant to know what events are coming into the system.
False
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 anonymous _________. The k:Key object, however, is a named object -- its name is "k".
objects, object
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 characterize the conversation that occurs between the actors and the __________, where the system is treated as a "black box".
scenario, actor, object, system
Which of the following are true about an SSD? (multiple answers)
a) SSD stands for Static Sequence Diagram.
b) An SSD is a picture that shows, for one particular scenario of a use case, the events that external actors generate.
c) For the events shown by external actors, an order is also shown.
d) An SSD does not show inter-system events.
b, c
Which of the following is NOT a good description of information that should be described in a contract? (multiple)
a) Name of operation, and parameters
b) Preconditions
c) Use cases this operation can occur with
d) Post-conditions
e) All actions to be performed during the operation
f) Noteworthy assumptions about the state of the system or objects in the domain model before execution of the operation
g) All primary actors of the use case that this operation can occur with
e, g
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)
a) A dependency represents a transient relationship between class objects.
b) When an object A creates another object B, a create dependency exists between 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 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 end.
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 sens 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)
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
T/F: It is NOT possible to nest frames in a frame within a sequence diagram.
F
How are asynchronous messages shown in sequence diagrams?
stick arrow with solid line
When a class diagram is used for the purpose of representing a problem domain we call it a what?
domain class diagram
Which one of the following are true statements about UML stereo types? (multiple)
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 constraints?
OCL (object constraint language)
T/F: UML class diagrams support showing template classes that are typically known as templates or parameterized types in many programming languages.
T
________ is the ability of one object to "see" or have a reference to another object.
visibility
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)
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 GoF, "Gang-Of-Four".
a) Erich Gamma
b) Richard Helm
c) Ralph Johnson
d) Martin Fowler
e) Craig Larman
f) John Vlissides
a, b, c, f
Which of the following statements about GRASP is correct? (multiple)
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)
a) If A uses B closely, then A is a creator of B.
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
Which GRASP pattern could we use when we are concerned about change in the system and its impact?
a) Creator
b) Information Expert
c) High Cohesion
d) Low Coupling
c, d
When there are other design alternatives, the book suggests to take a look at what?
a) coupling
b) cohesion
c) both
d) neither
c
When talking about the GRASP Controller pattern the book mentions two types of controllers, what are they? (multiple)
a) Primary controller
b) Session controller
c) Facade controller
d) Intermediate controller
b, c
What does "RDD" stand for?
Responsibility-Driven Design
T/F: Patterns help to facilitate communication.
T
On pg. 336 under, "calculating sale total" who did they determine to be responsible for calculating the sale total?
sale
In the Low Coupling example in textbook, which of the following is a true statement as a solution in assigning responsibilities? (multiple)
a) We make Register call create on Payment so that the Sale class doesn't have to
b) We remove the call to create() from Register to Payment and place that responsibility with Sale
c) Because Register no longer has to know about Payment and only about Sale, instead of both, we have decreased the coupling of our objects
d) none of the above
b, c
In figure 18.6 on pg. 330, which message is the system message?
makeNewSale
A use case realization describes how a particular use case is realized with the Design model in terms of what?
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.
T
Scrum is a ___________ software process, as opposed to a "heavy" process that is document-driven. It's mantra is "__________ and _________", which means that the process intentionally tries to improve both the product and the process during development.
lightweight, inspect, adapt
A Scrum team usually consists of about ____ people, "plus or minus two". (Another reference suggests that the team should be based on how many people two pizzas would feed. Too many people, too many pizzas.)
In Scrum parlance, when a team works in short, sustainable bursts it is called a _________.
7, sprint
There are only _______ Scrum roles. The product ________, the Scrum __________ , and a team _________.
three, owner, master, member
Identify each responsibility/characteristic (below) with one of the following, by typing the appropriate letter:
a. Scrum master
b. Team member
c. Product owner
Responsibility/Characteristic
- Owns the product backlog
- Coaches
- Represents customer and stakeholders
- Prioritizes items in the product backlog
- Facilitates
- Creates and owns estimates
- A peer within the team
- Set apart by knowledge and responsibilities, but not by rank
- Initiates user stories
- Completes user stories
c, a, c, c, a, b, a, a, c, b
The product backlog contains a prioritized list of ________ stories. These backlog items could describe features, bug ________, documentation ________, or anything else that takes time and commitment.
The highest priority items should be ________, i.e., specific and limited. Toward the lower end of the list the items will be ________ and much less well ________.
user, fixes, changes, small, larger, understood
Each user story should
- identify the user (or users) who will _______
- describe the desired _______
- state why it is _________
- estimate how much work would be required to ________ it
- state the _________ requirement
benefit, functionality, valuable, implement, acceptance
The sprint backlog represents the "to-do" list for the sprint. It represents a subset of the product ___________ and it represents only those items for which the team has made a specific __________.
For each item in the sprint backlog, the team identifies a set of specific ________ that will be used to implement the user story.
A task board is typically used to represent the status of the sprint. Each row on the board is associated with a particular _____________-. Within a row each of the tasks is classified as "to do", "in progress", or _____________.
backlog, commitment, tasks, task, done
The Scrum diagram that show "what is left to do" is called a __________ chart. The horizontal axis is associated with ________ and the vertical axis indicates how much has been __________, usually in terms of effort. The amount of effort on "day zero" represents the total amount of _________ that has been estimated for the sprint. The far-right point on the horizontal axis indicates when the sprint will ___________.
burn, time, completed, effort, end
T/F: The product owner defines what is meant by "done", with respect to the sprint.
F
T/F: In Scrum terminology, an iteration is called a sprint.
T
T/F: In Scrum terminology, meetings are called ceremonies.
T
There are two major decisions that must be made during a sprint cycle:
- Is the product potentially _______?
- Does it make business sense to ________ what we currently have?
shippable, ship
At the start of each sprint there is a _________ meeting. Two things are addressed:
- ___________ will we do?
- ___________ will we do it?
The output from the first question is the sprint ___________. And the output from the second is a set of _________ for each user story.
planning, what, how, backlog, tasks
During the first part of the sprint planning meeting the product __________ presents each story that they want completed during the sprint.
Both the team and the owner discuss each story and review its ____________ criteria. Then the _____________ decides whether the story will be part of the sprint. It is important to note that it is the ____________ that commits to the stories, and not the owner. In other words, the ___________ now owns each story that becomes part of the sprint.
owner, acceptance, team, team, team
The daily scrum lasts no more than ______ minutes -- which is why it is called a daily __________ meeting. Each member shares:
- The ________ that they have completed since the last daily scrum.
- The tasks that they _____ to complete by the next daily scrum
- Any _______ that are slowing them down
The goal of this meeting it so Inspect (during the meeting) and Adapt (after the meeting).
15, stand-up, tasks, expect, obstacles
A software process prescribes the interrelationship among the phases by expressing their order and frequency, but does not define the deliverables of the project (T/F)
False
The inception of a product is where product ideas are formulated and a vision is established. (T/F)
True
Requirements analysis is performed before the planning phase. (T/F)
False
Within most software process models, the following phases are followed:
planning, implementation and testing
requirements analysis, design, implementation, testing
inception, planning, requirements analysis, design, implementation,
testing, maintenance
none of the above
inception, planning, requirements analysis, design, implementation,
A software design document is used as input to the:
Testing
Design
Implementation
none of the above
Implementation
An advantage of using the waterfall process is that resources are always active and never idle waiting for others to complete dependent tasks. (T/F)
False
The results of the design phase are typically captured in the Software Project Management Plan. (T/F)
False
During the maintenance phase, modifications are made to the software usually arise due to:
Software defects
Customer enhancement requests
Performance or reliability improvements
all of the above
none of the above
all of the above
The intention of internal releases is to send to customers for evaluation. (T/F)
False
Advantages of the spiral model are:
Risks are managed early and throughout the process
It is more cost effective
It requires fewer resources
all of the above
Risks are managed early and throughout the process
The Agile process advocates the following:
Small, close knit teams
Regular, frequent, customer meetings
code-centric approach
all of the above
none of the above
all of the above
Which is a reason for an organization not to make a project open source:
To gain market knowledge
To support core business
To have many individuals add to the code base
To support services
To have many individuals add to the code base
Agile process is an alternative to more classical approaches which are considered too "process heavy". (T/F)
True
The Agile manifesto is anti-methodology and advocates not using any methodology when developing a software product. (T/F)
False
Agile methods advocate delivering working software, but not testing the working software. (T/F)
False