Download presentation
Presentation is loading. Please wait.
Published byJodie Green Modified over 9 years ago
1
COP43311 Copyright © 1997 by Rational Software Corporation Unified Modeling Language (UML) Based on slides and papers from Rational’s UML website http://www.rational.com/uml
2
COP43312 The Value of the UML Is an open standard Supports the entire software development lifecycle Supports diverse applications areas Is based on experience and needs of the user community Supported by many tools
3
COP43313 History of the UML Booch ´91 Booch ´93 Unified Method 0.8 UML 1.0 OMT - 2 OMT - 1 OOSE UML 0.9 & 0.91 OOPSLA ´95 June ´96 & Oct ´96 Sep ´97 Other methods Jan ´97 Industry Feedback UML 1.1 Nov ‘97 UML approved by the OMG
4
COP43314 What is the UML? The UML is a language for visualizing, specifying, constructing, and documenting the artifacts of a software- intensive system Process and implementation independent –It can be used with a large number of processes, throughout the development life cycle, and across OO implementation technologies The UML combines –Data Modeling concepts (Entity Relationship Diagrams) –Business Modeling (work flow) –Object Modeling –Component Modeling The de facto standard for OO systems
5
COP43315 The UML Usages Define the boundaries of a system & its major functions –use cases and actors Illustrate use cases – interaction diagrams Define the static structure of a system –class diagrams Model the behavior of objects –state transition diagrams Document the physical implementation architecture –component & deployment diagrams Provide for growth –stereotypes
6
COP43316 Modeling Elements Structural elements –class, interface, collaboration, use case, active class, component, node Behavioral elements –interaction, state machine Grouping elements –package, subsystem Other elements –note
7
COP43317 Diagrams The foundation of UML Use Case Diagrams –Requirements Activity Diagrams –Generally what, not who - good to detect parallelism Interaction Diagrams –Sequence Diagrams (timeline) –Collaboration Diagrams (object centered) Static Structure Diagrams –Objects/Classes/Packages Statechart Diagrams –States of objects with interesting lifecycles Implementation Diagrams –Component Diagrams –Deployment Diagrams
8
COP43318 Actors An actor is someone or some thing that interacts with the system External Forces –Human interaction –Automated System Keyboard Operator User Driver Traffic Control System >
9
COP43319 Use Cases A use case is a pattern of behavior the system exhibits –Each use case is a sequence of related transactions performed by an actor and the system in a dialogue –Details what the system must provide to the actor when the use cases is executed A flow of events document is created for each use case –Written from an actor point of view –Actors are examined to determine their how they interact with the system ÙBreak down into the most atomic actions possible Typical contents –How the use case starts and ends –Normal flow of events –Alternate flow of events –Exceptional flow of events
10
COP433110 Use Case Diagram Captures system functionality as seen by users Built in early stages of development Purpose –Specify the context of a system –Capture the requirements of a system –Validate a system’s architecture –Drive implementation and generate test cases Developed by analysts and domain experts
11
COP433111 Use Case Diagram Use case diagrams are created to visualize the relationships between actors and use cases Passager Mechanic Driver Lost Luggage Ramp Maintenance Pay toll Customer Service Agent
12
COP433112 Captures system functionality as seen by users Use Case Diagram
13
COP433113 As the use cases are documented, other use case relationships may be discovered –A uses relationship shows behavior that is common to one or more use cases –An extends relationship shows optional behavior Ramp Agent > Loose luggage > Baggage Handler Uses and Extends Use Case Relationships
14
COP433114 Sequence Diagram A sequence diagram displays object interactions arranged in a time sequence Passenger Counter Agent Ticket Gate Agent 1: Give Info 3: Answer 4: Print 6:Present 7: Board 9: Return 8: Overbook 2: Questions Plane 5: Safeguard
15
COP433115 : Registrar course form : CourseForm theManager : CurriculumManager aCourse : Course 1: set course info 2: process 3: add course 4: new course Collaboration Diagram A collaboration diagram displays object interactions organized around objects and their links to one another
16
COP433116 Class Diagrams A class diagram shows the existence of classes and their relationships in the logical view of a system UML modeling elements in class diagrams –Classes and their structure and behavior –Association, aggregation, dependency, and inheritance relationships –Multiplicity and navigation indicators –Role names Attributes –The structure of a class is represented by its attributes –Attributes may be found by examining class definitions, the problem requirements, and by applying domain knowledge Operations –The behavior of a class is represented by its operations –Operations may be found by examining interaction diagrams
17
COP433117 Captures the vocabulary of a system Class Diagram
18
COP433118 Relationships Relationships provide a pathway for communication between objects Sequence and/or collaboration diagrams are examined to determine what links between objects need to exist to accomplish the behavior -- if two objects need to “talk” there must be a link between them Three types of relationships are: –Association –Aggregation –Dependency
19
COP433119 Relationships An association is a bi-directional connection between classes –An association is shown as a line connecting the related classes An aggregation is a stronger form of relationship where the relationship is between a whole and its parts –An aggregation is shown as a line connecting the related classes with a diamond next to the class representing the whole A dependency relationship is a weaker form of relationship showing a relationship between a client and a supplier where the client does not have semantic knowledge of the supplier A dependency is shown as a dashed line pointing from the client to the supplier
20
COP433120 1 - one and only one 4 - four and only 4 0..1 - zero or 1 5..10 - five to and including 10 0..* - zero or more 4..* - four or more Relationship Notation
21
COP433121 Registration Manager Math 101: Course 3: add student(joe) RegistrationManager Course Finding Relationships Relationships are discovered by examining interaction diagrams –If two objects must “talk” there must be a pathway for communication
22
COP433122 RegistrationForm RegistrationManager Course Student CourseOffering Professor addStudent(Course, StudentInfo) name numberCredits open() addStudent(StudentInfo) name major location open() addStudent(StudentInfo) name tenureStatus ScheduleAlgorithm Relationships
23
COP433123 Multiplicity and Navigation Multiplicity defines how many objects participate in a relationships –Multiplicity is the number of instances of one class related to ONE instance of the other class –For each association and aggregation, there are two multiplicity decisions to make: one for each end of the relationship Although associations and aggregations are bi-directional by default, it is often desirable to restrict navigation to one direction If navigation is restricted, an arrowhead is added to indicate the direction of the navigation
24
COP433124 RegistrationForm RegistrationManager Course Student CourseOffering Professor addStudent(Course, StudentInfo) name numberCredits open() addStudent(StudentInfo) major location open() addStudent(StudentInfo) tenureStatus ScheduleAlgorithm 1 0..* 1 1 1..* 4 3..10 0..4 1 Multiplicity and Navigation
25
COP433125 Inheritance Inheritance is a relationships between a superclass and its subclasses There are two ways to find inheritance: –Generalization –Specialization Common attributes, operations, and/or relationships are shown at the highest applicable level in the hierarchy
26
COP433126 RegistrationForm RegistrationManager Course Student CourseOffering Professor addStudent(Course, StudentInfo) name numberCredits open() addStudent(StudentInfo) major location open() addStudent(StudentInfo) tenureStatus ScheduleAlgorithm name RegistrationUser Inheritance
27
COP433127 The State of an Object A state transition diagram shows –The life history of a given class –The events that cause a transition from one state to another –The actions that result from a state change State transition diagrams are created for objects with significant dynamic behavior
28
COP433128 Initialization Open entry: Register student exit: Increment count ClosedCanceled do: Initialize course do: Finalize course do: Notify registered students Add Student / Set count = 0 Add student[ count < 10 ] [ count = 10 ] Cancel State Transition Diagram
29
COP433129 The Physical World Component diagrams illustrate the organizations and dependencies among software components A component may be –A source code component –A run time components or –An executable component
30
COP433130 Component Diagram Captures the physical structure of the implementation
31
COP433131 Deploying the System The deployment diagram shows the configuration of run-time processing elements and the software processes living on them The deployment diagram visualizes the distribution of components across the enterprise.
32
COP433132 Captures the topology of a system’s hardware Deployment Diagram
33
COP433133 Extensibility Mechanisms Stereotype Tagged value Constraint
34
COP433134 Extending the UML Stereotypes can be used to extend the UML notational elements Stereotypes may be used to classify and extend associations, inheritance relationships, classes, and components Examples: –Class stereotypes: boundary, control, entity, utility, exception –Inheritance stereotypes: uses and extends –Component stereotypes: subsystem
35
COP433135 Real UML Use Case Diagram
36
COP433136 Real UML
37
COP433137 Real UML
38
COP433138 Real UML Class Diagram
39
COP433139 Real UML Class Diagram
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.