SlideShare une entreprise Scribd logo
1  sur  24
Class and Object diagrams in UML
                              (Unified Modeling Language)

                                                                                                     http://www.paxcel.net




                                                                                                          By:-
                                                                                          Tanjot Singh Sandhu


                                                                                     Paxcel technologies. www.paxcel.net
This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
UML Background

   UML is a standard language for designing and
    documenting a system in an object-oriented manner.
   UML includes a set of graphic notation techniques to
    create visual models of object-oriented software-
    intensive systems.
   The standard is managed, and was created, by the
    Object Management Group (OMG).
   UML versions - UML 1.0, 1.1 1.2, 1.3, 1.4, and 1.5
   UML 2.0 – adopted by OMG in 2005.
   UML 2.3 - formally released in May 2010.
   UML 2.4.1 - formally released in August 2011.

                                                                                                    Paxcel technologies. www.paxcel.net
               This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Technical aspects of UML
   Building block of UML
             Things
                     Structural Things (Class, Interface, Collaboration, Use case,
                                              Active class, Component, Node)
                     Behavioral things (Message , State)
                     Grouping things (Package)
                     Annotational things (Notes)

        –   Relationships
               •      Dependency (represented as a dashed directed line)
               •      Association (rendered as solid line)
               •      Generalization (represented as a solid line with a hollow
                      arrowhead pointing to the parent)
               •      Realization (represented as a dashed line with a hollow
                      arrowhead pointing to the parent)




                                                                                                   Paxcel technologies. www.paxcel.net
              This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Technical aspects of UML (Continued)

    Diagrams
     •     Structural/ Static
                   –        Class Diagram
                   –        Object Diagram
                   –        Component Diagram
                   –        Deployment Diagram
     •     Behavioral/ Dynamic
                   –        Use case Diagram
                   –        Sequence Diagram
                   –        Collaboration Diagram
                   –        Statechart Diagram
                   –        Activity Diagram




                                                                                              Paxcel technologies. www.paxcel.net
         This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Class Diagram
   Class diagram represents a set of classes, interfaces and
    their relationships.
   It can be used to model Collaboration of classes,
    Database schema.




                                                                                                     Paxcel technologies. www.paxcel.net
                This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Class Visibility
Visibility applies to attributes or operations, and specifies
  the extent to which other classes can use a given
  class‟s attributes or operations.

Three levels of visibility are possible:

1. Public level - usability extends to other classes +
2. Protected level - usability is open only to classes
  that
inherit from original class #
3. Private level - only the original


                                                                                                    Paxcel technologies. www.paxcel.net
               This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Association in Class diagrams

   By grouping and relating between the classes we create
    module and these are termed as Association.
   In order to associate them we need to draw solid arrowed
    lines between the classes as shown in the below figure.
   Example – A Person works for a Company.




                                                                                                      Paxcel technologies. www.paxcel.net
                 This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Association Properties

   Name
 Name of the association
   Role
 The specific role of the association
   Multiplicity
 Indicates the number of objects that are connected
   Type
 Plain association, aggregation, composition
   Direction
