Ch 6 discussion

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

List and describe the steps an analyst would follow in building a behavioral state diagram

Set the context, which typically would be a class but may also be a set of classes, a subsystem, or an entire system Identify the initial, final, and stable states of the object Determine the order in which the object will pass through the stable states Identify the events, actions, and guard conditions associated with the transitions Validate the behavioral state diagram

What is a sequence diagram used for? Why would an analyst choose a sequence diagram over a communication diagram?

: A sequence diagram is an interaction diagram (as is the communication diagram) that looks at the time-based order of the messages among the objects in the use case. Sequence diagrams are constructed by placing the objects across the top of the diagram, and drawing the messages from lifeline to lifeline, from top to bottom to reflect the time-based order of the messages. Communication diagrams are essentially object diagrams that show message passing relationships instead of associations. These diagrams help you see the pattern of activity that occurs over a set of collaborating classes. Unlike sequence diagrams, they are unable to indicate time-ordering of messages. An analyst would choose to draw a sequence diagram if this time-based order is important to the analysis of the use case under study.

How does a communication diagram differ from a sequence diagram? Why would an analyst choose to draw a communication diagram?

A communication diagram emphasizes the flow of messages through a set of objects, while the sequence diagram focuses on the time ordering of the messages that are being passed. If the focus of the analyst is on understanding how a set of collaborating objects interact with one another, then a communication diagram is more appropriate. If the time sequence of the message were of interest to the analyst, then he or she would create a sequence diagram.

How are guard conditions shown on a behavioral state machine?

A guard condition is a Boolean expression that includes attribute values, which allows a transition to occur only if the condition is true. The Boolean expression is placed in brackets and located along the relevant transition.

When drawing a sequence diagram, the analyst uses lifelines and a symbol to represent the execution occurrence. It is also possible for an object to be destroyed at some point in time. Explain these three concepts - what is a lifeline, what does the execution occurrence mean, and how it is possible that an object can be destroyed in a use case. Show the diagramming symbols used to represent each of these concepts.

A lifeline extends vertically down from the object, representing literally its life in the system. Most objects have an unlimited life in the use case, so there is nothing that denotes an end to its life (obviously it ends at the end of the diagram). The lifeline is drawn as a dashed vertical line. An execution occurrence symbol is placed on the lifeline to represent when that particular object is sending or receiving messages. Thus, it shows when, in the life of the object, it is the focus of the use case. The focus of control is drawn as a long, narrow rectangle that is placed on top of the vertical lifeline. An object may be destroyed in a use case if it is a temporary object. For example, a web-based shopping cart will disappear once checkout occurs. If there is a temporary object, the lifeline is shortened, and an X is placed at the bottom of the lifeline to represent the end of the life. Response: See page 241

Explain the syntax for drawing behavioral state diagrams.

