
Interaction Diagrams I Lecture # 4 Department of Computer Science and Technology University of Bedfordshire Written by David Goodwin, based on the book Applying UML and Patterns (3rd ed.) by C. Larman (2005). Modelling and Simulation, 2012 Interaction Outline Diagrams I Interaction Diagrams Interaction Diagrams Communication Diagrams information space stereotypes Communication Diagrams Example #1 Traceability information space Procedure stereotypes Example #2 Example #1 Traceability Procedure Example #2 Interaction Diagrams I Interaction Diagrams Communication Diagrams information space stereotypes Interaction Diagrams Example #1 Traceability Procedure Example #2 Interaction Interaction Diagrams Diagrams I Interaction Diagrams I Interaction diagrams illustrate how objects interact via Communication messages. Diagrams information space I Used for dynamic object modeling. stereotypes Example #1 I Two common types: Traceability I Communication Diagrams Procedure Example #2 I illustrate object interactions in a graph or network format; objects can be placed anywhere on the diagram. I Sequence Diagrams I illustrate object interactions in a \fence" format; each new object is added to the right of the diagram. Interaction Interaction Diagrams Diagrams I Interaction Diagrams Communication I The act of dynamic interaction modeling is incredibly Diagrams valuable. information space stereotypes I Spend time doing dynamic object modeling with Example #1 interaction diagrams, not just static object modeling Traceability Procedure with class digrams. Example #2 I need to think of I What messages to send? I Messages to whom? I Messages in what order? Interaction Notation - Lifeline Boxes Diagrams I Interaction I Lifeline boxes represent the participants in the Diagrams interaction Communication Diagrams I Participants are often instances of a class information space stereotypes I Below left; lifeline box representing an unnamed Example #1 instance of the class \Sale". Traceability Procedure I Below right; lifeline box representing a named instance Example #2 of the class \Sale". Interaction Diagrams I Interaction Diagrams Communication Diagrams information space Communication stereotypes Example #1 Traceability Diagrams Procedure Example #2 Interaction Communication Diagrams Diagrams I I Information space I what information a system holds, which describes the Interaction system's internal states Diagrams I what behaviour a system will adopt, which determines Communication the state transition Diagrams information space I what a system presents to the outside world stereotypes Example #1 I an object in an information space can play one of three Traceability different roles, that is, holding information, changing Procedure states, and interfacing Example #2 Interaction Stereotypes Diagrams I Interaction Diagrams I An `Analysis Class' represents an abstraction of one or Communication more classes and/or subsystems (Use Cases) in the Diagrams information space systems design. stereotypes I Typically you use two modelling techniques, Example #1 communication and sequence diagrams to model Traceability Procedure analysis classes. Example #2 I An analysis class can define attributes (if needed). I An analysis class will include associations. I An analysis class will consume operations. I There are three stereotype classes (boundary, control & entity). Interaction semantics Diagrams I Interaction Diagrams Communication Diagrams I Semantics information space I Entity object models information. It holds information stereotypes and some operations that naturally related to the Example #1 Traceability information. Procedure I Boundary/interface object models input and output Example #2 information and operations that process the information. I Control object models functionality/operations that process information from several different entity objects. Interaction pragmatics Diagrams I Interaction Diagrams Communication I Pragmatics Diagrams information space I Identifying interface objects - functions directly related stereotypes to actors. Example #1 I Identifying entity objects - information used in a Use Traceability Case and functions of processing information Procedure Example #2 I Identifying control object - functions that unite interface objects and entity objects I (Carry out the identifications for EVERY use case defined) Interaction boundary classes Diagrams I I This is a class used to model the interaction between the system and its actors. Interaction I The interaction often involves inputs and outputs. Diagrams Communication I They clarify and collect information regarding the Diagrams systems' boundary (user interface) information space stereotypes I Boundary classes represent abstractions of windows, or Example #1 Traceability other communication interfaces etc. (the computer Procedure system). Example #2 I Each boundary class should be related to at least one actor and vice versa. Interaction entity classes Diagrams I I An entity class is used to model persistent data (information) AND business logic. Interaction Diagrams I An entity class is usually not passive. Communication I An entity `object' can show changes in Diagrams information space data(information). stereotypes Example #1 I Entity classes often show a logical data structure ready Traceability for design. Procedure Example #2 I Entity classes also show what data(information) the system is dependent upon. Interaction control classes Diagrams I I Control classes represent coordination, sequencing, Interaction Diagrams transactions and control of other objects. Communication Diagrams I The dynamics of the system are modelled by control information space classes. stereotypes Example #1 I Typically they coordinate the movement (parameters) Traceability Procedure between boundary and entity classes. Example #2 Interaction Identifying Analysis Classes Diagrams I Interaction Diagrams Communication I Examine the models of a Use Case and identify (for a Diagrams communication diagram): information space stereotypes I entity classes by examining the data(information) Example #1 storage requirements of the Use Case. Traceability Procedure I one central boundary class for each actor. (primary Example #2 window). I one control class responsible for handling the control of the Use Case (and introduce further control classes as necessary, for example UI handling). Interaction `Architecture' of a Communication Diagrams I Diagram Interaction Diagrams Communication Diagrams information space stereotypes Example #1 Traceability Procedure Example #2 Interaction Return Item Use Case in recycling Diagrams I machine - example Interaction Diagrams Communication Diagrams Identification of boundary, control and entity information space I stereotypes stereotypes are often tangled together Example #1 Traceability I We normally start from the refinement of the Use Case Procedure diagram. Example #2 I Then we identify objects. I At the \same time", we organise and identify relationship. Interaction Identify boundary/interface objects Diagrams I I Identify boundary/interface objects from linguistic Interaction Diagrams description: looking for key words Communication Diagrams \When a customer returns a deposit item, it is measured by information space the system. The measurements are used to determine what stereotypes Example #1 kind of can, bottle or crate has been returned. If acceptable, Traceability the total number of items of this type returned by the Procedure Example #2 customer increments. If not, the light for \Not Valid" is highlighted on customer panel. When the customer presses the receipt button, the printer prints the date. The total number of items he returned and the lump sum is calculated. The following is printed out: customer number, number returned, deposit value, total of this type and lump sum" Interaction Boundary objects Diagrams I Interaction Diagrams Communication Diagrams information space stereotypes Example #1 Traceability Procedure Example #2 Interaction Identify entity objects Diagrams I Interaction Diagrams Communication I Identify entity objects from linguistic description Diagrams information space I long term information (for all customer): stereotypes I deposit values of bottle, can and crate Example #1 Traceability I short term information (for each individual customer): Procedure I the total number of items of each type returned by the Example #2 customer, I the total number of items he returned and the lump sum that should be paid to him, I date Interaction Entity objects Diagrams I Interaction Diagrams Communication Diagrams information space stereotypes Example #1 Traceability Procedure Example #2 Interaction Identify control objects Diagrams I Interaction Diagrams Communication Diagrams I Identify control objects from linguistic description information space I There are entity and boundary objects in this use case. stereotypes Example #1 I Items coming from customer panel need to be Traceability measured and decision on whether passing the Procedure information and passing what information needs to be Example #2 made according the measurement. I Decision on whether print out information also needs to be made. Interaction Return Item Use Case in recycling Diagrams I machine - example Interaction Diagrams \When a customer returns a deposit item, it is measured by Communication Diagrams the system. The measurements are used to determine what information space kind of can, bottle or crate has been returned. If acceptable, stereotypes Example #1 the total number of
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages42 Page
-
File Size-