SlideShare uma empresa Scribd logo
1 de 37
UML
What is UML and Why we use UML?
   UML → “Unified Modeling Language”
   Language: express idea, not a methodology

   Modeling: Describing a software system at a high
    level of abstraction

   Unified: UML has become a world standard
    Object Management Group (OMG): www.omg.org
What is UML and Why we use UML?
   More description about UML:
   It is a industry-standard graphical language for specifying, visualizing,
    constructing, and documenting the artifacts of software systems

   The UML uses mostly graphical notations to express the OO analysis
    and design of software projects.

   Simplifies the complex process of software design
What is UML and Why we use UML?
   Why we use UML?
   Use graphical notation: more clearly than natural language
    (imprecise) and code (too detailed).

   Help acquire an overall view of a system.

   UML is not dependent on any one language or technology.

   UML moves us from fragmentation to standardization.
What is UML and Why we use UML?
                     Year Version
                     2003:       UML 2.0
                     2001:       UML 1.4
                     1999:       UML 1.3
                     1997:       UML 1.0, 1.1
                     1996:       UML 0.9 & 0.91
                     1995:       Unified Method 0.8



                             Booch ‘93            OMT - 2
     Other methods


                     Booch ‘91
                                                        OMT - 1
How to use UML diagrams to
design software system?
   Types of UML Diagrams:
   Use Case Diagram
   Class Diagram
   Sequence Diagram
   Collaboration Diagram
   State Diagram



This is only a subset of diagrams … but are most widely used
Use-Case Diagrams
   A use-case diagram is a set of use cases
   A use case is a model of the interaction between
   External users of a software product (actors) and
   The software product itself
   More precisely, an actor is a user playing a specific role


   describing a set of user scenarios
   capturing user requirements
   contract between end user and software developers
Use-Case Diagrams
           Boundary                                  Use Case
Actor                 Library System




                         Borrow         Employee
        Client


                      Order Title




                      Fine Remittance


                                        Supervisor
Use-Case Diagrams
   Actors: A role that a user plays with respect to the system, including human
    users and other systems. e.g., inanimate physical objects (e.g. robot); an
    external system that needs some information from the current system.

   Use case: A set of scenarios that describing an interaction between a user
    and a system, including alternatives.

   System boundary: rectangle diagram representing the boundary between
    the actors and the system.
Use-Case Diagrams
     Association:
    communication between an actor and a use case; Represented by a solid line.




     Generalization: relationship between one general use case and a special use
      case (used for defining special alternatives) Represented by a line with a
      triangular arrow head toward the parent use case.
Use-Case Diagrams
  Include: a dotted line labeled <<include>> beginning at base
  use case and ending with an arrows pointing to the include use
  case. The include relationship occurs when a chunk of
  behavior is similar across more than one use case. Use
  “include” in stead of copying the description of that behavior.
       <<include>>




  Extend: a dotted line labeled <<extend>> with an arrow toward
  the base case. The extending use case may add behavior to the
  base use case. The base class declares “extension points”.


        <<extend>>
Use-Case Diagrams




                                        Figure 16.12
      The McGraw-Hill Companies, 2005
Use-Case Diagrams
   Both Make Appointment
    and Request Medication
    include Check Patient
    Record as a subtask
    (include)

   The extension point is
    written inside the base
    case Pay bill; the
    extending class Defer
    payment adds the
    behavior of this extension
    point. (extend)

   Pay Bill is a parent use
    case and Bill Insurance
    is the child use case.
    (generalization)

                                 (TogetherSoft, Inc)
Class diagram
   A class diagram depicts classes and their interrelationships

   Used for describing structure and behavior in the use cases

   Provide a conceptual model of the system in terms of
    entities and their relationships

   Used for requirement capture, end-user interaction

   Detailed class diagrams are used for developers
Class diagram
   Each class is represented by a rectangle subdivided into three
    compartments
        Name
        Attributes
        Operations

   Modifiers are used to indicate visibility of attributes and
    operations.
      ‘+’  is used to denote Public visibility (everyone)
      ‘#’  is used to denote Protected visibility (friends and derived)
      ‘-’  is used to denote Private visibility (no one)

   By default, attributes are hidden and operations are visible.
