Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 375 Bruce R. Maxim UM-Dearborn

Similar presentations


Presentation on theme: "CIS 375 Bruce R. Maxim UM-Dearborn"— Presentation transcript:

1 CIS 375 Bruce R. Maxim UM-Dearborn
UML Modeling CIS 375 Bruce R. Maxim UM-Dearborn 12/24/2018

2 Analysis Model Rules of Thumb
The model should be written at a high level of abstraction and focus on requirements that are visible within the problem or business domain. Analysis model elements should add requirement understanding and provide insight into the system information domain, function, or behavior. Be certain analysis model provides value to all stakeholders. Keep the model as simple as possible. 12/24/2018

3 Unified Modeling Language - 1
UML provides general-purpose visual notation that can be used to model computer systems. UML is most often associated with Object-Oriented Software Engineering (OOSE). The focus of OOSE is on identifying the problem elements that produce or consume information and describing the relationships among these elements. 12/24/2018

4 Unified Modeling Language - 2
The use of UML is not limited to the development of object-oriented systems. UML diagrams provide software engineers with a convenient notation to indicate the relationships among the various elements used to define a system. Most of these elements need to be implemented using software in the final system. 12/24/2018

5 UML Object Diagram - 1 In analysis modeling, it is not necessary to list all class attributes and operator prototypes. The focus of analysis modeling is on user visible data and behavior from the problem domain, not the programming constructs from the implementation domain. Object diagrams provide too little information and UML class diagrams are preferred by programmers. 12/24/2018

6 UML Object Diagram - 2 12/24/2018

7 UML Class Diagram - 1 Class diagrams are used to create logical models of computer-based systems. A class diagram shows the structure, contents, and static relationships among the classes used to model a system. These relationships are known as associations and are drawn as lines connecting related graph nodes. Each node in a class diagram is labeled with its class name. 12/24/2018

8 UML Class Diagram - 2 12/24/2018

9 UML Class Diagram - 3 The class node may also contain a compartment that lists data attributes and a compartment that lists the operator prototypes. The visibility of attributes or operators, sometimes called methods, can be indicated by prefixing their names with a + (public), – (private), # (protected), or ~ (package). 12/24/2018

10 UML Associations - 1 An association line connecting two class diagrams indicates that there is a linkage between the classes. Some associations may be labeled with a string indicating the type of relationship between the classes. Each end of the association can be labeled with a number, asterisk (*), or range to describe the multiplicity of the link. 12/24/2018

11 UML Associations - 2 Part whole relationships or subclass class relationships, known as aggregations in UML, are indicated using an open diamond at one end of the link. Inheritance relationships (generalizations) are indicated using an open triangle to point to the appropriate super class. Objects defined as class instances are denoted in class diagrams by drawing an arrowhead pointing to an object node. 12/24/2018

12 UML Functional Modeling - 1
Use case diagrams model system functional requirements. Use case diagrams are useful when software engineers need to develop test cases. Sequence diagrams model system behavior for use cases by showing the necessary class interactions. 12/24/2018

13 UML Functional Modeling - 2
Collaboration diagrams show the message passing structure of the system. Collaboration diagrams can be also used to represent portions of a design pattern and are useful for validating class diagrams. 12/24/2018

14 Use Case Diagram - 1 Use case diagrams show how users interact with the system. Users are called actors and are represented in use case diagrams by labeled stick figures. Use case nodes are labeled with user goals or tasks. Actors are connected to the appropriate nodes using lines or links. 12/24/2018

15 UML Use Case Diagram - 2 12/24/2018

16 Use Case Diagram - 3 Links may be labeled to show exceptional conditions or relationships to other use cases. Each path through a use case diagram represents a separate use case. 12/24/2018

17 Use Case Scenario - 1 Use case diagrams are drawn to be independent of any user interface design that may be used in the final system. A use case summarizes several scenarios for a user task or goal. Each scenario is described using text descriptions called use case specifications. 12/24/2018