Direction can also be shown for a association


                                                                                                  Paxcel technologies. www.paxcel.net
             This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Association Multiplicity
   One class can be linked to instances of many other
    classes.
          That is, it indicates how many objects of one class relate to one
           object of another class. It is indicated by a single number or a range
           of numbers.
   Thus, multiplicity can be termed as classes having
    multiple associations.




                                                                                                       Paxcel technologies. www.paxcel.net
                  This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Multiplicity Example




   A teacher teaches 1 to 3 courses (subjects).
   Each course is taught by only one teacher.
   A student can take between 1 to 5 courses.
   A course can have 10 to 300 students.




                                                                                                   Paxcel technologies. www.paxcel.net
              This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Aggregation Relationships
   Aggregation is a whole/part relationship. In below
    example, Window is the whole, and Shape is part of
    Window.
   Aggregation is represented with a hollow/ open diamond.
   Ends of a relationship are referred to as its “roles”. Notice
    that the role at the Shape end of the aggregation is
    marked with a “*”. This indicates that the Window contains
    many Shape instances.




                                                                                                       Paxcel technologies. www.paxcel.net
                  This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Aggregation Relationships
   Aggregation is a whole/part relationship. In below
    example, Window is the whole, and Shape is part of
    Window.
   Aggregation is represented with a hollow/ open diamond.
   Ends of a relationship are referred to as its “roles”. Notice
    that the role at the Shape end of the aggregation is
    marked with a “*”. This indicates that the Window contains
    many Shape instances.




                                                                                                       Paxcel technologies. www.paxcel.net
                  This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Aggregation vs Composition

   Both refer to member object but the existence of member
    object (without the containing class or object or after the
    lifetime of the containing class or object) makes the
    difference.
   Aggregation is also known as a 'has a' relationship
    because the containing object has a member object and
    the member object can survive or exist without the
    enclosing or containing class or can have a meaning after
    the lifetime of the enclosing object also.
   Example ('has a'): Room has a table and the table can
    exist without the room. The table can have meaning
    without the room also.

                                                                                                      Paxcel technologies. www.paxcel.net
                 This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Aggregation vs Composition (Continued)

   Composition is also known as a 'is a part of' relationship
    because the member object is a part of the containing
    class.
   Member object cannot survive or exist outside the
    enclosing or containing class or does not have a meaning
    after the lifetime of the enclosing object.
   Example ('is a part of'): IMEI no. is a part of the Mobile.
    IMEI no. cannot exist without the mobile and the IMEI no.
    has no meaning after the lifetime of the mobile.




                                                                                                      Paxcel technologies. www.paxcel.net
                 This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Example - Aggregation vs Composition

   Aggregation




   As you can see, Person does not manage the lifetime of
    Address. If Person is destroyed, the Address still exists.


                                                                                                       Paxcel technologies. www.paxcel.net
                  This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Example - Aggregation vs Composition

   Composition




   If we were going to model a car, it would make sense to
    say that an engine is part-of a car.
   Within composition, the lifetime of the part (Engine) is
    managed by the whole (Car), in other words, when Car is
    destroyed, Engine is destroyed along with it.
   As you can see in the example code above, Car manages
    the lifetime of Engine.

                                                                                                       Paxcel technologies. www.paxcel.net
                  This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Inheritance Relationships

   Depicted by a hollow triangular arrowhead.
   One or more lines proceed from the base of the arrowhead
    connecting it to the derived classes.




                                                                                                      Paxcel technologies. www.paxcel.net
                 This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Dependency Relationships

   Sometimes the relationship between two classes is very
    weak. They are not implemented with member variables
    at all. Rather they might be implemented as member
    function arguments.
   Consider, for example, the Draw function of the Shape
    class. Suppose that this function takes an argument of
    type DrawingContext.
   Represented as dashed-arrow line.




                                                                                                     Paxcel technologies. www.paxcel.net
                This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
An abstract class and interface in UML
   Stereotype – Type/ word or string within two surrounding
    characters “«»”, called guillemets (pronounced Gee-may).
   Interface is represented by stereotype, «type» in the class
    diagram.
   Abstract classes are represented by „{abstract}‟ as shown
    in figure.




                                                                                                      Paxcel technologies. www.paxcel.net
                 This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Some of the commonly used stereo types while writing UML:

<<Application>>:- Used to represent a UI system in a application.
<<Database>> :- represents a database in a application.
<<Table>> :- A table with in database.
<<Library>> :- A reusable library or function.
<<File>> :- Physical file on a folder.
<<Executable>> :- A software component which can be executed.
<<Web services>> :- Represents a web service.
<<JDBC>> :- Java database connectivity , a JAVA API to connect to
  database.