Class diagram
                     Name
     Account_Name
   - Customer_Name
                     Attributes
   - Balance
   +addFunds( )      Operations
   +withDraw( )
   +transfer( )
OO Relationships
   There are two kinds of Relationships
       Generalization (parent-child relationship)
       Association (student enrolls in course)


   Associations can be further classified as
       Aggregation
       Composition
OO Relationships: Generalization


                                             Example:
              Supertype                                      Customer




                                                  Regular               Loyalty
                                                  Customer              Customer

      Subtype1           Subtype2
-Inheritance is a required feature of object orientation
-Generalization expresses a parent/child relationship among related classes.

-Used for abstracting details in several layers
OO Relationships: Association

   Represent relationship between instances of classes
       Student enrolls in a course
       Courses have students
       Courses have exams
       Etc.


   Association has two ends
       Role names (e.g. enrolls)
       Multiplicity (e.g. One course can have many students)
       Navigability (unidirectional, bidirectional)
Association: Multiplicity and Roles
                                                         student
                                1                           *
          University                                                    Person

                              0..1                          *
                            employer                     teacher


            Multiplicity                                                Role
Symbol   Meaning
1        One and only one
                                                                 Role
0..1     Zero or one                         “A given university groups many people;
                                             some act as students, others as teachers.
M..N     From M to N (natural language)
                                             A given student belongs to a single
*        From zero to any positive integer   university; a given teacher may or may not
0..*     From zero to any positive integer   be working for the university at a particular
1..*     From one to any positive integer    time.”
Class diagram




      [from UML Distilled Third Edition]
Association: Model to Implementation


              *             4
    Student                       Course
              has       enrolls

Class Student {
   Course enrolls[4];
}

Class Course {
   Student have[];
}
OO Relationships: Composition


Whole Class
                    Class W                 Association
                                                Models the part–whole relationship

                                            Composition
         Class P1             Class P2          Also models the part–whole relationship but, in
                                                addition, Every part may belong to only one
                                                whole, and If the whole is deleted, so are the
                Part Classes                    parts
      [From Dr.David A. Workman]
  Example                                   Example:
                                            A number of different chess boards: Each square
                                            belongs to only one board. If a chess board is
                                            thrown away, all 64 squares on that board go as
                                            well.


                              Figure 16.7
The McGraw-Hill Companies, 2005
OO Relationships: Aggregation


          Container Class
                                     Aggregation:
                Class C              expresses a relationship among instances of related
                                     classes. It is a specific kind of Container-Containee
AGGREGATION
                                     relationship.

     Class E1             Class E2   express a more informal relationship than
                                     composition expresses.

          Containee Classes          Aggregation is appropriate when Container and
                                     Containees have no special access privileges to
                                     each other.
Example
                 Bag




     Apples               Milk

     [From Dr.David A. Workman]
Aggregation vs. Composition
  Composition        is really a strong form of association
  components have only one owner
  components cannot exist independent of their owner
  components live or die with their owner
  e.g. Each car has an engine that can not be shared with other cars.

  Aggregations
  may form "part of" the association, but may not be essential to it. They
  may also exist independent of the aggregate. e.g. Apples may exist
  independent of the bag.
Good Practice: CRC Card
Class Responsibility Collaborator
  easy to describe how classes work by moving cards around; allows to
   quickly consider alternatives.
Interaction Diagrams
   show how objects interact with one another

   UML supports two types of interaction
    diagrams
       Sequence diagrams
       Collaboration diagrams
Sequence Diagram(make a phone call)
 Caller                       Phone              Recipient

          Picks up

          Dial tone

          Dial


          Ring notification             Ring


                                      Picks up

                              Hello
Sequence Diagram:Object interaction
                                       A                          B
 Self-Call: A message that an
 Self-Call
                                              Synchronous
 Object sends to itself.

 Condition: indicates when a                  Asynchronous
 message is sent. The message is
                                             Transmission
 sent only if the condition is true.         delayed


                                           [condition] remove()
                           Condition
                                           *[for each] remove()
                          Iteration

                                            Self-Call
