SlideShare ist ein Scribd-Unternehmen logo
1 von 33
2 UML for OOAD 2.1 What is UML? 2.2 Classes in UML 2.3 Relations in UML 2.4 Static and Dynamic Design with UML
2.1  UML Background "The Unified Modelling Language (UML) is a graphical  language for visualizing, specifying, constructing, and documenting the artifacts of a software-intensive system.  The UML offers a standard way to write a systems blueprints,  including conceptual things like business processes  and system functions as well as concrete things such as programming language statements, database schemas, and reusable software components." Grady Booch, Ivar Jacobsen, Jim Rumbaugh Rational Software [OMG Unified Modelling Language Specification, Version 1.3, March 2000]
2.1  Brief UML History ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2.1  Why UML? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2.2  Classes in UML ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2.2  UML Class Class name Data members Instance methods Arguments Return types Data members, arguments and methods are specified by visibility  name  :   type Class method
2.2  Class Name The top compartment contains the class name Abstract classes have italicised names Abstract methods also have italicised names Stereotypes are used to identify groups of classes, e.g interfaces or persistent (storeable) classes
2.2  Class Attributes Attributes are the instance and class data members Class data members  (underlined)   are shared between all instances (objects) of a given class Data types shown after ":" Visibility shown as + public - private # protected Attribute compartment visibility  name  :   type
2.2  Class Operations (Interface) Operations are the class methods with their argument and return types Public (+) operations define the class interface Class methods (underlined)  have only access to class data members, no need for a class instance (object) Operations compartment visibility  name  :   type
2.2  Visibility + public Anyone can access Interface operations Not data members - private No-one can access Data members Helper functions "Friends" are allowd in though # protected Subclasses can access Operations where sub- classes collaborate Not data members (creates dependency off subclass on im- plementation of parent)
2.2  Template Classes Generic classes depending on parametrised types Type parameter(s) Operations compartment as usual, but may have type parameter instead of concrete type
2.3  Relations ,[object Object],[object Object],[object Object],[object Object],[object Object]
2.3  Binary Association Binary association: both classes know each other Usually "knows about" means a pointer or reference Other methods possible: method argument, tables, database, ... Implies dependency cycle
2.3  Unary Association A knows about B, but B knows nothing about A Arrow shows direction of  association in direction of dependency
2.3  Aggregation Aggregation = Association with "whole-part" relationship Shown by hollow diamond at the "whole" side No lifetime control implied
2.3  Composition Composition = Aggregation with lifetime control Shown  by filled diamond at the "owner" side Lifetime control implied Lifetime control can be tranferred Lifetime control: construction and destruction controlled by "owner" ->   call constructors and destructors (or have somebody else do it)
2.3  Association Details Name gives details of association Name can be viewed as verb of a sentence Notes at association ends explain "roles" of classes (objects) Multiplicities show number of objects which participate in the association
2.3  Friendship Friends are granted access to private data members and member functions Friendship is given to other classes, never taken Bob Martin:  More like lovers than friends. You can have many friends, you should not have many lovers Friendship breaks data hiding, use carefully
2.3  Parametric Association Association mediated by a parameter (function call argument) A depends upon B, because it uses B No data member of type B in A
2.3  Inheritance Base class or super class Derived class or subclass Arrow shows direction of dependency -> B inherits A's interface,  behaviour and data members ->   B can extend A, i.e. add new data members or member functions ->   B depends on A, A knows nothing about B
2.3  Associations Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2.3  Multiple Inheritance The derived class inherits interface, behaviour and data members of all its base classes Extension and overriding works as before B implements the interface A and is also a "countable" class Countable also called a  "Mixin class"
2.3  Deadly Diamond of Death Now the @*#! hits the %&$? Data members of TObject are inherited twice in B, which ones are valid? Fortunately, there is a solution to this problem: ->   virtual inheritance in C++: only one copy of a multiply inherited structure  will be created (A C++ feature)
2.4  Static and Dynamic Design ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2.4  Class Diagram ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2.4  Object Diagram Object diagram shows relations at instant in time (snapshot) Object relations are drawn using the class association lines Class diagram never changes
2.4  Sequence Diagram Show sequence of events for a particular use case Object Lifeline Activation Messages half-arrow=asynchronous,  full arrow=synchronous, dashed=return Active object
2.4  Sequence Diagram Can show creation and destruction of objects Destruction mark
2.4  Sequence Diagram Slanted messages take some time Can model real-time systems
2.4  Sequence Diagram Crossing message lines are a bad sign ->   race conditions
2.4  Collaboration Diagram Object diagram with numbered messages Sequence numbers of  messages  are nested by procedure call
2.4  Static and Dynamic Design Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Some Comments ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Weitere ähnliche Inhalte