<<ODBC>> :- Open database connectivity , a Microsoft API to connect to
  database.




                                                                                                      Paxcel technologies. www.paxcel.net
                 This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Object Diagram
   Class diagrams shows the types and how they are linked.
   Object diagram gives a pictorial representation of class
    diagram at any point of time.
   We represent object with Object Name: Class Name.
   Property is represented by „PropertyName=Value‟.
   We can show multiplicity as different objects of same class.
   Other UML entities, such as an aggregation or composition
    symbol (a diamond) may also appear on an object diagram.
   Note: - Object diagrams should only be drawn to represent
    complicated relationship between objects. It‟s possible that
    it can also complicate your technical document as lot. So
    use it sparingly.

                                                                                                       Paxcel technologies. www.paxcel.net
                  This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Object Diagram (Continued)

   Draw an object diagram to illustrate a real-life example of
    a class and its relationships.
   Object diagrams can help clarify classes and inheritance
    and are sometimes drawn while planning classes.
   Helpful in understanding the system from practical
    perspective.
   Assist non-programming stakeholders who may find class
    diagrams too abstract.
   An object can also be thought of as the description of an
    individual within a group.
   Hence “CheckingAccount” might be defined as a UML
    class and “John‟s checking account at Agency Bank”
    would be illustrated as an object diagram (on next slide).
                                                                                                      Paxcel technologies. www.paxcel.net
                 This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
Object Diagram... continued

   Object diagrams use notation very similar to class
    diagrams.




                                                                                                     Paxcel technologies. www.paxcel.net
                This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
References
   http://en.wikipedia.org/wiki/Unified_Modeling_Language
   http://www.dotnetfunda.com/articles/article143.aspx
   http://www.dotnetfunda.com/articles/article145.aspx
   http://www.careerride.com/UML-FAQs.aspx
   http://www.objectmentor.com/resources/articles/umlClassDiagrams.pdf
   http://www.altova.com/umodel/object-diagrams.html
   http://design-antony.blogspot.in/2007/07/aggregation-vs-composition.html
   http://www.c-
    sharpcorner.com/UploadFile/pcurnow/compagg07272007062838AM/compagg.asp
    x




                                                                                                        Paxcel technologies. www.paxcel.net
                   This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.

Contenu connexe

Tendances

Oop09 6
Oop09 6Oop09 6
Oop09 6schwaa
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling LanguageShahzad
 
UML Diagram Assignment Help, UML Diagram Homework Help
UML Diagram Assignment Help, UML Diagram Homework HelpUML Diagram Assignment Help, UML Diagram Homework Help
UML Diagram Assignment Help, UML Diagram Homework HelpJacob William
 
ITU - MDD – Modeling Techniques
ITU - MDD – Modeling TechniquesITU - MDD – Modeling Techniques
ITU - MDD – Modeling TechniquesTonny Madsen
 
Uml Omg Fundamental Certification 1
Uml Omg Fundamental Certification 1Uml Omg Fundamental Certification 1
Uml Omg Fundamental Certification 1Ricardo Quintero
 
Software architecture
Software architectureSoftware architecture
Software architectureInam Soomro
 
Uml in software engineering
Uml in software engineeringUml in software engineering
Uml in software engineeringMubashir Jutt
 
4.class diagramsusinguml
4.class diagramsusinguml4.class diagramsusinguml
4.class diagramsusingumlAPU
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationshipsPooja mittal
 
Uml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot netUml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot netmekhap
 
A&D - Object Oriented Analysis using UML
A&D - Object Oriented Analysis using UMLA&D - Object Oriented Analysis using UML
A&D - Object Oriented Analysis using UMLvinay arora
 
Software Architecture and Project Management module III : PATTERN OF ENTERPRISE
Software Architecture and Project Management module III : PATTERN OF ENTERPRISESoftware Architecture and Project Management module III : PATTERN OF ENTERPRISE
Software Architecture and Project Management module III : PATTERN OF ENTERPRISEsreeja_rajesh
 

Tendances (19)

Class diagram
Class diagramClass diagram
Class diagram
 
Oop09 6
Oop09 6Oop09 6
Oop09 6
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling Language
 
uml
umluml
uml
 
UML Diagram Assignment Help, UML Diagram Homework Help
UML Diagram Assignment Help, UML Diagram Homework HelpUML Diagram Assignment Help, UML Diagram Homework Help
UML Diagram Assignment Help, UML Diagram Homework Help
 
