UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing...
-
date post
21-Dec-2015 -
Category
Documents
-
view
223 -
download
5
Transcript of UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing...
![Page 1: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/1.jpg)
UML: Unified Modeling UML: Unified Modeling Language Language
L. GreweL. Grewe
![Page 2: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/2.jpg)
HistoryHistory
Graphic modeling language for Graphic modeling language for describing object-oriented softwaredescribing object-oriented software
Started in 1994Started in 1994• Combined notations from 3 leading OO Combined notations from 3 leading OO
methodsmethods OMTOMT (James Rumbaugh)(James Rumbaugh) OOSEOOSE (Ivar Jacobson)(Ivar Jacobson) BoochBooch (Grady Booch) (Grady Booch)
Industry standard Industry standard
![Page 3: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/3.jpg)
Why UML?Why UML?
Software larger & complexSoftware larger & complex• Difficult to analyzeDifficult to analyze
Describe SW clearlyDescribe SW clearly
Use Computer-aided software Use Computer-aided software engineering (CASE) toolsengineering (CASE) tools• A picture is worth a thousand A picture is worth a thousand
words…..save time looking at and words…..save time looking at and making visuals.making visuals.
![Page 4: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/4.jpg)
What is UML?What is UML?
Specify & Visualize Software via Specify & Visualize Software via modeling languagemodeling language• viewsviews• diagramsdiagrams• relationships between classesrelationships between classes
![Page 5: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/5.jpg)
UML ConceptsUML Concepts
Use case diagrams/studiesUse case diagrams/studies Class DiagramsClass Diagrams Instance SnapshotsInstance Snapshots Sequence DiagramsSequence Diagrams …….more (for complete understanding .more (for complete understanding
of UML take our SW Engineering of UML take our SW Engineering course)course)
![Page 6: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/6.jpg)
UML Concepts….moreUML Concepts….more
Use CaseDiagramsUse Case
DiagramsUse CaseDiagrams
ScenarioDiagramsScenario
DiagramsCollaborationDiagrams
StateDiagramsState
DiagramsComponentDiagrams
ComponentDiagramsComponent
DiagramsDeploymentDiagrams
StateDiagramsState
DiagramsObjectDiagrams
ScenarioDiagramsScenario
DiagramsStatechartDiagrams
Use CaseDiagramsUse Case
DiagramsSequenceDiagrams
StateDiagramsState
DiagramsClassDiagrams
ActivityDiagrams
Models
![Page 7: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/7.jpg)
UML: Use case studyUML: Use case study
Use Case Studies to understand system Use Case Studies to understand system and the stakeholders & requirements.and the stakeholders & requirements.
Uses concept of Actors:Uses concept of Actors:• Often serves some kind of role in the SW Often serves some kind of role in the SW
system. (e.g. customer, vendor, etc.)system. (e.g. customer, vendor, etc.)• Define State & Operations for each ActorDefine State & Operations for each Actor• Define Relationships between Actors Define Relationships between Actors
![Page 8: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/8.jpg)
Use Case DiagramUse Case Diagram
Shows actors, entities and actions Shows actors, entities and actions involved in one usage scenarioinvolved in one usage scenario
Have a diagram and often Have a diagram and often corresponding descriptioncorresponding description
Can (often) have more than one for a Can (often) have more than one for a software programsoftware program
![Page 9: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/9.jpg)
Example: Use Case DiagramExample: Use Case Diagram
use case:use case: buy_thing buy_thing participants:participants: (Purchaser, Vendor, Thing) (Purchaser, Vendor, Thing)
pre-condition:pre-condition:vendor.possessions -> includes thing vendor.possessions -> includes thing purchaser.pocket >= thing.price purchaser.pocket >= thing.price
post-condition:post-condition: vendor.possessions = vendor.possessions - thing vendor.possessions = vendor.possessions - thing purchaser.possessions = purchaser.possessions + thing purchaser.possessions = purchaser.possessions + thing vendor.till = vendor.till@pre + thing.price vendor.till = vendor.till@pre + thing.price purchaser.pocket = purchaser.pocket@pre - thing.pricepurchaser.pocket = purchaser.pocket@pre - thing.price
![Page 10: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/10.jpg)
UML: Class DiagramsUML: Class Diagrams
Classes are Graphically Represented Classes are Graphically Represented with areas forwith areas for• Class Name, Class Variables, and Class Name, Class Variables, and
OperationsOperations• Properties, Responsibilities, Rules, Properties, Responsibilities, Rules,
Modification History, etc.Modification History, etc.
![Page 11: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/11.jpg)
Example: Class DiagramExample: Class Diagram
BookTitle class BookTitle class
BookTitle InstanceBookTitle Instance
![Page 12: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/12.jpg)
Another Example: Class DiagramsAnother Example: Class Diagrams
Here show class diagrams Here show class diagrams and associations between and associations between the classes.the classes.• Associations Associations
(diamonds/arrows) show (diamonds/arrows) show aggregations/ aggregations/ compositionscompositions
• See class webiste and See class webiste and reading for more details.reading for more details.
Classes: Company, Classes: Company, Department, Office, Department, Office, Headquarters, Person, Headquarters, Person, ContractInformation, ContractInformation, PersonalRecordPersonalRecord
![Page 13: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/13.jpg)
Class Diagrams: relationships Class Diagrams: relationships Between ClassesBetween Classes
AssociationAssociation• Permanent, structural, “has a”Permanent, structural, “has a”• Solid line (arrowhead optional)Solid line (arrowhead optional)
DependencyDependency• Temporary, “uses a”Temporary, “uses a”• Dotted line with arrowheadDotted line with arrowhead
GeneralizationGeneralization• Inheritance, “is a”Inheritance, “is a”• Solid line with open (triangular) arrowheadSolid line with open (triangular) arrowhead
ImplementationImplementation• Dotted line with open (triangular) arrowheadDotted line with open (triangular) arrowhead
OR
![Page 14: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/14.jpg)
Associations w/ Navigation Associations w/ Navigation InformationInformation
Can indicate direction of relationshipCan indicate direction of relationship Represented by solid line with Represented by solid line with
arrowheadarrowhead
Gas Pedal class knows about Engine class Engine class doesn’t know about Gas Pedal class
![Page 15: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/15.jpg)
Cardinality of AssociationsCardinality of Associations
Some relationships may be quantifiedSome relationships may be quantified Cardinality denotes how many objects Cardinality denotes how many objects
the source object can legitimately the source object can legitimately referencereference
ExamplesExamples• ** 0, 1, or more 0, 1, or more• 55 5 exactly 5 exactly• 5..85..8 between 5 and 8, inclusive between 5 and 8, inclusive• 5..*5..* 5 or more 5 or more
![Page 16: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/16.jpg)
Example: cardinalityExample: cardinality
Says : Bank to Branch is a 1 to many Says : Bank to Branch is a 1 to many association….means a Bank can have many association….means a Bank can have many Branches, but, a Branch is associated with Branches, but, a Branch is associated with one Bank.one Bank.
![Page 17: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/17.jpg)
UML Instance SnapshotUML Instance Snapshot
Diagram that shows results of applying a Diagram that shows results of applying a use-case action. use-case action.
![Page 18: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/18.jpg)
UML Use Case Sequence DiagramUML Use Case Sequence Diagram
Scenario shows the Scenario shows the sequence of events sequence of events in a use-case.in a use-case.
Here the use-case Here the use-case is ian applying for a is ian applying for a job, where tony is job, where tony is the secretary and the secretary and sue is the sue is the manager.manager.
![Page 19: UML: Unified Modeling Language L. Grewe History Graphic modeling language for describing object-oriented software Graphic modeling language for describing.](https://reader035.fdocuments.us/reader035/viewer/2022062421/56649d555503460f94a32fee/html5/thumbnails/19.jpg)
GeneralizationGeneralization
Denotes Denotes inheritanceinheritance between classes between classes Can view as “Can view as “is-ais-a” relationship” relationship Represented by line ending in (open) Represented by line ending in (open)
triangletriangle
Laptop, Desktop, PDA inherit state & behavior from Computers