Was ist angesagt?

Synchronization.37
Synchronization.37Synchronization.37
Synchronization.37myrajendra
 
this keyword in Java.pptx
this keyword in Java.pptxthis keyword in Java.pptx
this keyword in Java.pptxParvizMirzayev2
 
Java abstract class & abstract methods
Java abstract class & abstract methodsJava abstract class & abstract methods
Java abstract class & abstract methodsShubham Dwivedi
 
Analysis concepts and principles
Analysis concepts and principlesAnalysis concepts and principles
Analysis concepts and principlessaurabhshertukde
 
Java awt (abstract window toolkit)
Java awt (abstract window toolkit)Java awt (abstract window toolkit)
Java awt (abstract window toolkit)Elizabeth alexander
 
Java Thread Synchronization
Java Thread SynchronizationJava Thread Synchronization
Java Thread SynchronizationBenj Del Mundo
 
Segments in Graphics
Segments in GraphicsSegments in Graphics
Segments in GraphicsRajani Thite
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShellSalaudeen Rajack
 
Unix file api’s
Unix file api’sUnix file api’s
Unix file api’sSunil Rm
 
Data Structures used in Linux kernel
Data Structures used in Linux kernel Data Structures used in Linux kernel
Data Structures used in Linux kernel assinha
 

Was ist angesagt? (20)

Ooad ppt
Ooad pptOoad ppt
Ooad ppt
 
Class diagrams
Class diagramsClass diagrams
Class diagrams
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
 
Unit 1 Java
Unit 1 JavaUnit 1 Java
Unit 1 Java
 
Internationalization
InternationalizationInternationalization
Internationalization
 
Synchronization.37
Synchronization.37Synchronization.37
Synchronization.37
 
Java threading
Java threadingJava threading
Java threading
 
this keyword in Java.pptx
this keyword in Java.pptxthis keyword in Java.pptx
this keyword in Java.pptx
 
Java abstract class & abstract methods
Java abstract class & abstract methodsJava abstract class & abstract methods
Java abstract class & abstract methods
 
Analysis concepts and principles
Analysis concepts and principlesAnalysis concepts and principles
Analysis concepts and principles
 
Graph coloring using backtracking
Graph coloring using backtrackingGraph coloring using backtracking
Graph coloring using backtracking
 
Java awt (abstract window toolkit)
Java awt (abstract window toolkit)Java awt (abstract window toolkit)
Java awt (abstract window toolkit)
 
Java Thread Synchronization
Java Thread SynchronizationJava Thread Synchronization
Java Thread Synchronization
 
Java packages
Java packagesJava packages
Java packages
 
Segments in Graphics
Segments in GraphicsSegments in Graphics
Segments in Graphics
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Unix file api’s
Unix file api’sUnix file api’s
Unix file api’s
 
And or graph
And or graphAnd or graph
And or graph
 
Data Structures used in Linux kernel
Data Structures used in Linux kernel Data Structures used in Linux kernel
Data Structures used in Linux kernel
 

Ähnlich wie UML for OOAD

SDA ClassDiagram.ppt
SDA ClassDiagram.pptSDA ClassDiagram.ppt
SDA ClassDiagram.pptAteeqaKokab1
 
CS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IICS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IIpkaviya
 
Introduction To Uml
Introduction To UmlIntroduction To Uml
Introduction To Umlguest514814
 
M03 1 Structuraldiagrams
M03 1 StructuraldiagramsM03 1 Structuraldiagrams
M03 1 StructuraldiagramsDang Tuan
 