ITU - MDD – Modeling Techniques
ITU - MDD – Modeling TechniquesITU - MDD – Modeling Techniques
ITU - MDD – Modeling Techniques
 
Uml Omg Fundamental Certification 1
Uml Omg Fundamental Certification 1Uml Omg Fundamental Certification 1
Uml Omg Fundamental Certification 1
 
Software architecture
Software architectureSoftware architecture
Software architecture
 
Uml in software engineering
Uml in software engineeringUml in software engineering
Uml in software engineering
 
Class diagram
Class diagramClass diagram
Class diagram
 
4.class diagramsusinguml
4.class diagramsusinguml4.class diagramsusinguml
4.class diagramsusinguml
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
 
Uml class Diagram
Uml class DiagramUml class Diagram
Uml class Diagram
 
Uml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot netUml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot net
 
Uml introduciton
Uml introducitonUml introduciton
Uml introduciton
 
A&D - Object Oriented Analysis using UML
A&D - Object Oriented Analysis using UMLA&D - Object Oriented Analysis using UML
A&D - Object Oriented Analysis using UML
 
Software Architecture and Project Management module III : PATTERN OF ENTERPRISE
Software Architecture and Project Management module III : PATTERN OF ENTERPRISESoftware Architecture and Project Management module III : PATTERN OF ENTERPRISE
Software Architecture and Project Management module III : PATTERN OF ENTERPRISE
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
 

En vedette

En vedette (6)

Bai giang-uml-14jan14
Bai giang-uml-14jan14Bai giang-uml-14jan14
Bai giang-uml-14jan14
 
Uml(unified modelling language)
Uml(unified modelling language)Uml(unified modelling language)
Uml(unified modelling language)
 
Understanding unified modelling language
Understanding unified modelling languageUnderstanding unified modelling language
Understanding unified modelling language
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
 
Object oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle pptObject oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle ppt
 

Similaire à Introduction to UML

Architecture and design
Architecture and designArchitecture and design
Architecture and designhimanshu_airon
 
Design Patterns - 01 Introduction and Decorator Pattern
Design Patterns - 01 Introduction and Decorator PatternDesign Patterns - 01 Introduction and Decorator Pattern
Design Patterns - 01 Introduction and Decorator Patterneprafulla
 
08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagramskebsterz
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manualPraseela R
 
Object Oriented Principles
Object Oriented PrinciplesObject Oriented Principles
Object Oriented PrinciplesEmprovise
 
Scala - By Luu Thanh Thuy CWI team from eXo Platform SEA
Scala - By Luu Thanh Thuy CWI team from eXo Platform SEAScala - By Luu Thanh Thuy CWI team from eXo Platform SEA
Scala - By Luu Thanh Thuy CWI team from eXo Platform SEAThuy_Dang
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural ModelingAMITJain879
 
Lecture 4-oop class diagram
Lecture 4-oop class diagramLecture 4-oop class diagram
Lecture 4-oop class diagramktuonlinenotes
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software EngineeringAmit Singh
 
Representing Design Patterns In Uml Andy Bulka Oct2006
Representing Design Patterns In Uml Andy Bulka Oct2006Representing Design Patterns In Uml Andy Bulka Oct2006
Representing Design Patterns In Uml Andy Bulka Oct2006tcab22
 
Class Diagram | OOP and Design Patterns by Oum Saokosal
Class Diagram | OOP and Design Patterns by Oum SaokosalClass Diagram | OOP and Design Patterns by Oum Saokosal
Class Diagram | OOP and Design Patterns by Oum SaokosalOUM SAOKOSAL
 
Representing Patterns In Uml Andy Bulka 200610
Representing Patterns In Uml Andy Bulka 200610Representing Patterns In Uml Andy Bulka 200610
Representing Patterns In Uml Andy Bulka 200610melbournepatterns
 

Similaire à Introduction to UML (20)

Sequence diagrams in UML
Sequence diagrams in UMLSequence diagrams in UML
Sequence diagrams in UML
 
