Teaching Innovation - Entrepreneurial - Global DTEL(Department for Technology Enhanced Learning) The Centre for Technology enabled Teaching & Learning , Teaching Innovation - Entrepreneurial - Global
DEPARTMENT OF CMPUTER SCIENCE & ENGINEERING V-semester OBJECT ORIENTED MODELING & DESIGN (CS-5005)
UNIT 2:-STATE MODELING 1 Events & states, Transitions and conditions 2 . Events & states, Transitions and conditions 1 State diagrams and its behavior 2 Advanced state modeling concepts 3 Nested state diagrams 4 Concurrency, Relation of class & state models 5 Use case, Sequence and activity models 6 DTEL Milind S. Deshkar 3
UNIT-2 SPECIFIC Objective / course outcome The student will be able to: Understand the basic concepts of state, events and transitions. 1 Able to draw basic and advanced state diagrams for a system. 2 Understand the relationship between concurrency and state models. 3 Able to draw use-case diagram of their project and other complex systems. 4 DTEL Milind S. Deshkar 4
What is dynamic modeling? LECTURE 1:- What is dynamic modeling? Dynamic modelling Events states state diagrams conditions operations DTEL Milind S. Deshkar 5
What is dynamic modeling? LECTURE 1:- What is dynamic modeling? Events Something that happens at a point in time Mouse button clicked / Signal changes Logically ordered events - causally related Concurrent events - causally unrelated do not effect each other there is no order between them 1-way transmission of information from one object to another DTEL Milind S. Deshkar 6
What is dynamic modeling? LECTURE 1:- What is dynamic modeling? Event classes Event occurrences are grouped into event classes Flight 123 departs from Chicago / Flight 456 departs from Rome Event class is Flight Departs Attributes of event classes Departure origin of flight Flight number Data values are Attributes DTEL Milind S. Deshkar 7
Event Classes and Attributes LECTURE 1:- Event Classes and Attributes Event Classes and Attributes Aeroplane flight departs (airline, flight no, city) Mouse button pushed (button, location) Input string entered (text) phone receiver lifted digit dialled (digit) engine speed enters danger zone DTEL Milind S. Deshkar 8
States LECTURE 1:- States A state is an abstraction of the attribute values and links of an object. Sets of values are grouped together into a state according to properties that affect the gross behaviour of the object. E.G.. A bank is solvent or insolvent depending on whether it’s assets exceed it’s liabilities. A state corresponds to the interval between 2 events received by an object. A state separates 2 events. An event separates 2 states. DTEL Milind S. Deshkar 9
Characterisations of a state LECTURE 1:- States Characterisations of a state State: Alarm ringing Description: alarm on watch is ringing to indicate target time Event sequence that produces the state: set alarm (target time) any sequence not including clear alarm current time = target time DTEL Milind S. Deshkar 10
LECTURE 1:- THANK YOU DTEL Milind S. Deshkar 11
Condition that characterises the state: LECTURE 2:- State Condition that characterises the state: alarm = on, and target time <= current time <= target time + 20s button has not been pushed since the target time DTEL Milind S. Deshkar 12
Events accepted in the state: LECTURE 2:- State Events accepted in the state: event action next state current time = target time + 20s reset alarm normal button pushed (any button) reset alarm normal DTEL Milind S. Deshkar 13
Relates to a specific object Relate states and events LECTURE 2:- State Diagrams Relates to a specific object Relate states and events A change of state is called a transition All transitions leaving a state must correspond to different events The transition fires An event that has no transition is ignored A sequence of events corresponds to a path through the graph DTEL Milind S. Deshkar 14
LECTURE 2:- State Diagrams Transition : A transition is drawn as an arrow between states annotated with a transition string The transition string denotes the event and consequent action Only one form of arrowhead is used on state charts The distinction between call events and signal events must be deducted from elsewhere e.g. an interaction diagram DTEL Milind S. Deshkar 15
Transition : A transition string is described as : LECTURE 2:- State Diagrams Transition : A transition string is described as : Event-signature [guard-condition]/action-expression^ object.message If the guard condition is met the transition occurs immediately A transition whose string contains neither an event signature nor a guard condition is said to be unlabeled Occurs immediately May still carry an action expression DTEL Milind S. Deshkar 16
Transition : A transition is triggered when its event occurs LECTURE 2:- State Diagrams Transition : A transition is triggered when its event occurs If the guard condition is met, the transition is fired If the condition is not met the event is discarded The guard condition is checked only once If there is no guard condition, triggering will always cause firing DTEL Milind S. Deshkar 17
LECTURE 2:- State Diagrams Transition : Note the distinction between a guard condition and a change event A guard condition is evaluated once, when the associated event occurs A change event occurs whenever its associated condition is met Behaviour is as if the condition were being continually evaluated DTEL Milind S. Deshkar 18
State Diagram Notation : LECTURE 2:- State Diagrams State Diagram Notation : Initial state event final state name Paid Unpaid paying Invoice created Invoice destroyed transition state DTEL Milind S. Deshkar 19
LECTURE 2:- THANK YOU DTEL Milind S. Deshkar 20
State Diagram Example : LECTURE 3:- State Diagrams State Diagram Example : This shows the state of an object myBkCpy from a BookCopy class on loan return() on the shelf entry / myBkCpy.borrow() entry / myBkCpy.return() borrow() Entry action : any action that is marked as linked to the entry action is executed whenever the given state is entered via a transition on loan return() on the shelf exit / myBkCpy.returned() exit / myBkCpy.borrowed() borrow() Exit action : any action that is marked as linked to the exit action is executed whenever the state is left via a transition DTEL Milind S. Deshkar 21
A class of BookCopy : LECTURE 3:- State Diagrams BookCopy value := ‘Y’ on the shelf value := ‘N’ on loan onShelf : Boolean return() borrow() action / onShelf=‘Y’ action / onShelf=‘N’ DTEL Milind S. Deshkar 22
State Diagram Example : LECTURE 3:- State Diagrams State Diagram Example : all items in stock get first item [all items checked && all items available] Dispatch items *[all items checked] get next item Checking Dispatching do / check Item [all items available] Item received do / initiate delivery [all items checked && some items not in stock] Order Item delivery some items not in stock Ordering Delivering cancelled entry / deliver Items Exit/ Item received do / order Item Canceling DTEL Milind S. Deshkar 23
State Transition Diagram LECTURE 3:- State Transition Diagram DTEL Milind S. Deshkar 24
Initial/final States LECTURE 3:- State Transition Diagram The previous example is a continuous loop Most situations will have an initial and final state Chess game checkmate White's turn stalemate white wins Start White Black moves moves Draw Black's turn stalemate Checkmate Black wins DTEL Milind S. Deshkar 25
LECTURE 3:- THANK YOU DTEL Milind S. Deshkar 26
Conditions Used as guards on transitions. LECTURE 4:- State Transition Diagram Conditions Used as guards on transitions. A guarded transition only fires when the condition is true e.g. When you go out in the morning (event), If the temperature is below freezing (condition). Put on your gloves (next state). DTEL Milind S. Deshkar 27
State Transition Diagram With Conditions LECTURE 4:- State Transition Diagram State Transition Diagram With Conditions Traffic light time-out[cars in N/S right lanes] North/south may go straight North/south may turn right time-out time-out[no cars Time-out in N/S right lanes] time-out[no cars in E/W right lanes] East/west may turn right East/west may go straight Time out[cars in E/W right lanes] DTEL Milind S. Deshkar 28
Operations Attached to state Performed in response to the state LECTURE 4:- State Transition Diagram Operations Attached to state Performed in response to the state Attached to a transition Performed in response to the event DTEL Milind S. Deshkar 29
Activities and Actions LECTURE 4:- State Transition Diagram Activities and Actions An activity is an operation that takes time. E.G.. Display a picture on a screen. “Do:a ” indicates that activity A occurs throughout the lifetime of the state to which it is attached. An action is an instantaneous operation. E.G.. Disconnect phone line. An action is shown on a transition as “action / event.” DTEL Milind S. Deshkar 30
State Transition Diagram LECTURE 4:- State Transition Diagram DTEL Milind S. Deshkar 31
Nesting states LECTURE 4:- State Diagrams DTEL Super-state A B event-1 Milind S. Deshkar 32
Including sub-states LECTURE 4:- State diagram example DTEL get first item *[all items checked] get next item [all items checked && all items available] Dispatch items Checking Dispatching do / check Item do / initiate delivery [all items available] Item received [all items checked && some items not in stock] Order item delivery Ordering Exit/ Item received do / order Item Including sub-states Canceling Delivering cancelled do / Remove Item entry / deliver Items DTEL Milind S. Deshkar 33
LECTURE 4:- THANK YOU DTEL Milind S. Deshkar 34
LECTURE 5:- Exercise 1 - Claims A third party claim arises from an incident that has occurred. The claim must be reported to the claims office within the statutory period to be valid. When the claim is reported, the incident is preferably verified by a member of staff who was present at the time. The claim is recorded and evaluated. If it is a trivial claim, the claims assessor checks the claimant for previous claims and, if there are no or 1 previous claims then a payment is made and the claim is settled. If there are previous claims, the claimant will be referred to the courts. More serious claims may await expert evidence and several different court hearings. At any stage, the claim may be dropped, or a payment made without admitting liability. If the claimant is a minor, the claim must remain on the books until the claimant is over 21. If a claim is settled by a court, it may be appealed. During this time, the claim remains open. Draw a state diagram for a claim. DTEL Milind S. Deshkar 35
LECTURE 5:- Exercise 1 - Claims DTEL Milind S. Deshkar 36
States of Order LECTURE 5:- Exercise 1 - Claims DTEL Milind S. Deshkar 37
States of Garment (Garments system) LECTURE 5:- Exercise 1 - Claims States of Garment (Garments system) DTEL Milind S. Deshkar 38
Concurrent State models LECTURE 5:- Concurrent State models B s Finishing Starting A C E T Explicit control branching(fork) D G F DTEL Milind S. Deshkar 39
Concurrent State models LECTURE 5:- Concurrent State models How dynamic model relates to object model One state diagram for each class (with important behavior.) Each class has concurrent behavior. Aggregation in the Object Model usually implies concurrency in the Dynamic Model. DTEL Milind S. Deshkar 40
Concurrent State models LECTURE 5:- Concurrent State models Dynamic Models for Embedded System Dynamic Model for user buttons would be simplistic; modeling might not be needed. Some environmental units might have behavior that should be modeled. (like an engine shifting through speeds) For embedded systems - might only need one significant behavior model (for controller.) Complex models will be decomposed into more detailed behavioral models. Concurrency could be present within a model. DTEL Milind S. Deshkar 41
Concurrent State models LECTURE 5:- Concurrent State models Modeling Concurrency Two types of concurrency 1. System concurrency State of overall system as the aggregation of state diagrams, one for each object. Each state diagram is executing concurrently with the others. 2. Object concurrency An object can be partitioned into subsets of states (attributes and links) such that each of them has its own sub-diagram. The state of the object consists of a set of states: one state from each sub-diagram. State diagrams are divided into sub-diagrams by dotted lines. DTEL Milind S. Deshkar 42
Aggregation Concurrency: LECTURE 5:- Aggregation Concurrency Aggregation Concurrency: A dynamic model describes a set of concurrent objects, each with its state and STD. The objects in a system are inherently concurrent and can change state independently The state of the entire system cannot be represented by a single state in a single object; it is the product of the states o all its objects. DTEL Milind S. Deshkar 43
Aggregation implies concurrency. LECTURE 5:- Aggregation Concurrency Aggregation implies concurrency. The aggregate state corresponds to the combined states of all the components State Transition Diagrams (STD). Aggregation is the “and” relationship The aggregate state is one state from the first STD, and a state from the second STD, and a state from each other STD. DTEL Milind S. Deshkar 44
LECTURE 5:- THANK YOU DTEL Milind S. Deshkar 45
Concurrency within an object: LECTURE 6:- Aggregation Concurrency Concurrency within an object: Concurrency within the state of a single object arises when the object can be partitioned subsets of attributes and links, each o which has its own sub-STD. The state of an object comprises one state from each sub-STD DTEL Milind S. Deshkar 46
Examples of Aggregation LECTURE 6:- Aggregation Concurrency Examples of Aggregation Object model Car Ignition Transmission Brake Accelerator Each class here will need a concurrent state diagram DTEL Milind S. Deshkar 47
Aggregation Concurrency LECTURE 6:- Aggregation Concurrency Car turn key to start Ignition [Transmission release key in Neutral] off starting on turn key off Transmission push R Neutral push N Reverse push N push F Forward stop upshift upshift second third first downshift downshift Brake Accelerator depress accelerator depress brake on on off off release accelerator release brake DTEL Milind S. Deshkar 48
Example of Concurrency within an Object LECTURE 6:- Concurrency Example of Concurrency within an Object Splitting control Synchronization Emitting Do: Dispense Cash taken Cash Setting Ready Up to reset Ready Do: Eject Card Card taken DTEL Milind S. Deshkar 49
LECTURE 6:- Concurrency Example Example: lower-level state diagram coin in(value) coin in(value) Do/add to balance(value) idle cancel / refund coins select(item) [change<0] [item empty] Do/test item present; make change [change=0] [change>0] Example: lower-level state diagram for Dispense item activity Do/dispense change Do/move arm to correct row Do/move are to correct column Do/push item off shelf stop DTEL Milind S. Deshkar 50
LECTURE 6:- THANK YOU DTEL Milind S. Deshkar 51
What is use case modeling? LECTURE 7:- Interaction Modeling What is use case modeling? Use case model: A view of a system that emphasizes the behavior as it appears to outside users. A use case model partitions system functionality into transactions (‘use cases’) that are meaningful to users (‘actors’). Answers WHAT is the system to do. DTEL Milind S. Deshkar 52
System Requirements and Use Cases LECTURE 7:- Interaction Modeling System Requirements and Use Cases Use case diagrams are the primary focus of the requirements determination phase of analysis. Use cases describe system behavior from an external viewpoint and establish system boundaries. An important aspect of use cases is that they describe the system from the perspective of external users. Use cases analysis takes the place of the functional requirements stage used in SDLC. If user requirements change during the development process, the changes are first made in the use case model. DTEL Milind S. Deshkar 53
LECTURE 7:- Use case Modeling Complete Use Case modeling includes visualization (diagrams) and corresponding step-by-step documented descriptions of each identified use case. Use case modeling works to provide a solution to a problem by breaking down the entire scope of system functionality into many smaller views of system functionality. These smaller views of the system are often referred to as Packages. Within each package, the system is further broken down into task level functionality called 'Use Cases' DTEL Milind S. Deshkar 54
LECTURE 7:- Use case Modeling Benefits of Use Cases Use cases are used during the entire system development process. During analysis the use cases are used to model functionality of the proposed system and are the starting point for identifying objects. Use cases contain an enormous amount of system functionality detail. So they are a constant resource for validation and testing. Use case is an invaluable vehicle for communication between developers and end users. DTEL Milind S. Deshkar 55
A use case model has two components: LECTURE 7:- Use case Modeling A use case model has two components: 1. Actors: Is a direct external user of a system. An object or set of objects that communicates directly with the system but that is not part of the system. 2. Use cases: A Use Case is a behaviorally related sequence of steps (a scenario), both automated and manual for the purpose of completing a single business task. Actors initiate system activity - a use case - to complete some business task. DTEL Milind S. Deshkar 56
Characteristics of Actors LECTURE 7:- Actors Characteristics of Actors Actors represent anything that needs to interacts with the system to exchange information. An actor is a user or role that that is usually external to the system. An actor can be people as well as another system, hardware device, etc. An actor does not represent a single individual. An actor always initiates a use case. Because actors are outside the system, they do not need to be described in detail. DTEL Milind S. Deshkar 57
Characteristics of use cases LECTURE 7:- Use cases Characteristics of use cases A use case is the function being described. A use case always represents complete functionality not individual actions. A use case is a complete sequence of related actions representing a specific way of using the system. Use cases represent the behavior of the system in response to stimuli from an actor. Use cases are represented as ellipses (oval). Use Case DTEL Milind S. Deshkar 58
LECTURE 7:- Use case diagram DTEL Milind S. Deshkar 59
Identifying Actors and Use Cases LECTURE 7:- Use case diagram Identifying Actors and Use Cases One place to start is to look at context model diagrams of the system. To identify use cases, Jacobson recommends asking: What are the main tasks performed by each actor? Will the actor read or update any information in the system? Will the actor have to inform the system about changes outside the system? Does the actor have to be informed about unexpected changes? DTEL Milind S. Deshkar 60
LECTURE 7:- THANK YOU DTEL Milind S. Deshkar 61
Constructing the Use Case Model LECTURE 8:- Use Case Model Constructing the Use Case Model The goal is to build a use case diagram for each significantly different kind of scenario in the system. Each scenario shows a different sequence of interactions between actors and the system with no or conditions. Use cases are constructed after the actors and use cases have been identified. Use cases are often grouped in to subsystems representing logical functional areas of the system. This partitioning aids in understanding the system architecture and is key to defining your development strategy - which use cases will be developed first and by whom. DTEL Milind S. Deshkar 62
LECTURE 8:- Use Case Example DTEL Milind S. Deshkar 63
More on developing Use Cases LECTURE 8:- Use Case More on developing Use Cases A use case may participate in relationships with other use cases. There are two primary types of relationships - includes and extends. There use to exist a relationship called ‘uses’ but it has gone away. DTEL Milind S. Deshkar 64
Use Case Relationships LECTURE 8:- Use Case Use Case Relationships DTEL Milind S. Deshkar 65
LECTURE 8:- Use Case Extends An extends relationship, extends a use case by adding new behavior or actions. The extends symbol is <<extends>> DTEL Milind S. Deshkar 66
When to use <<extends>> LECTURE 8:- Use Case When to use <<extends>> Model alternate sequences through <<extends>> relationships. Remember a use case is usually modeled first using a normal course of actions. Then "what if" conditions are considered and alternate courses of action are modeled in separate use cases. These alternate use cases are related to the original use case by an "extends" relationship. DTEL Milind S. Deshkar 67
LECTURE 8:- Use Case Extends DTEL Milind S. Deshkar 68
LECTURE 8:- THANK YOU DTEL Milind S. Deshkar 69
LECTURE 9:- Use Cases Includes The includes relationship is used to prevent repetition of the steps required to other use cases. Includes - specifies that the base use case needs an additional use case in order to fully describe its processes. It is mainly used to show common functionality that is shared by several use cases DTEL Milind S. Deshkar 70
LECTURE 9:- Use Cases Includes DTEL Milind S. Deshkar 71
When to use <<extends>> or <<includes>> LECTURE 9:- Use Cases When to use <<extends>> or <<includes>> Use <<extends>> Intent is to model an extension or variation of a complete use case Use <<includes>> The base use case must use another use case in order to complete its process DTEL Milind S. Deshkar 72
LECTURE 9:- Example of Use Case DTEL Milind S. Deshkar 73
Example of Use Case Diagram for a Course Registration System LECTURE 9:- Example of Use Case Diagram for a Course Registration System DTEL Milind S. Deshkar 74
Discover Actors Actors are examined to determine their needs: LECTURE 9:- Example of Use Case Diagram Discover Actors Actors are examined to determine their needs: Registrar Professor Student Billing System Remember that use cases are within the system, actors are outside. DTEL Milind S. Deshkar 75
LECTURE 9:- Use Case Diagram Discover Use Cases A use case is a pattern of behavior the system exhibits Use cases identified: Maintain Registrar Request Course Roster Maintain Schedule Register for courses DTEL Milind S. Deshkar 76
Actors are examined to determine their needs: LECTURE 9:- Put Use Cases with Actors Each use case is a sequence of related transactions performed by an actor and a system in a dialogue. Actors are examined to determine their needs: Registrar - maintains curriculum Professor - requests rosters Student – registers for courses Billing System - receives information related to billing from registration Remember that use cases are within the system, actors are outside. DTEL Milind S. Deshkar 77
Put Use Cases with Actors LECTURE 9:- Put Use Cases with Actors DTEL Milind S. Deshkar 78
LECTURE 9:- Relationships between use cases A use case may participate in relationships with other use cases. Two common relationships are uses and extends. Includes arise when one use case needs another use case. Look for Includes DTEL Milind S. Deshkar 79
LECTURE 9:- Discover Extends Extend extends a use case by adding new behavior or actions. An extends relationship shows optional behavior. The use case that is extended must make sense without the extension. Use cases in opposite order – Notice the direction of the arrow DTEL Milind S. Deshkar 80
The Complete Use Case LECTURE 9:- Complete Use Case DTEL Milind S. Deshkar 81
LECTURE 9:- THANK YOU DTEL Milind S. Deshkar 82
Shows how objects communicate with each other over time. LECTURE 10:- Sequence Diagrams Shows how objects communicate with each other over time. That is, sequence diagrams are used to model object interactions arranged in time sequence and to distribute use case behavior to classes. They can also be used to illustrate all the paths a particular use case can ultimately produce. The sequence diagram consists of Active Objects, Messages represented as solid-line arrows, and Time represented as a vertical progression. DTEL Milind S. Deshkar 83
LECTURE 10:- Sequence Diagrams Objects A life line illustrates what is happening to an object in a chronological fashion. Object :Name Life line Activation DTEL Milind S. Deshkar 84
LECTURE 10:- Sequence Diagrams Time & Messages Messages are used to illustrate communication between different active objects of a sequence diagram. :Name1 :Name2 Actor Message One Message Two DTEL Milind S. Deshkar 85
LECTURE 10:- Sequence Diagrams Types of Messages Synchronous (flow interrupt until the message has completed. Asynchronous (don’t wait for response) Flat – no distinction between sysn/async Return – control flow has returned to the caller. DTEL Milind S. Deshkar 86
Compilation LECTURE 10:- Sequence Diagrams :Compiler Linker FileSystem Actor Compile Load Files Compile files Save OBJ Files Link Load OBJ files Link OBJ files Write EXE file DTEL Milind S. Deshkar 87
Branching Flow: flow goes to different objects [if condition is met] LECTURE 10:- Sequence Diagrams Branching Flow: flow goes to different objects [if condition is met] :Editor FileSystem Load File :BinaryViewer :TextViewer [text file] [binary file] DTEL Milind S. Deshkar 88
Sequence Diagrams can also model the Flow of Data LECTURE 10:- Sequence Diagrams Sequence Diagrams can also model the Flow of Data Passenger selectZone() ZoneButton TarifSchedule Display lookupPrice(selection) displayPrice(price) price Dataflow …continued on next slide... The source of an arrow indicates the activation which sent the message Horizontal dashed arrows indicate data flow, for example return results from a message DTEL Milind S. Deshkar 89
LECTURE 10:- THANK YOU DTEL Milind S. Deshkar 90
Iteration & Condition LECTURE 11:- Sequence Diagrams …continued from previous slide... Passenger CoinIdentifier Display CoinDrop ChangeProcessor * insertChange(coin) lookupCoin(coin) price Iteration displayPrice(owedAmount) Condition [owedAmount<0] returnChange(-owedAmount) …continued on next slide... Iteration is denoted by a * preceding the message name Condition is denoted by boolean expression in [ ] before the message name DTEL Milind S. Deshkar 91
Creation and destruction LECTURE 11:- Sequence Diagrams Creation and destruction Passenger …continued from previous slide... Creation of Ticket ChangeProcessor Ticket createTicket(selection) print() Destruction of Ticket free() Creation is denoted by a message arrow pointing to the object Destruction is denoted by an X mark at the end of the destruction activation In garbage collection environments, destruction can be used to denote the end of the useful life of an object. DTEL Milind S. Deshkar 92
LECTURE 11:- Sequence Diagrams Properties UML sequence diagram represent behavior in terms of interactions. Useful to identify or find missing objects Time consuming to build, but worth the investment. Complement the class diagrams (which represent structure). DTEL Milind S. Deshkar 93
An activity diagram is a special case of a state chart diagram. LECTURE 11:- Activity Diagrams An activity diagram is a special case of a state chart diagram. The states are activities (“functions”). An activity diagram is useful to depict the workflow in a system. DTEL Milind S. Deshkar 94
Activity Diagrams allow to model Decisions LECTURE 11:- Activity Diagrams Activity Diagrams allow to model Decisions Decision DTEL Milind S. Deshkar 95
Activity Diagrams can model Concurrency LECTURE 11:- Activity Diagrams Activity Diagrams can model Concurrency Synchronization of multiple activities. Splitting the flow of control into multiple threads. Splitting Synchronization DTEL Milind S. Deshkar 96
Grouping of Activities LECTURE 11:- Activity Diagrams Grouping of Activities Activities may be grouped into swimlanes to denote the object or subsystem that implements the activities. Dispatcher Allocate Resources Open Coordinate Archive Incident Resources Incident FieldOfficer Document Incident DTEL Milind S. Deshkar 97
Activity Diagram vs. Statechart Diagram LECTURE 11:- Activity Diagrams Activity Diagram vs. Statechart Diagram Statechart Diagram for Incident Focus on the set of attributes of a single abstraction (object, system) Event causes state transition Active Inactive Closed Archived Incident- Documented Incident- Handled Incident- Archived Activity Diagram for Incident (Focus on dataflow in a system) Triggerless transition Completion of activity causes state transition DTEL Milind S. Deshkar 98
LECTURE 11:- THANK YOU DTEL Milind S. Deshkar 99
Chapter 2 Question Bank What is dynamic modeling ? Also discuss its various elements. Discuss state diagram. What are transitions and guarding conditions ? Draw state transition diagram for phone line. Show activities and actions. Describe various modeling concurrency. Draw aggregation concurrency diagram for car transmission. How do you identify uses cases and actors from a problem definition? Explain with proper example. What are the properties of sequence diagram ? Draw a sequence diagram for library management. Differentiate between Activity Diagram and State-chart Diagram.
Summary Events: Something that happens at a point in time, e.g., mouse button clicked / Signal changes. Event classes : Event occurrences are grouped into event classes Attributes of event classes are departure origin of flight and flight number. Data values are Attributes 3. States: A state is an abstraction of the attribute values and links of an object. Sets of values are grouped together into a state according to properties that affect the gross behaviour of the object. E.g., A bank is solvent or insolvent depending on whether it’s assets exceed it’s liabilities. A state corresponds to the interval between 2 events received by an object. 4. Transition: A transition is drawn as an arrow between states annotated with a transition string. It describes the aspects of a system that change over time and specifies and implement control aspects of a system. 5. There are 2 types of Modeling concurrency : 1) System Concurrency 2) Object Concurrency
THANK YOU DTEL Milind S. Deshkar 102102