Sequence Diagrams – Object Life Spans
   Creation
                                                 A
      Create message

      Object life starts at that point

                                                     Create
   Activation                                                    B
      Symbolized by rectangular stripes

      Place on the lifeline where object

        is activated.
      Rectangle also denotes when

        object is deactivated.
    Deletion                      Activation bar
                                                                 X
                                                    Return
      Placing an ‘X’ on lifeline
                                                              Deletion
      Object’s life ends at that point Lifeline
Sequence Diagram
                                            User
                                                           Message            Catalog                                        Reservations

•Sequence diagrams demonstrate the
behavior of objects in a use case by                 1: look up ()

describing the objects and the                      2: title data ()
messages they pass.
                                                                   3: [not available] reserve title ()



                                                                                                     4 : title returned ()
•The horizontal dimension shows the
objects participating in the interaction.                                                              5: hold title ()


                                                                            5 : title available ()


•The vertical arrangement of                       6 : borrow title ()

messages indicates their order.
                                                                         6 : remove reservation ()




•The labels may contain the seq. # to
indicate concurrency.
Interaction Diagrams: Collaboration diagrams

                                  start

                                                                 6: remove reservation

                                                       3 : [not available] reserve title
                                             User                                             Reservations

                                                                   5: title available
         6 : borrow title
                                                    1: look up
                            2: title data



                                                                     4 : title returned
                                            Catalog

                                                                             5 : hold title
Collaboration diagrams are equivalent to sequence diagrams. All the features of sequence
diagrams are equally applicable to collaboration diagrams

Use a sequence diagram when the transfer of information is the focus of attention

Use a collaboration diagram when concentrating on the classes
State Diagrams (Billing Example)

State Diagrams show the sequences of states an object goes through
during its life cycle in response to stimuli, together with its responses and
actions; an abstraction of all possible behaviors.



    Start                                                                      End
                            Unpaid               Paid
          Invoice created            payin                Invoice destroying
                                     g
State Diagrams (Traffic light example)

                    Traffic Light   Start
            State
   Transition           Red

                      Yellow

                      Green

      Event