Css uml
Css umlCss uml
Css uml
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Design Patterns - 01 Introduction and Decorator Pattern
Design Patterns - 01 Introduction and Decorator PatternDesign Patterns - 01 Introduction and Decorator Pattern
Design Patterns - 01 Introduction and Decorator Pattern
 
08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagrams
 
UML
UMLUML
UML
 
DISE - OOAD Using UML
DISE - OOAD Using UMLDISE - OOAD Using UML
DISE - OOAD Using UML
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
 
Sda 7
Sda   7Sda   7
Sda 7
 
uml2-1214558329929112-8.ppt
uml2-1214558329929112-8.pptuml2-1214558329929112-8.ppt
uml2-1214558329929112-8.ppt
 
2 class use case
2 class use case2 class use case
2 class use case
 
Object Oriented Principles
Object Oriented PrinciplesObject Oriented Principles
Object Oriented Principles
 
Scala - By Luu Thanh Thuy CWI team from eXo Platform SEA
Scala - By Luu Thanh Thuy CWI team from eXo Platform SEAScala - By Luu Thanh Thuy CWI team from eXo Platform SEA
Scala - By Luu Thanh Thuy CWI team from eXo Platform SEA
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
 
Lecture 4-oop class diagram
Lecture 4-oop class diagramLecture 4-oop class diagram
Lecture 4-oop class diagram
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software Engineering
 
Representing Design Patterns In Uml Andy Bulka Oct2006
Representing Design Patterns In Uml Andy Bulka Oct2006Representing Design Patterns In Uml Andy Bulka Oct2006
Representing Design Patterns In Uml Andy Bulka Oct2006
 
Class Diagram | OOP and Design Patterns by Oum Saokosal
Class Diagram | OOP and Design Patterns by Oum SaokosalClass Diagram | OOP and Design Patterns by Oum Saokosal
Class Diagram | OOP and Design Patterns by Oum Saokosal
 
Representing Patterns In Uml Andy Bulka 200610
Representing Patterns In Uml Andy Bulka 200610Representing Patterns In Uml Andy Bulka 200610
Representing Patterns In Uml Andy Bulka 200610
 

Plus de Paxcel Technologies

Binary Class and Multi Class Strategies for Machine Learning
Binary Class and Multi Class Strategies for Machine LearningBinary Class and Multi Class Strategies for Machine Learning
Binary Class and Multi Class Strategies for Machine LearningPaxcel Technologies
 
Ssrs 2012(powerview) installation ans configuration
Ssrs 2012(powerview) installation ans configurationSsrs 2012(powerview) installation ans configuration
Ssrs 2012(powerview) installation ans configurationPaxcel Technologies
 
Paxcel Mobile development Portfolio
Paxcel Mobile development PortfolioPaxcel Mobile development Portfolio
Paxcel Mobile development PortfolioPaxcel Technologies
 
Risk Oriented Testing of Web-Based Applications
Risk Oriented Testing of Web-Based ApplicationsRisk Oriented Testing of Web-Based Applications
Risk Oriented Testing of Web-Based ApplicationsPaxcel Technologies
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Paxcel Technologies
 

Plus de Paxcel Technologies (10)

Binary Class and Multi Class Strategies for Machine Learning
Binary Class and Multi Class Strategies for Machine LearningBinary Class and Multi Class Strategies for Machine Learning
Binary Class and Multi Class Strategies for Machine Learning
 
Async pattern
Async patternAsync pattern
Async pattern
 
Window phone 8 introduction
Window phone 8 introductionWindow phone 8 introduction
Window phone 8 introduction
 
Ssrs 2012(powerview) installation ans configuration
Ssrs 2012(powerview) installation ans configurationSsrs 2012(powerview) installation ans configuration
Ssrs 2012(powerview) installation ans configuration
 
Paxcel Mobile development Portfolio
Paxcel Mobile development PortfolioPaxcel Mobile development Portfolio
Paxcel Mobile development Portfolio
 
Risk Oriented Testing of Web-Based Applications
Risk Oriented Testing of Web-Based ApplicationsRisk Oriented Testing of Web-Based Applications
Risk Oriented Testing of Web-Based Applications
 