Ch.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptx
Ch.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptxCh.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptx
Ch.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptxSohagSrz
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling LanguageShahzad
 
Unit 1- OOAD ppt
Unit 1- OOAD  pptUnit 1- OOAD  ppt
Unit 1- OOAD pptPRIANKA R
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering Madhar Khan Pathan
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational RoseMunaam Munawar
 
Object oriented modelling
Object oriented modellingObject oriented modelling
Object oriented modellingsujithmv1
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural ModelingAMITJain879
 
FSD MICRO PROJECT UML PPT.pptx
FSD MICRO PROJECT UML PPT.pptxFSD MICRO PROJECT UML PPT.pptx
FSD MICRO PROJECT UML PPT.pptxThorOdinson55
 

Ähnlich wie UML for OOAD (20)

Basics of uml
Basics of umlBasics of uml
Basics of uml
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
SDA ClassDiagram.ppt
SDA ClassDiagram.pptSDA ClassDiagram.ppt
SDA ClassDiagram.ppt
 
CS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IICS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT II
 
Introduction To Uml
Introduction To UmlIntroduction To Uml
Introduction To Uml
 
M03 1 Structuraldiagrams
M03 1 StructuraldiagramsM03 1 Structuraldiagrams
M03 1 Structuraldiagrams
 
Intro Uml
Intro UmlIntro Uml
Intro Uml
 
Css uml
Css umlCss uml
Css uml
 
Unit 2
Unit 2Unit 2
Unit 2
 
Apostila UML
Apostila UMLApostila UML
Apostila UML
 
Ch.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptx
Ch.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptxCh.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptx
Ch.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptx
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling Language
 
Unit 1- OOAD ppt
Unit 1- OOAD  pptUnit 1- OOAD  ppt
Unit 1- OOAD ppt
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
Software Testing and UML Lab
Software Testing and UML LabSoftware Testing and UML Lab
Software Testing and UML Lab
 
UML
UMLUML
UML
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational Rose
 
Object oriented modelling
Object oriented modellingObject oriented modelling
Object oriented modelling
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
 
FSD MICRO PROJECT UML PPT.pptx
FSD MICRO PROJECT UML PPT.pptxFSD MICRO PROJECT UML PPT.pptx
FSD MICRO PROJECT UML PPT.pptx
 

Mehr von Dang Tuan

Javascript for php developer
Javascript for php developerJavascript for php developer
Javascript for php developerDang Tuan
 
Power your web skills
Power your web skillsPower your web skills
Power your web skillsDang Tuan
 
Ube Databases
Ube DatabasesUbe Databases
Ube DatabasesDang Tuan
 
Session02 Part Ii
Session02 Part IiSession02 Part Ii
Session02 Part IiDang Tuan
 
PHÂN TÍCH VÀ THIẾT KẾ HỆ THỐNG DÙNG UML
PHÂN TÍCH VÀ THIẾT KẾ HỆ THỐNG DÙNG UMLPHÂN TÍCH VÀ THIẾT KẾ HỆ THỐNG DÙNG UML
PHÂN TÍCH VÀ THIẾT KẾ HỆ THỐNG DÙNG UMLDang Tuan
 
M02 Uml Overview
M02 Uml OverviewM02 Uml Overview
M02 Uml OverviewDang Tuan
 
Object-Oriented Analysis & Design (OOAD) Domain Modeling Introduction
  Object-Oriented Analysis & Design (OOAD)  Domain Modeling Introduction  Object-Oriented Analysis & Design (OOAD)  Domain Modeling Introduction
Object-Oriented Analysis & Design (OOAD) Domain Modeling IntroductionDang Tuan
 
Introduction to Modeling Java and UML
Introduction to Modeling Java and UMLIntroduction to Modeling Java and UML
Introduction to Modeling Java and UMLDang Tuan
 
Information Systems Analysis and Design Overview of OOAD, UML, and RUP
 Information Systems Analysis and Design Overview of OOAD, UML, and RUP Information Systems Analysis and Design Overview of OOAD, UML, and RUP