What UML Modeling tools we use today?
   List of UML tools http://en.wikipedia.org/wiki/List_of_UML_tools

   ArgoUML: http://argouml.tigris.org/

   Rational Rose (www.rational.com) by IBM

   UML Studio 7.1 ( http://www.pragsoft.com/) by Pragsoft Corporation:
    Capable of handling very large models (tens of thousands of classes).
    Educational License US$ 125.00; Freeware version.

   TogetherSoft Control Center; TogetherSoft Solo (http://
    www.borland.com/together/index.html) by Borland
Conclusion
   UML is a standardized specification language
    for object modeling
   Several UML diagrams:
   use-case diagram: a number of use cases (use case models the interaction
    between actors and software)
   Class diagram: a model of classes showing the static relationships among them
    including association and generalization.
   Sequence diagram: shows the way objects interact with one another as
    messages are passed between them. Dynamic model
   State diagram: shows states, events that cause transitions between states.
    Another dynamic model reflecting the behavior of objects and how they react to
    specific event
   There are several UML tools available
Thank you

        Questions?

Mais conteúdo relacionado

Mais procurados

Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering Madhar Khan Pathan
 
Object Oriented Relationships
Object Oriented RelationshipsObject Oriented Relationships
Object Oriented RelationshipsTaher Barodawala
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Languagesurana college
 
Introduction to OOA and UML - Part 2
Introduction to OOA and UML - Part 2 Introduction to OOA and UML - Part 2
Introduction to OOA and UML - Part 2 Lakshmi-BA
 
Introduction to OOA and UML
Introduction to OOA and UMLIntroduction to OOA and UML
Introduction to OOA and UMLVeneet-BA
 
09 ooad uml-11
09 ooad uml-1109 ooad uml-11
09 ooad uml-11Niit Care
 
Uml in software engineering
Uml in software engineeringUml in software engineering
Uml in software engineeringMubashir Jutt
 
Slide 5 Class Diagram
Slide 5 Class DiagramSlide 5 Class Diagram
Slide 5 Class DiagramNiloy Rocker
 
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
 
Unified Modeling Language (UML)
Unified Modeling Language (UML)Unified Modeling Language (UML)
Unified Modeling Language (UML)ppd1961
 
OO Development 4 - Object Concepts
OO Development 4 - Object ConceptsOO Development 4 - Object Concepts
OO Development 4 - Object ConceptsRandy Connolly
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLMalek Sumaiya
 

Mais procurados (19)

34. uml
34. uml34. uml
34. uml
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
Object Oriented Relationships
Object Oriented RelationshipsObject Oriented Relationships
Object Oriented Relationships
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Introduction to OOA and UML - Part 2
Introduction to OOA and UML - Part 2 Introduction to OOA and UML - Part 2
Introduction to OOA and UML - Part 2
 
Introduction to OOA and UML
Introduction to OOA and UMLIntroduction to OOA and UML
Introduction to OOA and UML
 
09 ooad uml-11
09 ooad uml-1109 ooad uml-11
09 ooad uml-11
 
Uml in software engineering
Uml in software engineeringUml in software engineering
Uml in software engineering
 
Slide 5 Class Diagram
Slide 5 Class DiagramSlide 5 Class Diagram
Slide 5 Class Diagram
 
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
 
Uml
UmlUml
Uml
 
Domain Modeling
Domain ModelingDomain Modeling
Domain Modeling
 
Unified Modeling Language (UML)
Unified Modeling Language (UML)Unified Modeling Language (UML)
Unified Modeling Language (UML)
 
Ooad static diagram
Ooad static diagramOoad static diagram
Ooad static diagram
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Behavioural modelling
Behavioural modellingBehavioural modelling
Behavioural modelling
 
OO Development 4 - Object Concepts
OO Development 4 - Object ConceptsOO Development 4 - Object Concepts
OO Development 4 - Object Concepts
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UML
 
2 class use case
2 class use case2 class use case
2 class use case
 

Destaque

Get the Gist: Universal Modelling Language (UML)
Get the Gist: Universal Modelling Language (UML)Get the Gist: Universal Modelling Language (UML)
Get the Gist: Universal Modelling Language (UML)russellgmorley
 
TY CS Black book Construction - Dinesh48
TY CS Black book Construction - Dinesh48TY CS Black book Construction - Dinesh48
TY CS Black book Construction - Dinesh48Dinesh Jogdand
 
05 si(systems analysis and design )
05 si(systems analysis and design )05 si(systems analysis and design )
05 si(systems analysis and design )Nurdin Al-Azies
 
Lecture#04, use case diagram
Lecture#04, use case diagramLecture#04, use case diagram
Lecture#04, use case diagrambabak danyal
 
Library Management System
Library Management SystemLibrary Management System
Library Management SystemAnit Thapaliya
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case DiagramKumar
 
Online Bus Ticket Reservation System
Online Bus Ticket Reservation SystemOnline Bus Ticket Reservation System
Online Bus Ticket Reservation SystemTuvshinbayar Davaa
 
Vehicle management system
Vehicle management systemVehicle management system
Vehicle management systemMohd Saddam
 

Destaque (11)

Get the Gist: Universal Modelling Language (UML)
Get the Gist: Universal Modelling Language (UML)Get the Gist: Universal Modelling Language (UML)
Get the Gist: Universal Modelling Language (UML)
 
TY CS Black book Construction - Dinesh48
TY CS Black book Construction - Dinesh48TY CS Black book Construction - Dinesh48
TY CS Black book Construction - Dinesh48
 
05 si(systems analysis and design )
05 si(systems analysis and design )05 si(systems analysis and design )
05 si(systems analysis and design )
 
Lecture#04, use case diagram
Lecture#04, use case diagramLecture#04, use case diagram
Lecture#04, use case diagram
 
Library Management System
Library Management SystemLibrary Management System
Library Management System
 
Use case-diagrams
Use case-diagramsUse case-diagrams
Use case-diagrams
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case Diagram
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Online Bus Ticket Reservation System
Online Bus Ticket Reservation SystemOnline Bus Ticket Reservation System
Online Bus Ticket Reservation System
 
Mgd finite statemachine
Mgd finite statemachineMgd finite statemachine
Mgd finite statemachine
 
Vehicle management system
Vehicle management systemVehicle management system
Vehicle management system
 

Semelhante a A&D - UML

UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejnejeUML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejnejessusera6a60c1
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering Madhar Khan Pathan
 
Introduction to UML, a guide to learn.pdf
Introduction to UML, a guide to learn.pdfIntroduction to UML, a guide to learn.pdf
Introduction to UML, a guide to learn.pdfTARGARYEN001
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UMLSwatiS-BA
 
Introduction to OOA and UML
Introduction to OOA and UMLIntroduction to OOA and UML
Introduction to OOA and UMLVeneet-BA
 
UML Training for Business Analysts
UML Training for Business AnalystsUML Training for Business Analysts
UML Training for Business AnalystsSwatiS-BA
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manualPraseela R
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationshipsPooja mittal
 
Session13-Class Diagram (1).pdf
Session13-Class Diagram (1).pdfSession13-Class Diagram (1).pdf
Session13-Class Diagram (1).pdfPeterTran514407
 
ITSE_11-updated.pptx
ITSE_11-updated.pptxITSE_11-updated.pptx
ITSE_11-updated.pptxAnsaRasheed3
 
CASE Tools lab.ppt
CASE Tools lab.pptCASE Tools lab.ppt
CASE Tools lab.pptRAJESH S
 
Lecture 4-oop class diagram
Lecture 4-oop class diagramLecture 4-oop class diagram
Lecture 4-oop class diagramktuonlinenotes
 
06 class diagrams
06 class diagrams06 class diagrams
06 class diagramsBaskarkncet
 

Semelhante a A&D - UML (20)

UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejnejeUML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
 
Uml report
Uml reportUml report
Uml report
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
Introduction to UML, a guide to learn.pdf
Introduction to UML, a guide to learn.pdfIntroduction to UML, a guide to learn.pdf
Introduction to UML, a guide to learn.pdf
 
Uml lecture
Uml lectureUml lecture
Uml lecture
 
Software Engineering1-1-UML.ppt
Software Engineering1-1-UML.pptSoftware Engineering1-1-UML.ppt
Software Engineering1-1-UML.ppt
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Introduction to OOA and UML
Introduction to OOA and UMLIntroduction to OOA and UML
Introduction to OOA and UML
 
UML Training for Business Analysts
UML Training for Business AnalystsUML Training for Business Analysts
UML Training for Business Analysts
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
 
Claas diagram
Claas diagramClaas diagram
Claas diagram
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
 
Session13-Class Diagram (1).pdf
Session13-Class Diagram (1).pdfSession13-Class Diagram (1).pdf
Session13-Class Diagram (1).pdf
 
ITSE_11-updated.pptx
ITSE_11-updated.pptxITSE_11-updated.pptx
ITSE_11-updated.pptx
 
Css uml
Css umlCss uml
Css uml
 
CASE Tools lab.ppt
CASE Tools lab.pptCASE Tools lab.ppt
CASE Tools lab.ppt
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Lecture 4-oop class diagram
Lecture 4-oop class diagramLecture 4-oop class diagram
Lecture 4-oop class diagram
 
06 class diagrams
06 class diagrams06 class diagrams
06 class diagrams
 

Mais de vinay arora

Search engine and web crawler
Search engine and web crawlerSearch engine and web crawler
Search engine and web crawlervinay arora
 
Use case diagram (airport)
Use case diagram (airport)Use case diagram (airport)
Use case diagram (airport)vinay arora
 
Use case diagram
Use case diagramUse case diagram
Use case diagramvinay arora
 
Lab exercise questions (AD & CD)
Lab exercise questions (AD & CD)Lab exercise questions (AD & CD)
Lab exercise questions (AD & CD)vinay arora
 
SEM - UML (1st case study)
SEM - UML (1st case study)SEM - UML (1st case study)
SEM - UML (1st case study)vinay arora
 
4 java - decision
4  java - decision4  java - decision
4 java - decisionvinay arora
 
3 java - variable type
3  java - variable type3  java - variable type
3 java - variable typevinay arora
 
2 java - operators
2  java - operators2  java - operators
2 java - operatorsvinay arora
 
1 java - data type
1  java - data type1  java - data type
1 java - data typevinay arora
 
Security & Protection
Security & ProtectionSecurity & Protection
Security & Protectionvinay arora
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronizationvinay arora
 
CG - Output Primitives
CG - Output PrimitivesCG - Output Primitives
CG - Output Primitivesvinay arora
 
CG - Display Devices
CG - Display DevicesCG - Display Devices
CG - Display Devicesvinay arora
 
CG - Input Output Devices
CG - Input Output DevicesCG - Input Output Devices
CG - Input Output Devicesvinay arora
 
CG - Introduction to Computer Graphics
CG - Introduction to Computer GraphicsCG - Introduction to Computer Graphics
CG - Introduction to Computer Graphicsvinay arora
 
C Prog. - Strings (Updated)
C Prog. - Strings (Updated)C Prog. - Strings (Updated)
C Prog. - Strings (Updated)vinay arora
 

Mais de vinay arora (20)

Search engine and web crawler
Search engine and web crawlerSearch engine and web crawler
Search engine and web crawler
 
Use case diagram (airport)
Use case diagram (airport)Use case diagram (airport)
Use case diagram (airport)
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
 
Lab exercise questions (AD & CD)
Lab exercise questions (AD & CD)Lab exercise questions (AD & CD)
Lab exercise questions (AD & CD)
 
SEM - UML (1st case study)
SEM - UML (1st case study)SEM - UML (1st case study)
SEM - UML (1st case study)
 
6 java - loop
6  java - loop6  java - loop
6 java - loop
 
4 java - decision
4  java - decision4  java - decision
4 java - decision
 
3 java - variable type
3  java - variable type3  java - variable type
3 java - variable type
 
2 java - operators
2  java - operators2  java - operators
2 java - operators
 
1 java - data type
1  java - data type1  java - data type
1 java - data type
 
Uta005 lecture3
Uta005 lecture3Uta005 lecture3
Uta005 lecture3
 
Uta005 lecture1
Uta005 lecture1Uta005 lecture1
Uta005 lecture1
 
Uta005 lecture2
Uta005 lecture2Uta005 lecture2
Uta005 lecture2
 
Security & Protection
Security & ProtectionSecurity & Protection
Security & Protection
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronization
 
CG - Output Primitives
CG - Output PrimitivesCG - Output Primitives
CG - Output Primitives
 
CG - Display Devices
CG - Display DevicesCG - Display Devices
CG - Display Devices
 
CG - Input Output Devices
CG - Input Output DevicesCG - Input Output Devices
CG - Input Output Devices
 
CG - Introduction to Computer Graphics
CG - Introduction to Computer GraphicsCG - Introduction to Computer Graphics
CG - Introduction to Computer Graphics
 
C Prog. - Strings (Updated)
C Prog. - Strings (Updated)C Prog. - Strings (Updated)
C Prog. - Strings (Updated)
 

Último

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 

Último (20)

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 

A&D - UML

  • 1. UML
  • 2. What is UML and Why we use UML?  UML → “Unified Modeling Language”  Language: express idea, not a methodology  Modeling: Describing a software system at a high level of abstraction  Unified: UML has become a world standard Object Management Group (OMG): www.omg.org
  • 3. What is UML and Why we use UML?  More description about UML:  It is a industry-standard graphical language for specifying, visualizing, constructing, and documenting the artifacts of software systems  The UML uses mostly graphical notations to express the OO analysis and design of software projects.  Simplifies the complex process of software design
  • 4. What is UML and Why we use UML?  Why we use UML?  Use graphical notation: more clearly than natural language (imprecise) and code (too detailed).  Help acquire an overall view of a system.  UML is not dependent on any one language or technology.  UML moves us from fragmentation to standardization.
  • 5. What is UML and Why we use UML? Year Version 2003: UML 2.0 2001: UML 1.4 1999: UML 1.3 1997: UML 1.0, 1.1 1996: UML 0.9 & 0.91 1995: Unified Method 0.8 Booch ‘93 OMT - 2 Other methods Booch ‘91 OMT - 1
  • 6. How to use UML diagrams to design software system?  Types of UML Diagrams:  Use Case Diagram  Class Diagram  Sequence Diagram  Collaboration Diagram  State Diagram This is only a subset of diagrams … but are most widely used
  • 7. Use-Case Diagrams  A use-case diagram is a set of use cases  A use case is a model of the interaction between  External users of a software product (actors) and  The software product itself  More precisely, an actor is a user playing a specific role  describing a set of user scenarios  capturing user requirements  contract between end user and software developers
  • 8. Use-Case Diagrams Boundary Use Case Actor Library System Borrow Employee Client Order Title Fine Remittance Supervisor
  • 9. Use-Case Diagrams  Actors: A role that a user plays with respect to the system, including human users and other systems. e.g., inanimate physical objects (e.g. robot); an external system that needs some information from the current system.  Use case: A set of scenarios that describing an interaction between a user and a system, including alternatives.  System boundary: rectangle diagram representing the boundary between the actors and the system.
  • 10. Use-Case Diagrams  Association: communication between an actor and a use case; Represented by a solid line.  Generalization: relationship between one general use case and a special use case (used for defining special alternatives) Represented by a line with a triangular arrow head toward the parent use case.
  • 11. Use-Case Diagrams Include: a dotted line labeled <<include>> beginning at base use case and ending with an arrows pointing to the include use case. The include relationship occurs when a chunk of behavior is similar across more than one use case. Use “include” in stead of copying the description of that behavior. <<include>> Extend: a dotted line labeled <<extend>> with an arrow toward the base case. The extending use case may add behavior to the base use case. The base class declares “extension points”. <<extend>>
  • 12. Use-Case Diagrams Figure 16.12 The McGraw-Hill Companies, 2005
  • 13. Use-Case Diagrams  Both Make Appointment and Request Medication include Check Patient Record as a subtask (include)  The extension point is written inside the base case Pay bill; the extending class Defer payment adds the behavior of this extension point. (extend)  Pay Bill is a parent use case and Bill Insurance is the child use case. (generalization) (TogetherSoft, Inc)
  • 14. Class diagram  A class diagram depicts classes and their interrelationships  Used for describing structure and behavior in the use cases  Provide a conceptual model of the system in terms of entities and their relationships  Used for requirement capture, end-user interaction  Detailed class diagrams are used for developers
  • 15. Class diagram  Each class is represented by a rectangle subdivided into three compartments  Name  Attributes  Operations  Modifiers are used to indicate visibility of attributes and operations.  ‘+’ is used to denote Public visibility (everyone)  ‘#’ is used to denote Protected visibility (friends and derived)  ‘-’ is used to denote Private visibility (no one)  By default, attributes are hidden and operations are visible.
  • 16. Class diagram Name Account_Name - Customer_Name Attributes - Balance +addFunds( ) Operations +withDraw( ) +transfer( )
  • 17. OO Relationships  There are two kinds of Relationships  Generalization (parent-child relationship)  Association (student enrolls in course)  Associations can be further classified as  Aggregation  Composition
  • 18. OO Relationships: Generalization Example: Supertype Customer Regular Loyalty Customer Customer Subtype1 Subtype2 -Inheritance is a required feature of object orientation -Generalization expresses a parent/child relationship among related classes. -Used for abstracting details in several layers
  • 19. OO Relationships: Association  Represent relationship between instances of classes  Student enrolls in a course  Courses have students  Courses have exams  Etc.  Association has two ends  Role names (e.g. enrolls)  Multiplicity (e.g. One course can have many students)  Navigability (unidirectional, bidirectional)
  • 20. Association: Multiplicity and Roles student 1 * University Person 0..1 * employer teacher Multiplicity Role Symbol Meaning 1 One and only one Role 0..1 Zero or one “A given university groups many people; some act as students, others as teachers. M..N From M to N (natural language) A given student belongs to a single * From zero to any positive integer university; a given teacher may or may not 0..* From zero to any positive integer be working for the university at a particular 1..* From one to any positive integer time.”
  • 21. Class diagram [from UML Distilled Third Edition]
  • 22. Association: Model to Implementation * 4 Student Course has enrolls Class Student { Course enrolls[4]; } Class Course { Student have[]; }
  • 23. OO Relationships: Composition Whole Class Class W Association Models the part–whole relationship Composition Class P1 Class P2 Also models the part–whole relationship but, in addition, Every part may belong to only one whole, and If the whole is deleted, so are the Part Classes parts [From Dr.David A. Workman] Example Example: A number of different chess boards: Each square belongs to only one board. If a chess board is thrown away, all 64 squares on that board go as well. Figure 16.7 The McGraw-Hill Companies, 2005
  • 24. OO Relationships: Aggregation Container Class Aggregation: Class C expresses a relationship among instances of related classes. It is a specific kind of Container-Containee AGGREGATION relationship. Class E1 Class E2 express a more informal relationship than composition expresses. Containee Classes Aggregation is appropriate when Container and Containees have no special access privileges to each other. Example Bag Apples Milk [From Dr.David A. Workman]
  • 25. Aggregation vs. Composition Composition is really a strong form of association components have only one owner components cannot exist independent of their owner components live or die with their owner e.g. Each car has an engine that can not be shared with other cars. Aggregations may form "part of" the association, but may not be essential to it. They may also exist independent of the aggregate. e.g. Apples may exist independent of the bag.
  • 26. Good Practice: CRC Card Class Responsibility Collaborator  easy to describe how classes work by moving cards around; allows to quickly consider alternatives.
  • 27. Interaction Diagrams  show how objects interact with one another  UML supports two types of interaction diagrams  Sequence diagrams  Collaboration diagrams
  • 28. Sequence Diagram(make a phone call) Caller Phone Recipient Picks up Dial tone Dial Ring notification Ring Picks up Hello
  • 29. Sequence Diagram:Object interaction A B Self-Call: A message that an Self-Call Synchronous Object sends to itself. Condition: indicates when a Asynchronous message is sent. The message is Transmission sent only if the condition is true. delayed [condition] remove() Condition *[for each] remove() Iteration Self-Call
  • 30. Sequence Diagrams – Object Life Spans  Creation A  Create message  Object life starts at that point Create  Activation B  Symbolized by rectangular stripes  Place on the lifeline where object is activated.  Rectangle also denotes when object is deactivated. Deletion Activation bar X  Return  Placing an ‘X’ on lifeline Deletion  Object’s life ends at that point Lifeline
  • 31. Sequence Diagram User Message Catalog Reservations •Sequence diagrams demonstrate the behavior of objects in a use case by 1: look up () describing the objects and the 2: title data () messages they pass. 3: [not available] reserve title () 4 : title returned () •The horizontal dimension shows the objects participating in the interaction. 5: hold title () 5 : title available () •The vertical arrangement of 6 : borrow title () messages indicates their order. 6 : remove reservation () •The labels may contain the seq. # to indicate concurrency.
  • 32. Interaction Diagrams: Collaboration diagrams start 6: remove reservation 3 : [not available] reserve title User Reservations 5: title available 6 : borrow title 1: look up 2: title data 4 : title returned Catalog 5 : hold title Collaboration diagrams are equivalent to sequence diagrams. All the features of sequence diagrams are equally applicable to collaboration diagrams Use a sequence diagram when the transfer of information is the focus of attention Use a collaboration diagram when concentrating on the classes
  • 33. State Diagrams (Billing Example) State Diagrams show the sequences of states an object goes through during its life cycle in response to stimuli, together with its responses and actions; an abstraction of all possible behaviors. Start End Unpaid Paid Invoice created payin Invoice destroying g
  • 34. State Diagrams (Traffic light example) Traffic Light Start State Transition Red Yellow Green Event
  • 35. What UML Modeling tools we use today?  List of UML tools http://en.wikipedia.org/wiki/List_of_UML_tools  ArgoUML: http://argouml.tigris.org/  Rational Rose (www.rational.com) by IBM  UML Studio 7.1 ( http://www.pragsoft.com/) by Pragsoft Corporation: Capable of handling very large models (tens of thousands of classes). Educational License US$ 125.00; Freeware version.  TogetherSoft Control Center; TogetherSoft Solo (http:// www.borland.com/together/index.html) by Borland
  • 36. Conclusion  UML is a standardized specification language for object modeling  Several UML diagrams:  use-case diagram: a number of use cases (use case models the interaction between actors and software)  Class diagram: a model of classes showing the static relationships among them including association and generalization.  Sequence diagram: shows the way objects interact with one another as messages are passed between them. Dynamic model  State diagram: shows states, events that cause transitions between states. Another dynamic model reflecting the behavior of objects and how they react to specific event  There are several UML tools available
  • 37. Thank you Questions?