Knockout.js explained
Knockout.js explainedKnockout.js explained
Knockout.js explained
 
All about Contactless payments
All about Contactless paymentsAll about Contactless payments
All about Contactless payments
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1
 
Paxcel Snapshot
Paxcel SnapshotPaxcel Snapshot
Paxcel Snapshot
 

Dernier

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Dernier (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Introduction to UML

  • 1. Class and Object diagrams in UML (Unified Modeling Language) http://www.paxcel.net By:- Tanjot Singh Sandhu Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 2. UML Background  UML is a standard language for designing and documenting a system in an object-oriented manner.  UML includes a set of graphic notation techniques to create visual models of object-oriented software- intensive systems.  The standard is managed, and was created, by the Object Management Group (OMG).  UML versions - UML 1.0, 1.1 1.2, 1.3, 1.4, and 1.5  UML 2.0 – adopted by OMG in 2005.  UML 2.3 - formally released in May 2010.  UML 2.4.1 - formally released in August 2011. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 3. Technical aspects of UML  Building block of UML Things  Structural Things (Class, Interface, Collaboration, Use case, Active class, Component, Node)  Behavioral things (Message , State)  Grouping things (Package)  Annotational things (Notes) – Relationships • Dependency (represented as a dashed directed line) • Association (rendered as solid line) • Generalization (represented as a solid line with a hollow arrowhead pointing to the parent) • Realization (represented as a dashed line with a hollow arrowhead pointing to the parent) Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 4. Technical aspects of UML (Continued) Diagrams • Structural/ Static – Class Diagram – Object Diagram – Component Diagram – Deployment Diagram • Behavioral/ Dynamic – Use case Diagram – Sequence Diagram – Collaboration Diagram – Statechart Diagram – Activity Diagram Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 5. Class Diagram  Class diagram represents a set of classes, interfaces and their relationships.  It can be used to model Collaboration of classes, Database schema. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 6. Class Visibility Visibility applies to attributes or operations, and specifies the extent to which other classes can use a given class‟s attributes or operations. Three levels of visibility are possible: 1. Public level - usability extends to other classes + 2. Protected level - usability is open only to classes that inherit from original class # 3. Private level - only the original Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 7. Association in Class diagrams  By grouping and relating between the classes we create module and these are termed as Association.  In order to associate them we need to draw solid arrowed lines between the classes as shown in the below figure.  Example – A Person works for a Company. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 8. Association Properties  Name Name of the association  Role The specific role of the association  Multiplicity Indicates the number of objects that are connected  Type Plain association, aggregation, composition  Direction Direction can also be shown for a association Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 9. Association Multiplicity  One class can be linked to instances of many other classes.  That is, it indicates how many objects of one class relate to one object of another class. It is indicated by a single number or a range of numbers.  Thus, multiplicity can be termed as classes having multiple associations. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 10. Multiplicity Example  A teacher teaches 1 to 3 courses (subjects).  Each course is taught by only one teacher.  A student can take between 1 to 5 courses.  A course can have 10 to 300 students. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 11. Aggregation Relationships  Aggregation is a whole/part relationship. In below example, Window is the whole, and Shape is part of Window.  Aggregation is represented with a hollow/ open diamond.  Ends of a relationship are referred to as its “roles”. Notice that the role at the Shape end of the aggregation is marked with a “*”. This indicates that the Window contains many Shape instances. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 12. Aggregation Relationships  Aggregation is a whole/part relationship. In below example, Window is the whole, and Shape is part of Window.  Aggregation is represented with a hollow/ open diamond.  Ends of a relationship are referred to as its “roles”. Notice that the role at the Shape end of the aggregation is marked with a “*”. This indicates that the Window contains many Shape instances. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 13. Aggregation vs Composition  Both refer to member object but the existence of member object (without the containing class or object or after the lifetime of the containing class or object) makes the difference.  Aggregation is also known as a 'has a' relationship because the containing object has a member object and the member object can survive or exist without the enclosing or containing class or can have a meaning after the lifetime of the enclosing object also.  Example ('has a'): Room has a table and the table can exist without the room. The table can have meaning without the room also. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 14. Aggregation vs Composition (Continued)  Composition is also known as a 'is a part of' relationship because the member object is a part of the containing class.  Member object cannot survive or exist outside the enclosing or containing class or does not have a meaning after the lifetime of the enclosing object.  Example ('is a part of'): IMEI no. is a part of the Mobile. IMEI no. cannot exist without the mobile and the IMEI no. has no meaning after the lifetime of the mobile. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 15. Example - Aggregation vs Composition  Aggregation  As you can see, Person does not manage the lifetime of Address. If Person is destroyed, the Address still exists. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 16. Example - Aggregation vs Composition  Composition  If we were going to model a car, it would make sense to say that an engine is part-of a car.  Within composition, the lifetime of the part (Engine) is managed by the whole (Car), in other words, when Car is destroyed, Engine is destroyed along with it.  As you can see in the example code above, Car manages the lifetime of Engine. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 17. Inheritance Relationships  Depicted by a hollow triangular arrowhead.  One or more lines proceed from the base of the arrowhead connecting it to the derived classes. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 18. Dependency Relationships  Sometimes the relationship between two classes is very weak. They are not implemented with member variables at all. Rather they might be implemented as member function arguments.  Consider, for example, the Draw function of the Shape class. Suppose that this function takes an argument of type DrawingContext.  Represented as dashed-arrow line. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 19. An abstract class and interface in UML  Stereotype – Type/ word or string within two surrounding characters “«»”, called guillemets (pronounced Gee-may).  Interface is represented by stereotype, «type» in the class diagram.  Abstract classes are represented by „{abstract}‟ as shown in figure. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 20. Some of the commonly used stereo types while writing UML: <<Application>>:- Used to represent a UI system in a application. <<Database>> :- represents a database in a application. <<Table>> :- A table with in database. <<Library>> :- A reusable library or function. <<File>> :- Physical file on a folder. <<Executable>> :- A software component which can be executed. <<Web services>> :- Represents a web service. <<JDBC>> :- Java database connectivity , a JAVA API to connect to database. <<ODBC>> :- Open database connectivity , a Microsoft API to connect to database. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 21. Object Diagram  Class diagrams shows the types and how they are linked.  Object diagram gives a pictorial representation of class diagram at any point of time.  We represent object with Object Name: Class Name.  Property is represented by „PropertyName=Value‟.  We can show multiplicity as different objects of same class.  Other UML entities, such as an aggregation or composition symbol (a diamond) may also appear on an object diagram.  Note: - Object diagrams should only be drawn to represent complicated relationship between objects. It‟s possible that it can also complicate your technical document as lot. So use it sparingly. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 22. Object Diagram (Continued)  Draw an object diagram to illustrate a real-life example of a class and its relationships.  Object diagrams can help clarify classes and inheritance and are sometimes drawn while planning classes.  Helpful in understanding the system from practical perspective.  Assist non-programming stakeholders who may find class diagrams too abstract.  An object can also be thought of as the description of an individual within a group.  Hence “CheckingAccount” might be defined as a UML class and “John‟s checking account at Agency Bank” would be illustrated as an object diagram (on next slide). Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 23. Object Diagram... continued  Object diagrams use notation very similar to class diagrams. Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.
  • 24. References  http://en.wikipedia.org/wiki/Unified_Modeling_Language  http://www.dotnetfunda.com/articles/article143.aspx  http://www.dotnetfunda.com/articles/article145.aspx  http://www.careerride.com/UML-FAQs.aspx  http://www.objectmentor.com/resources/articles/umlClassDiagrams.pdf  http://www.altova.com/umodel/object-diagrams.html  http://design-antony.blogspot.in/2007/07/aggregation-vs-composition.html  http://www.c- sharpcorner.com/UploadFile/pcurnow/compagg07272007062838AM/compagg.asp x Paxcel technologies. www.paxcel.net This is the exclusive property of Paxcel Technologies. This may not be reproduced or given to third parties without their consent.