Information Systems Analysis and Design Overview of OOAD, UML, and RUPDang Tuan
 
Ooad Overview
Ooad OverviewOoad Overview
Ooad OverviewDang Tuan
 
M03 2 Behavioral Diagrams
M03 2 Behavioral DiagramsM03 2 Behavioral Diagrams
M03 2 Behavioral DiagramsDang Tuan
 
M05 Metamodel
M05 MetamodelM05 Metamodel
M05 MetamodelDang Tuan
 
M04 Design Patterns
M04 Design PatternsM04 Design Patterns
M04 Design PatternsDang Tuan
 
M01 Oo Intro
M01 Oo IntroM01 Oo Intro
M01 Oo IntroDang Tuan
 

Mehr von Dang Tuan (20)

Javascript for php developer
Javascript for php developerJavascript for php developer
Javascript for php developer
 
Power your web skills
Power your web skillsPower your web skills
Power your web skills
 
Ube Databases
Ube DatabasesUbe Databases
Ube Databases
 
Chapter1
Chapter1Chapter1
Chapter1
 
Chapter9
Chapter9Chapter9
Chapter9
 
Chapter3
Chapter3Chapter3
Chapter3
 
Chapter7
Chapter7Chapter7
Chapter7
 
Chapter5
Chapter5Chapter5
Chapter5
 
Session02 Part Ii
Session02 Part IiSession02 Part Ii
Session02 Part Ii
 
PHÂN TÍCH VÀ THIẾT KẾ HỆ THỐNG DÙNG UML
PHÂN TÍCH VÀ THIẾT KẾ HỆ THỐNG DÙNG UMLPHÂN TÍCH VÀ THIẾT KẾ HỆ THỐNG DÙNG UML
PHÂN TÍCH VÀ THIẾT KẾ HỆ THỐNG DÙNG UML
 
Ooad Uml
Ooad UmlOoad Uml
Ooad Uml
 
M02 Uml Overview
M02 Uml OverviewM02 Uml Overview
M02 Uml Overview
 
Object-Oriented Analysis & Design (OOAD) Domain Modeling Introduction
  Object-Oriented Analysis & Design (OOAD)  Domain Modeling Introduction  Object-Oriented Analysis & Design (OOAD)  Domain Modeling Introduction
Object-Oriented Analysis & Design (OOAD) Domain Modeling Introduction
 
Introduction to Modeling Java and UML
Introduction to Modeling Java and UMLIntroduction to Modeling Java and UML
Introduction to Modeling Java and UML
 
Information Systems Analysis and Design Overview of OOAD, UML, and RUP
 Information Systems Analysis and Design Overview of OOAD, UML, and RUP Information Systems Analysis and Design Overview of OOAD, UML, and RUP
Information Systems Analysis and Design Overview of OOAD, UML, and RUP
 
Ooad Overview
Ooad OverviewOoad Overview
Ooad Overview
 
M03 2 Behavioral Diagrams
M03 2 Behavioral DiagramsM03 2 Behavioral Diagrams
M03 2 Behavioral Diagrams
 
M05 Metamodel
M05 MetamodelM05 Metamodel
M05 Metamodel
 
M04 Design Patterns
M04 Design PatternsM04 Design Patterns
M04 Design Patterns
 
M01 Oo Intro
M01 Oo IntroM01 Oo Intro
M01 Oo Intro
 

Kürzlich hochgeladen

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 

Kürzlich hochgeladen (20)

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 