A state in a behavioral state diagram is shown as a rectangle with rounded corners. Inside the rectangle, the name of the state is indicated. An initial state, which indicates the point at which the object begins to exist, is shown using a small filled-in circle. A final state, which indicates the completion of an activity, is shown as a circle around a small solid filled circle (bull's eye). An event, which typically triggers a state transition, is used to label a transition. A transition is shown as a solid arrow from one state to another, labeled by the event name. A frame indicates the context of the behavioral state machine.

Explain the term transition.

A transition is a relationship that represents the movement of an object from one state to another. Some state transitions are conditional. Such conditional transitions are associated with a guard condition. A guard condition is a Boolean expression that includes attribute values, and it allows a state transition to occur only if the condition is true. An object moves from one state to another based on the outcome of an action that is triggered by an event. Response: See page 250

Explain the terms event, action and activity.

An event is something that takes place at a certain point in time and changes value(s) that describe an object. This in turn causes a change in the state of the object. Examples of events include a condition becoming true, a receipt of a call fro a method by an object, and the passage of a designated period of time. An action is an atomic, non-decomposable process that cannot be interrupted. Actions are often modeled as if they are completed in zero time, and they are associated with a transition. An activity is a non-atomic, decomposable process that can be interrupted. Activities take a long period of time to complete, they can be started or stopped by actions, and they are associated with states.

Describe behavioral state machines

Behavioral state diagrams show the various states that a single object passes through during its life in response to events; it also shows the responses and actions of the object to those events. The focus of this diagram is a single object and how it changes over time, while the sequence and collaboration diagrams look at the interaction among objects. Behavioral state diagrams distinguish between an initial state and a final state. They include states and transitions from one state to another. Another component of behavioral state diagrams is conditional state transitions.

What does the acronym CRUD stand for? Why would an analyst create a CRUD matrix during his analysis?

CRUD stands for Create, Read or Reference, Update, and Delete. These are the four possible interactions between classes in a system. An analyst would create a CRUD matrix to help identify potential collaborations while building a communication diagram. (Step 2 of building a communication diagram). CRUD matrix clearly identifies how objects create, reference, modify and delete other objects. Response: See pages 256

Describe communication diagrams.

Communication diagrams are also a type of interaction diagrams. These diagrams are essentially object diagrams that show message passing relationships instead of associations. These diagrams help you see the pattern of activity that occurs over a set of collaborating classes. Unlike sequence diagrams, they are unable to indicate time-ordering of messages. Primary components of a communication diagram include actors, objects, and messages.

When looking at a CRUD matrix, why would it be important to see "D" in a column for a temporary object, or to not see "D" or "U" in a column for objects in a data warehouse?

D represents delete, and U represents update. A temporary object is supposed to disappear at some point in the life of the system; if there were no D in the CRUD matrix, then the analyst failed to accurately model that particular object. A data warehouse is supposed to maintain historical information, so one would not expect to see the data deleted (D), and in most cases, it should not be updated either (U), since the data warehouse should be reflecting the historical values, not updated ones. Hence, objects that represent a data warehouse should not have U or D underneath them in the CRUD matrix. Response: See pages 256

Explain the rules for performing the verifying and validating walkthrough behavioral models.

Following the following rules to perform a walkthrough of the behavior model: 1, every actor and object included on a sequence diagram must be included as an actor and an object on a communication diagram, and vice versa. 2, if there is a message on the sequence diagram, there must be an association on the communications diagram, and vice versa. 3, every message that is included on a sequence diagram must appear as a message on an association in the corresponding communication diagram, and vice versa. 4, if a guard condition appears on a message in the sequence diagram, there must be an equivalent guard condition on the corresponding communication diagram, and vice versa. 5, the sequence number included as part of a message label in a communications diagram implies the sequential order in which the message will be sent. As such, it must correspond to the top-down ordering of the messages being sent on the sequence diagram. 6, all transitions contained in a behavior state machine must be associated with a message being sent on a sequence and communication diagram, and it must be classified as a (C)reate, (U)pdate, or (D)elete message in a CRUDE matrix. 7, all entries in a CRUDE matrix imply a message being sent from an actor or object to another actor or object. If the entry is a (C)reate, (U)pdate, or (D)elete, then there must be an associated transition in a behavioral state machine that represents the instances of the receiving class. 8, there are many representation specific rules that have been proposed.

What kinds of events can lead to state transitions on a behavioral state machine?

In the parlance of behavioral state machines, every event leads to a state transition. This is because events are defined as anything that changes a value which in turn describes the state of the behavioral state machine. In other words, transitions occur only as the result of an event. Specific types of events are as follows. a. a) Data value change: a change in one of the data values that collectively describe the state of the object. For example, a patient transitions from "new" to "existing" after the first visit. b. b) Boolean condition: a Boolean test that is applied at a certain point. For instance, after a patient transitions to "existing" we may ask the question "is the patient insured?" which would lead to state changes based on billing policies. c. c) Time lapse: after a certain amount of time in a given state, the object may spontaneously change to a different state. For instance, a patient that is in state "inactive" (perhaps because he/she has no future appointments), may be removed from the system after 5 years.

Describe sequence diagrams

Sequence diagrams are one of the types of interaction diagrams (the other being communication diagrams). These diagrams show the objects that participate in a use case and also the time-based ordering of the messages that pass between those objects over time for a single use case. A sequence diagram is a dynamic model that shows explicit sequence of messages between objects in a defined interaction. A sequence diagram can be a generic diagrams which shows all possible scenarios for a given use case or an instance sequence diagram which depicts a single scenario within the use case. Different components of a sequence diagram include actors, objects, lifelines, messages, execution occurrences, and frames.

Think of an employee object. What are several of the possible states that that object may have over time? Which of these states would be the initial state? Which would be the final state?

• New Employee (initial state) • Former Employee (final state) • Current Employee • Probationary Employee

List the steps that an analyst should go through to build a sequence diagram.

• Set the context - is it a system, a use case, a scenario of a use case, or an operation of a class • Identify which objects will participate • Set the lifeline for each object • Lay out the messages from the top to the bottom of the diagram based on the order in which they are sent • Add the execution occurrence to each object's lifeline • Validate the sequence diagram

Identify the steps that an analyst would follow in building a communication diagram.

• Set the context, which may be a system, a use case, a scenario of a use case, or an operation of a class • Identify which objects (actors) and the associations between the objects that participate in the collaboration • Lay out the communication diagram • Add the messages • Validate the communication diagram


संबंधित स्टडी सेट्स

Physiology Unit 2 - Chapter 10 Mastering A & P

View Set

ET1310 Solid State Devices Chapter 6

View Set

Marketing: Chapter 6 - Customer Value-Driven Marketing Strategy

View Set

oop: Polymorphism, interfaces and Operator Overloading ch. 12

View Set

social role, role enactment, and role expectations

View Set