Introduction to UML by HC12071117223

VIEWS: 14 PAGES: 36

									     UML:
An Introduction
Object Oriented Analysis and Design




      Contents
            Why model ?
            Principles of modeling
            What is UML ?
            Building Blocks




      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      What is modeling
          Modeling involves :
           Representation or simplification of reality

           Providing a blueprint of a system.




      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      Why Model ?
            Better understand the system we are
             developing
            Describe the structure or behavior of the
             system
            Experiment by exploring multiple solution
            Document the design solution
            Visualize the system “as_is” and “to_be”
            Provide a template for constructing a
             system.
      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      Principles of Modeling
          Choose your model well - the choice of model
           profoundly impacts the analysis of the problem and the design of
           the solution.

          Every model may be expressed at different
           levels of precision - the same model can be scaled up (or
           down) to different granularities.

          The best models are connected to reality -
           simplify the model, but don’t hide important details.

          No single model suffices - every nontrivial system has
           different dimensions to the problem and its solution.
      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      What is UML ?
             UML - Unified Modeling language

         UML is a modeling language for visualizing,
         specifying, constructing and documenting the
         artifacts of software systems.


        Example of artifacts : requirements , architecture , design
        Source code , test cases



      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      More on UML...
       Visualizing - a picture is worth a thousand words; a
       graphical notation articulates and unambiguously
       communicates the overall view of the system (problem-domain).




      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      More on UML...
                              Specifying - UML provides the means to model
                              precisely, unambiguously and completely, the
                              system in question.




      Constructing - models built with UML
      have a “design” dimension to it; these are
      language independent and can be
      implemented in any programming language.



      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      More on UML...
                                      Documenting - every software
                                      project involves a lot of documentation -
                                      from the inception phase to the
                                      deliverables.


                                                  UML provides the
      Documentation is
                                                    notations for
      (among others) for:
                                                 documenting some
       • Requirements                             of these artifacts
       • Design
       • Tests

      CDAC (Formerly NCST)
Object Oriented Analysis and Design


    UML Building Blocks

                Elements                 Diagrams
                       Structural            Class Diagram
                       Behavioral            Object Diagram
                       Grouping              Use Case Diagram
                       Annotational          Sequence diagram
                                              Collaboration diagram
                Relationships                Statechat diagram
                   Dependency                Activity diagram
                   Association               Component diagram
                   Generalization            Deployment diagram
                   Realization


      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      Structural elements
       The nouns of UML models; usually the static
       parts of the system in question.

             Class - an abstraction of a set of elements in the problem-
              domain that have similar properties and/or functionality.
                 Notation:            customer


               Interface - a collection of operations that specify the
                services rendered by a class or component.
                 Notation:


      CDAC (Formerly NCST)
Object Oriented Analysis and Design



      Structural elements (contd.)
               Collaboration - a collection of UML building blocks
                (classes, interfaces, relationships) that work together to
                provide some functionality within the system.
                                        Accounts
                 Notation:
                                         System


               Use Case - an abstraction of a set of functions that the
                system performs; a use case is “realized” by a collaboration.

                                        Process
                 Notation:
                                         Order

      CDAC (Formerly NCST)
Object Oriented Analysis and Design



      Structural elements (contd.)
              Active Class - a class whose instance is an active object;
               an active object is an object that owns a process or thread
               (units of execution)

                 Notation:            eventManager


             Component - a physical part (typically manifests itself
              as a piece of software) of the system

                 Notation:              DML_Parser.C



      CDAC (Formerly NCST)
Object Oriented Analysis and Design



      Structural elements (contd.)
               Node - a physical element that exists at run-time and
                represents a computational resource (typically, hardware
                resources).


                                      PrintServer
                Notation:




      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      Behavioral elements

         The verbs of UML models; usually the dynamic
         parts of the system in question.

               Interaction - some behavior constituted by messages
                exchanged among objects; the exchange of messages is with a
                view to achieving some purpose.
                                      Parse
                     Notation:




      CDAC (Formerly NCST)
Object Oriented Analysis and Design



    Behavioral elements (contd.)
               State machine - a behaviour that specifies the sequence
                of “states” an object goes through, during its lifetime. A
                “state” is a condition or situation during the lifetime of an
                object during which it exhibits certain characteristics and/or
                performs some function.

                                           Engine
                         Notation:
                                            Idling




      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      Grouping elements
         The organizational part of the UML model; provides a
         higher level of abstraction (granularity).

               Package - a general-purpose element that comprises
                UML elements - structural, behavioral or even grouping
                elements. Packages are conceptual groupings of the system
                and need not necessarily be implemented as cohesive software
                modules.
                                          .


                                       Accounts
                Notation:
                                      Department



      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      Annotational elements
         The explanatory part of the UML model; adds
         information/meaning to the model elements.

               Note - a graphical notation for attaching constraints
                and/or comments to elements of the model.


                Notation:             Parses user-query and
                                      builds expression stack (or
                                      invokes ErrorHandler)




      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      Relationships
       Articulates the meaning of the links between elements.

             Dependency - a semantic relationship where a change in
              one element (the independent element) causes a change in the
              semantics of the other element (the dependent element).
                 Notation:
                          (arrow-head points to the independent element
                          )
              Association - a structural relationship that describes the
               connection between two elements.
                 Notation:

      CDAC (Formerly NCST)