UML for OOAD

  • 1. 2 UML for OOAD 2.1 What is UML? 2.2 Classes in UML 2.3 Relations in UML 2.4 Static and Dynamic Design with UML
  • 2. 2.1 UML Background "The Unified Modelling Language (UML) is a graphical language for visualizing, specifying, constructing, and documenting the artifacts of a software-intensive system. The UML offers a standard way to write a systems blueprints, including conceptual things like business processes and system functions as well as concrete things such as programming language statements, database schemas, and reusable software components." Grady Booch, Ivar Jacobsen, Jim Rumbaugh Rational Software [OMG Unified Modelling Language Specification, Version 1.3, March 2000]
  • 3.
  • 4.
  • 5.
  • 6. 2.2 UML Class Class name Data members Instance methods Arguments Return types Data members, arguments and methods are specified by visibility name : type Class method
  • 7. 2.2 Class Name The top compartment contains the class name Abstract classes have italicised names Abstract methods also have italicised names Stereotypes are used to identify groups of classes, e.g interfaces or persistent (storeable) classes
  • 8. 2.2 Class Attributes Attributes are the instance and class data members Class data members (underlined) are shared between all instances (objects) of a given class Data types shown after ":" Visibility shown as + public - private # protected Attribute compartment visibility name : type
  • 9. 2.2 Class Operations (Interface) Operations are the class methods with their argument and return types Public (+) operations define the class interface Class methods (underlined) have only access to class data members, no need for a class instance (object) Operations compartment visibility name : type
  • 10. 2.2 Visibility + public Anyone can access Interface operations Not data members - private No-one can access Data members Helper functions "Friends" are allowd in though # protected Subclasses can access Operations where sub- classes collaborate Not data members (creates dependency off subclass on im- plementation of parent)
  • 11. 2.2 Template Classes Generic classes depending on parametrised types Type parameter(s) Operations compartment as usual, but may have type parameter instead of concrete type
  • 12.
  • 13. 2.3 Binary Association Binary association: both classes know each other Usually "knows about" means a pointer or reference Other methods possible: method argument, tables, database, ... Implies dependency cycle
  • 14. 2.3 Unary Association A knows about B, but B knows nothing about A Arrow shows direction of association in direction of dependency
  • 15. 2.3 Aggregation Aggregation = Association with "whole-part" relationship Shown by hollow diamond at the "whole" side No lifetime control implied
  • 16. 2.3 Composition Composition = Aggregation with lifetime control Shown by filled diamond at the "owner" side Lifetime control implied Lifetime control can be tranferred Lifetime control: construction and destruction controlled by "owner" -> call constructors and destructors (or have somebody else do it)
  • 17. 2.3 Association Details Name gives details of association Name can be viewed as verb of a sentence Notes at association ends explain "roles" of classes (objects) Multiplicities show number of objects which participate in the association
  • 18. 2.3 Friendship Friends are granted access to private data members and member functions Friendship is given to other classes, never taken Bob Martin: More like lovers than friends. You can have many friends, you should not have many lovers Friendship breaks data hiding, use carefully
  • 19. 2.3 Parametric Association Association mediated by a parameter (function call argument) A depends upon B, because it uses B No data member of type B in A
  • 20. 2.3 Inheritance Base class or super class Derived class or subclass Arrow shows direction of dependency -> B inherits A's interface, behaviour and data members -> B can extend A, i.e. add new data members or member functions -> B depends on A, A knows nothing about B
  • 21.
  • 22. 2.3 Multiple Inheritance The derived class inherits interface, behaviour and data members of all its base classes Extension and overriding works as before B implements the interface A and is also a "countable" class Countable also called a "Mixin class"
  • 23. 2.3 Deadly Diamond of Death Now the @*#! hits the %&$? Data members of TObject are inherited twice in B, which ones are valid? Fortunately, there is a solution to this problem: -> virtual inheritance in C++: only one copy of a multiply inherited structure will be created (A C++ feature)
  • 24.
  • 25.
  • 26. 2.4 Object Diagram Object diagram shows relations at instant in time (snapshot) Object relations are drawn using the class association lines Class diagram never changes
  • 27. 2.4 Sequence Diagram Show sequence of events for a particular use case Object Lifeline Activation Messages half-arrow=asynchronous, full arrow=synchronous, dashed=return Active object
  • 28. 2.4 Sequence Diagram Can show creation and destruction of objects Destruction mark
  • 29. 2.4 Sequence Diagram Slanted messages take some time Can model real-time systems
  • 30. 2.4 Sequence Diagram Crossing message lines are a bad sign -> race conditions
  • 31. 2.4 Collaboration Diagram Object diagram with numbered messages Sequence numbers of messages are nested by procedure call
  • 32.
  • 33.