18 Use Case: Manage Backpack
ID: UCS Actors: Player Preconditions: Game play is paused Backpack contents are visible Flow of Events: Use case starts when player selects a backpack item If player selects “remove” item” 2.1 System deletes selected item from backpack display If player selects “add item” 3.1 Systems places new item in backpack display below the selected item Postconditions: Backpack display is updated 12/24/2018

19 Use Case Scenario - 2 A scenario is an instance of a use case for a particular actor, at a specific time, with specific data. A use case scenario may be depicted graphically using a sequence diagram. 12/24/2018

20 UML Sequence Diagram - 1 Sequence diagrams depict the workflow from a use case graphically. They show how an actor interacts with a system to get work done, such as what messages are sent and when are they sent. They show the temporal sequence of message exchanges among objects as they communicate to achieve a specific task. The events modeled in sequence diagrams are external events initiated by an actor. 12/24/2018

21 UML Sequence Diagram - 2 12/24/2018

22 UML Sequence Diagram - 3 The actors and objects are arranged horizontally across the top of the diagram. The vertical dimension represents time. A vertical line called a lifeline is attached to each actor or object. The lifeline becomes an activation box to show the live activation period of the object or actor. 12/24/2018

23 UML Sequence Diagram - 4 A message between two objects is represented using an arrow labeled with a text label. The text label may contain an argument list and a return type. Dashed arrows may be used to indicate object flow. If an object’s life ends during the execution of the use case, an X can be placed at the bottom of its lifeline. 12/24/2018

24 ATM Sequence Diagram Work with a group of 4 to create a UML sequence diagram for the Withdraw Cash success use case for the ATM system. Is it possible to include extension 3a (cash not available) in the same sequence diagram? Why or why not? 12/24/2018

25 UML Collaboration/Communication Diagram - 1
A collaboration diagram is a directed graph that uses objects and actors as graph nodes. The focus of the collaboration diagram is on the roles of the objects as they interact to realize a system function. Directional links are used to indicate communication between objects. These links are labeled using appropriate messages. 12/24/2018

26 UML Collaboration/Communication Diagram - 2
Each message is prefixed with a sequence number indicating the time ordering needed to realize the system function. Not every collaboration diagram can be drawn using only horizontal or vertical node arrangements. 12/24/2018

27 UML Collaboration/Communication Diagram - 3
12/24/2018

28 ATM Communication Diagram
Work with your group of 4 to create a UML communication diagram for the Deposit Cash use case. What does the communication diagram add to the functional model of the ATM system? Could this information be shown in the class diagram? 12/24/2018

29 UML Behavioral Modeling - 1
UML has ways of representing system behavior in response to both external and internal system events. State chart diagrams show changes in system states or object attributes in response to external events or triggers. They can display the sequence of states an object goes through in response to potential external triggers. 12/24/2018

30 UML Behavioral Modeling - 2
Activity diagrams show transitions are triggered by internal events. Internal events are not visible to the system user. Activity diagrams show the workflow that an object or system component performs. They can show both data flow (information exchange) and control flow (operation ordering). 12/24/2018

31 UML Activity Diagram - 1 Activities are states representing the execution of a set of operations (or threads) needed to realize a system function. The transitions to new activities are triggered by the completion of the current activity. Activity diagrams are used to visualize the interrelation and interactions between different use cases. Activity diagrams are usually associated with several classes. 12/24/2018

32 UML Activity Diagram - 2 12/24/2018

33 ATM Activity Diagram Work with your group of 4 to create a UML activity diagram for the Withdraw Cash use case. Were you able to include the extensions in the same diagram? Would it make sense to include the Deposit Cash and Deposit Check in the same UML activity diagram? Why or why not? 12/24/2018

34 UML State Diagram - 1 State chart diagrams describe the behavior of a system, subsystem, or an individual object. The system state is determined by the values assigned to object attributes. A system is assumed to remain in its current state until some new event occurs. 12/24/2018