Object Oriented Analysis and Design



      Relationships (contd.)
            Generalization - a relationship between a general
             element (called “parent” or “superclass”) and a more specific
             kind of that element (called the “child” or “subclass”), such
             that the latter can substitute the former.

                      Notation:
                                      (arrow-head points to the superclass)




      CDAC (Formerly NCST)
Object Oriented Analysis and Design



      Relationships (contd.)
               Realization - a semantic relationship between two
                elements wherein one specifies the behaviour to be carried
                out, and the other carries out the behaviour.
                      “ a collaboration realizes a Use Case”
                           the Use Case specifies the behaviour (functionality) to
                           be carried out (provided), and the collaboration
                           actually implements that behaviour.

                            Notation:
                               (arrow-head points to the element being realized)


      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      Diagrams
         The graphical presentation of the model. Represented
         as a connected graph - vertices (elements ) connected
         by arcs (relationships).
         UML includes nine diagrams - each capturing a
         different dimension of a software-system architecture.

               Class Diagram              Statechart Diagram
               Object Diagram             Activity Diagram
               Use Case Diagram           Component Diagram
               Sequence Diagram           Deployment Diagram
               Collaboration Diagram


      CDAC (Formerly NCST)
Object Oriented Analysis and Design




                           Rational Rose



      CDAC (Formerly NCST)
Object Oriented Analysis and Design




       What is Rational Rose?

       ROSE = Rational Object Oriented Software
        Engineering

       Rational Rose is a set of visual modeling tools
        for development of object oriented software.




       CDAC (Formerly NCST)
Object Oriented Analysis and Design




      CDAC (Formerly NCST)
Object Oriented Analysis and Design

       Parts of the Screen:
       Browser: Used to quickly navigate through the
        model.
       Documentation window: Used to view or
        update documentation of model elements.
       Toolbars: Used for quick access to commonly
        used commands.
       Diagram window: Used to display and edit
        one or more UML diagrams.
       Log: Used to view errors and report the results
        of various commands.
       CDAC (Formerly NCST)
Object Oriented Analysis and Design




      Browser
         The browser is a hierarchical structure you can
          use to easily navigate through your Rose model.
          Anything you add to the model—actors, use
          cases, classes, components, and so on—will
          display in the browser
         There are four views in the browser:
           Use Case view,

           Logical view,

           Component view

           Deployment view.
      CDAC (Formerly NCST)
Object Oriented Analysis and Design



       use case view
       It focuses what the system will do ,without worrying about
        the details of how the system will do it.
       In an object−oriented system, use cases are the system
        requirements.
       The diagrams in this view are:
       Use-case diagrams
       Sequence diagrams
       Collaboration diagrams
       Activity diagrams



       CDAC (Formerly NCST)
Object Oriented Analysis and Design




      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      logical view
        It focuses on how the system will implement the
         behavior in the use cases.
        It includes the specific classes that will be
         needed, the Class diagrams, and the State
         chart diagrams.
        you can identify classes and packages that can
         be reused by grouping classes together.
        Once you've identified the classes and
         diagrammed them, you can move on to the
         Component view
      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      logical view
          The diagrams in this view are:
               Class diagrams
               State chart




      CDAC (Formerly NCST)
Object Oriented Analysis and Design




      CDAC (Formerly NCST)
Object Oriented Analysis and Design




       component view
       A component is a physical module of code (code libraries,
        executable files, run−time libraries) .

       It allows you to see the relationships between the modules
        of code.

       Developers will use the it to see what code libraries have
        been created and which classes are contained in each code
        library.



       CDAC (Formerly NCST)
Object Oriented Analysis and Design




      CDAC (Formerly NCST)
Object Oriented Analysis and Design



    deployment view
   It concerned with the physical deployment of the
    system.
   It shows the processes and devices on the
    network and the physical connections between
    them.
   it shows which processes run on which machines.
   the primary users will be the staff responsible for
    distributing the application.
   This view contains only one diagram –the
    deployment diagram.
      CDAC (Formerly NCST)

								
To top