35 UML State Diagram - 2 12/24/2018

36 UML State Diagram - 3 A state diagram is a directed graph whose nodes are labeled with state names. The nodes in a state diagram are drawn as rectangles with rounded corners. The links between the nodes are called transitions and are labeled with the name of the triggering event. 12/24/2018

37 UML State Diagram - 4 A small black circle is used to represent the start state. A small black circle with a ring around it is used to represent the end state. Enclosing a group of nodes in the state diagram with a rectangle having rounded corners can be done to identify a substate. 12/24/2018

38 ATM State Diagram Work with your group of 4 to create a UML state diagram for a complete ATM session. How is it possible to represent the entire ATM system in a single UML state diagram? What should you do if the state diagram is too complex to read easily? 12/24/2018

39 Design Subsystems - 1 Design subsystems evolve from analysis packages.
Analysis packages are usually represented using class diagrams showing groups of cooperating classes. Design subsystems that separate design concerns, represent high-level system components, and wrap legacy systems are composed of design classes, interfaces, and use case realizations. 12/24/2018

40 Design Subsystems - 2 Their function is similar to black-box devices in that their behavior is known and well understood, but their implementation is hidden from all potential end users (external classes or other subsystem). As long as the interface to a subsystem remains unchanged, the programming code used to implement any subsystem behavior may be changed to meet the programmers’ needs. 12/24/2018

41 Design Classes Design classes are derived from the corresponding analysis class diagrams. Each class diagram specifies the data types for all class attributes, operator parameters, and return types. Any default assignments of values to attributes are shown in the class diagram. A class diagram also includes every class operator. Ideally, the visibility indicator (public +, private -, protected #, package ~) for each class attribute and operator must be marked. 12/24/2018

42 UML Component Diagram - 1
An interface is a named set of operators that allows classes outside a subsystem to access subsystem services. UML component diagrams can be used to represent a subsystem interfaces. In component diagrams, subsystems are represented by rectangles with tabs and interfaces as round circles. Arrows show the direction of information between components and interfaces. 12/24/2018

43 UML Component Diagram - 2
12/24/2018

44 Use Case Realizations - 1
A use case realization contains two types of models, design interaction diagrams (UML sequence diagrams and collaboration diagrams) class diagrams showing only the design classes that participate in realizing the use case. 12/24/2018

45 Use Case Realizations - 2
Interaction diagrams developed for the the design model show calls made to hidden class operators required to accomplish system functions. Analysis model interaction diagrams show only high-level, publicly visible operators. Some new interaction diagrams may be developed to illustrate technical issues that appear during the design process. 12/24/2018

46 System Behavior Design - 1
The UML state chart diagrams model the behavior of a single reactive object, class, subsystem, or an entire system. Reactive objects respond to external events and their behavior depends on their current state and the event. The state of each class is determined by the values assigned to its attributes. 12/24/2018

47 System Behavior Design - 2
The state chart diagrams developed as part of the analysis model undergo refinement during design. The use case and activity diagrams help derive state chart diagrams that were not developed as part of the analysis model. 12/24/2018

48 UML Deployment Diagram - 1
The UML component diagrams model the dependencies between software components. Deployment diagrams depict the relationships between the software and hardware system components. UML deployment diagrams model the physical computational nodes on which the software will be deployed. 12/24/2018

49 UML Deployment Diagram - 2
They can also show the configuration or deployment of run-time elements, software components, processes, and objects. Component diagrams for systems are usually combined in a single deployment diagram. 12/24/2018

50 UML Deployment Diagram - 3
12/24/2018

51 UML Deployment Diagram - 4
The nodes in a system execute the code for the software components. 3-D boxes represent the nodes in a deployment diagram. Physical connections between the nodes appear in the form of connecting lines in a deployment diagram. 12/24/2018


Download ppt "CIS 375 Bruce R. Maxim UM-Dearborn"

Similar presentations


Ads by Google