SlideShare a Scribd company logo
1 of 129
Object Oriented Analysis and
    Design Using UML




                               1
Course description:

 OBJECTIVE:
 The understand the Unified Modeling Language and orient towards
 Object Oriented methodology using UML for modeling software
 systems.
 TARGET AUDIENCE:
 In particular, it is intended for software professionals who have sound
 knowledge of object concepts and some experience towards analysis
 and design.
 PREREQUISITES:
 Good understanding of object concepts.
 Sound knowledge of any object oriented language.
 Knowledge of software engineering process.
                                                                           2
Course description:

 TABLE OF CONTENTS:
 Module1   Introduction
 Module2   Use case diagram
 Module3   Flow of events
 Module 4  Realization of the class diagram
                       Sequence diagram and Collaboration Diagram
 Module5      Class diagram and refinement attributes
 Module6      State transition and activity diagram
 Module7      Implementation diagram
              Component diagram and Deployment diagram
 Module8    Understanding project culture
 Appendix-A
                                                                    3
Module-1



           4
Importance of modeling
 What is a model?
 – A model is a simplification of reality
 Why do we model?
 –   help visualizing
 –   permit specification
 –   provides a template
 –   document decisions

                                            5
4 Principles of Modeling
 Choose your models well
 Every model may be expressed at various
 levels of precision
 The best models are connected to reality
 No single model is sufficient



                                            6
What is Software Engineering?
 DEFINITION:The application of systematic, disciplined and
 qualifiable approach to the development, operation and maintenance
 of a software system is software engineering.
 Software development life cycle has following stages:
  REQUIREMENT



                 ANALYSIS


                                 DESIGN


                                            IMPLEMENTATION




                                                         TESTING      7
Effort Distribution for each stage:
 Analysis & design     40 %
 Development           20 %
 Testing               40 %

 Analysis - What is to be done ?
 Design - How it is to be done ?

 Two Popular methodology approaches are:

 Structured Analysis & Design
 Object Oriented Analysis & Design-OO model


                                              8
Major benefits of OOAD:
    The object oriented approach is a way of thinking about a problem using
    real world concepts instead using adhoc function concepts.

    We intent to learn OOAD approach for the following reason:
  –Promotes better understanding of user requirements
  –Leads cleaner design
  –Design flexibility'
  –Decomposition of the system is consistent
  –Facilitates data abstraction & information hiding
  –Software reuse
  –Easy maintenance
  –Implementation flexibility



                                                                              9
Elements of OO Methodology:
Following are three elements for every OO methodology:


   Notation
   Process / Method
   Tool




                                                         10
What is Notation?

  Notation:
       It is collection of graphical symbols for expressing model of the
       system.
       The Unified Modeling Language [UML] provides a very robust
  set
       of notation which grows from analysis to design.
       This brings end of the method wars as far as notation is concerned
       with adoption of the language [UML]

  By unifying the notations used by these object oriented methods, the
  unified modeling language provides the basis for a de facto standard in
  the domain of object oriented analysis and design founded on a wide
                                                                     11
  base of user experience
What is UML?
 It is a Unified Modeling Language, which is mainly a collection of
 graphical notation that methods use to express the designs.
 The UML is language for visualizing, specifying, constructing and
 documenting the artifacts of software system.
 UML is visual modeling language for modeling systems and is non
 proprietary
 UML is not a radical departure from Booch, OMT, OOSE notations
 but rather legitimate successor to all three.
 It is an evolutionary step, which is more expressive and more uniform
 than individual notations.
 Whitehead says
 “ By relieving the brain of unnecessary work, a good notation, sets it
 free to concentrate on more advance and creative problems “ UML is
 not a method or process but is the means to express the same.
                                                                      12
Where can you use the UML?

 System of several different kinds, absolutely anywhere everywhere.
 Primarily for software intensive systems like:

               Systems software
               Business processes




                                                                      13
The Evolution of the UML:
                         OMG vote’97
Public Feedback          Submission to OMG, sept’97   UML1.1

                      Submission of OMG group UML1.0

                  Beta version OOPSLA’96


                               UML0.9

                         Unified Method 0.8


     Other method      Booch    OMT                   OOSE
                                                               14
Advantages of UML:

 Captures business processes

 Enhance communication and ensures the right communication

 Capability to capture the logical software architecture independent of
 the implementation language

 Manages the complexity

 Enables reuse of design



                                                                          15
UML refers to:

 UML things:
 Class, component, node, relationship, package etc..

 UML diagrams:
 Use case diagram, interaction diagram, class diagram, State
 diagram,deployment diagram




                                                               16
What is Process?
 What is Process?

 It is an extensive set of guidelines that address the technical and
 organizational aspects of software development focusing on
 requirements, analysis and design.

 Process basically encapsulates the activities leading to the orderly
 construction of system model.

 OO model supports the iterative and incremental model for the
 process.



                                                                        17
More about Process?
 Guidance as to the order of team’s activities
 It specifies what artifacts should be developed
 It directs the task of individual developers and team as a whole
 It offers criteria for monitoring and measuring project activities
 The selection of particular process will vary greatly depending upon
 things like problem domain, implementation technology and skills of
 team
 Booch,OMT,OOSE and many other methods have well defined
 process and UML supports almost all methods
 There has been some convergence on development process practices
 but there is no consensus for standardization.
 Framework for the every stage of software development life cycle.


                                                                        18
Best Practices followed by Rational Unified Process

  Develop software iteratively
  Manage requirements
  Use component based architectures
  Visually model software
  Verify S/W quality
  Control changes to software.




                                                      19
What is a tool?
 It is automated support for every stage of software development
 life cycle.

 Since we are concentrating on requirement, analysis and design phase,
 following are the names of few tools which are greatly in use:

               1. Rational Rose
               2. Cayenne
               3. Platinum
               4. Select



                                                                    20
Why Tool?

 Helps designer for creating designs much more quickly.
 Supports validations like:
      Consistency checking
      Completeness checking
      Constrain checking.
 Time required for certain operation could be predicted .
 Code generation
 Reverse engineering.
 Round trip engineering
 Conversion from SSAD to OOAD
 Quick documentation…etc

                                                            21
Triangle for Success:

 All three components play equally important role towards the success
 of the project.

                             Notation




             Tool
                                           Method



                                                                    22
Objective of the first module:

 Get introduced with Unified Modeling Language and know the basic
 components of software development life cycle.




                                                                23
Module-2



           24
OO model:

            DYNAMIC MODEL


         STATIC MODEL


     LOGICAL MODEL




     PHYSICAL MODEL




    The models of Object Oriented Development



                                                25
Models and Views:

 4+1 view of OO model.
  – Process view
  – Deployment view
  – Logical view
  – Dynamic view
         +
  – Use case view


 As shown in the model , for each dimension we define a number of
 diagrams that denote a view of the system’s model.
 The use case view is central since its contents drive the developments
 of other views.

                                                                      26
UML diagrams:

1. Use case diagram
2. Class Diagram
3. Behavioral diagrams
    - State chart diagrams
    - Object diagram
    - Activity diagrams
    - Interaction diagrams
         - Sequence diagrams
         - Collaboration diagrams
4. Implementation diagrams
   - Component diagram
   - Deployment diagram
                                    27
Semantics of Diagrams:

· Use case diagrams represent the functions of a system from the user’s
    point of view.
·   Sequence diagrams are a temporal representation of objects and their
    interactions.
·   Collaboration diagrams are a spatial representation of objects, links,
    and interactions.
·   Object diagrams represent objects and their relationships, and
    correspond to simplified collaboration diagrams that do not represent
    message broadcasts.
·   Class diagrams represent the static structure in terms of classes and
    relationships.


                                                                             28
Semantics of Diagrams:
Contd...
· State chart diagrams represent the behavior of a class in terms of states
· Activity diagrams are to represent the parallel behavior of an operation
  as a set of actions.
· Component diagrams represent the logical components of an
  application.
· Deployment diagrams represent the deployment of components on
  particular pieces of hardware.




                                                                         29
What is USE CASE diagram?

 A use case diagram establish the capability of the system as a whole.

 Components of use case diagram:
     Actor
     Use case
     System boundary
     Relationship
     Actor relationship

 Semantic of the components is followed.


                                                                         30
ACTOR:

 What is an actor?

 An actor is some one or something that must interact with the system
 under development
 UML notation for actor is stickman, shown below.




    Customer                    Manager                Cashier
                                                                        31
ACTOR:

 More about an actor:

 It is role a user plays with respect to system.
 Actors are not part of the system they represent anyone or
 anything that must interact with the system.
 Actors carry out use cases and a single actor may perform more
 than one use cases.
 Actors are determined by observing the direct uses of the
 system,




                                                             32
ACTOR:

 Contd…

 Those are responsible for its use and maintain as well as other systems
 that interact with the developed system.

 An actor may
    - input information to the system.
    - receive information from the system.
    - input to and out from the system.




                                                                      33
ACTOR:

 How do we find the actor?

 Ask following questions to find the actors:
  –   Who uses the system?
  –   Who installs the system?
  –   Who Starts up the system?
  –   What other systems use this system?
  –   Who gets the information from the system?
  –   Who provides information to the system?


 Actor is always external to the system. They are never part of the
 system to be developed.
                                                                      34
ACTOR:

4-Categories of an actor:

   Principle     : Who uses the main system functions.
   Secondary     : Who takes care of administration & maintenance.
   External h/w : The h/w devices which are part of application
                   domain and must be used.
   Other system: The other system with which the system must
                   interact.



                                                                     35
ACTOR:

 Note:

 If newly identified actor is using a system in a same way like an
 existing actor, then new actor can be dropped.
 If two actors use system in the same way they are same actors.




                                                                 36
USE CASE:

 What is USE case?
 A use case is a pattern of behavior, the system exhibits
 Each use case is a sequence of related transactions performed by an
 actor and the system in dialogue.
 USE CASE is dialogue between an actor and the system.
 Examples:




    Open new account                   Withdrawal of cash
                                         from ATM
                                                                       37
USE CASE:

 More about USE CASE:

 It is a snapshot of one aspect of system.
 They model a dialog between actor and system.
 A use case typically represents a major piece of functionality
 that is complete from beginning to end.
 Most of the use cases are generated in initial phase, but you
 find some more as you proceed.
 A use case may be small or large. It captures a broad view of a
 primary functionality of the system in a manner that can be
 easily grasped by non technical user.


                                                               38
USE CASE:

 Contd…

 A use case must deliver something of value to an actor.
 The use cases may be decomposed into other use cases.
 Use cases also present a good vehicle for project planning.




                                                               39
USE CASE:

 How do we find the use cases?

 What functions will the actor want from the system?
 Does the system store information? What actors will create, read,
 update. Or delete that information?
 Does the system need to notify an actor about changes in its internal
 state?




                                                                         40
USE CASE:

 Generic format for documenting the use case:
  - Pre condition:      If any
  – Use case :          Name of the case.
  – Actors   :          List of actors(external agents), indicating who
                        initiates the use case.
  –   Purpose :         Intention of the use case.
  –   Overview :        Description.
  –   Type      :       primary / secondary.
  –   Post condition:   If any
 Typical Course of Events:
 ACTOR ACTION       : Numbered actions of the actor.
 SYSTEM RESPONSE : Numbered description of system responses.
                                                                          41
USE CASE:

 USE CASE documentation example:
 The following use case describes the process of opening a new
 account in the bank.
      Use case          :Open new account
      Actors            :Customer, Cashier, Manager
      Purpose           :Like to have new saving account.
      Description       :A customer arrives in the bank to open the new
                          account. Customer requests for the new account
                          form, fill the same and submits, along with the
                          minimal deposit. At the end of complete successful
                          process customer receives the passbook.
      Type               :Primary use case.

                                                                               42
Grouping USE CASES:

 Those use case functionality which are directly dependent on the
 system environment are placed in interface objects
 Those functionality dealing with storage and handling of information
 are placed in entity objects
 Functionality's specific to one or few use cases and not naturally
 placed in any of the other objects are placed in control objects

 By performing this division we obtain a structure which helps us to
 understand the system from logical view




                                                                        43
OOAD --- USE CASE driven

        Analysis               Design &
                             Implementation                  Test




                          Use cases make up the glue




                               Implement               Verify that use cases
     Capture,clarify            use cases                  are satisfied
   & validate use cases




                                                                               44
SYSTEM BOUNDARY:

 What is System Boundary?

 It is shown as a rectangle.
 It helps to identify what is external verses internal, and what the
 responsibilities of the system are.
 The external environment is represented only by actors.




                                                                   45
RELATIONSHIP:

What is Relationship?

   Relationship between use case and actor.
         Communicates
   Relationship between two use cases
         Extends
         Uses
   Notation used to show the relationships:

        <<       >>

                                              46
RELATIONSHIP:

 Relationship between use case and actor is often referred as
 “communicates” .
 Relationship between two use cases is refereed as either uses
 or extends.

 USES:
 - Multiple use cases share a piece of same functionality.
 - This functionality is placed in a separate use case rather than
   documenting in every use case that needs it.


                                                                     47
RELATIONSHIP:

 Contd...
 A uses relationship shows behavior that is common to one or
  more use cases.

 EXTENDS:
 It is used to show optional behavior, which is required only
   under certain condition.




                                                                48
USE CASE diagram:
            Use case diagram for the shown functionality.


                                       Balance status
                                           report
                            extends




           Withdraw cash
Clerk
                                                            Customer
                              uses




                                      Validation

                                                              ATM
 Manager
                                                                    49
Objective of the second module

 To understand and capture the detailed specification of a system to be
 developed, from user perspective.




                                                                      50
Module-3



           51
Beginning Analysis and Design

 Completion of first version of use case diagram initiates the processes
 of analysis and design.
 UML provides the framework to carry out the process of analysis and
 design in form of set of diagrams.
 Every diagram and notation used in the diagram carries the semantics.
 First step towards analysis and design is to specify the flow of events.




                                                                       52
Flow of Events:
 A flow of events document is created for each use case.
 Details about what the system must provide to the actor when the use
 is executed.
 Typical contents
  – How the use case starts and ends
  – Normal flow of events
  – Alternate flow of events
  – Exceptional flow of events
 Typical Course of Events has:
       Actor Action(AA)
       System Response(SR)


                                                                        53
Normal Flow of Events:

 For withdrawal of cash:
 1.(SR) The ATM asks the user to insert a card.
 2.(AA) The user inserts a cash card.
 3.(SR) The ATM accepts the card and reads its serial number.
 4.(SR) The ATM requests the password.
 5.(AA) The user enters 1234.
 6.(SR) The ATM verifies the serial number and password with the
 bank and gets the notification accordingly.
 7.(SA)The ATM asks the user to select the kind of transaction.
 8.(AA)User selects the withdrawal.


                                                                   54
Normal Flow of Events:

 Contd...
 9.(SR)The ATM asks for the amount of cash; user enters Rs. 2500/-
 10.(SR)The ATM verifies that the amount of cash is within predefined
 policy limits and asks the bank, to process the transaction which
 eventually confirms success and returns the new account balance.
 11.(SR) The ATM dispenses cash and asks the user to take it.
 12.(AA) The user takes the cash.
 13.(SR) The ATM asks whether the user wants to continue.
 14.(AA) The user indicates no.




                                                                   55
Normal Flow of Events:

 Contd...
 15.(SR) The ATM prints a receipt, ejects the card and asks the user to
 take them
 16.(AA) The user takes the receipt and the card.
 17.(SR) The ATM asks a user to insert a card.




                                                                      56
Alternative Flow of Events:

 For withdrawal of cash use case:
 9. The ATM asks for the amount of cash; the user has change of mind
 and hits the “cancel”.




                                                                   57
Exceptional Flow of Events:

 For withdrawal of cash use case:
 3 Suspicious pattern of usage on the card.
 10 The machine is out of cash.
 11 Money gets stuck in the machine.




                                              58
Why flow of events?

 It helps in understanding the functionality of a system to be developed.
 Flow of events helps in finding objects of the system to be developed.
 Happens to be most important and very first step towards analysis and
 design.




                                                                       59
What is Scenario?

 The functionality of the use case is captured in flow of the
 events.
 A scenarios is one path through the flow of events for the use
 case.
 Scenarios are developed to help identify objects, classes and
 object interactions for that use case.




                                                                  60
Objective of the third module

 To understand the flow of each functionality and find out the objects
 and methods required to build the system.




                                                                         61
Module-4



           62
USE CASE Realizations:

 The use case diagram presents an outside view of the system
 Interaction diagrams describe how use cases are realized as
 interactions among societies of objects.
 Two types of interaction diagrams
  – Sequence diagrams
  – Collaboration diagrams




                                                               63
What is Interaction diagram?

 Interaction diagrams are models that describe how groups of objects
 collaborate in some behavior
  There are 2 kinds of interaction diagrams
  • Sequence diagram
  • Collaboration diagram
 Sequence diagrams are a temporal representation of objects and their
 interactions
 Collaboration diagrams are spatial representation of objects, links and
 interrelations




                                                                       64
What is sequence diagram?

 Typically these diagrams capture behaviors of the single
 scenario.
 Shows object interaction arranged in time sequence.
 They show sequence of messages among the objects.
 It has two dimensions, vertical represents time & horizontal
  represents objects.
 Components of sequence diagram:
 -objects
 -object lifeline
 -Message
 -pre/post conditions.


                                                                65
OBJECT & OBJECT LIFE LINE:

  Object are represented by rectangles and name of the objects are
 underlined.
  Object life line are denoted as dashed lines. They are used to
  model the existence of objects over time.
                       Name:Class




                                                                     66
MESSAGES:

 They are used to model the content of communication between
 objects. They are used to convey information between objects and
 enable objects to request services of other objects.

 The message instance has a sender, receiver, and possibly other
 information according to the characteristics of the request.

 Messages are denoted as labeled horizontal arrows between life lines.

 The sender will send the message and receiver will receive the
 message.
                                                                     67
MESSAGES:

 Contd…
 May have square brackets containing a guard conditions. This is a
 Boolean condition that must be satisfied to enable the message to be
 sent.
 May have have an asterisk followed by square brackets containing an
 iteration specification. This specifies the number of times the message
 is sent.
 May have return list consisting of a comma -separated list of names
 that designate the values of returned by the operation.
 Must have a name or identifier string that represents the message.
 May have parentheses containing an argument list consisting of a
 comma separated list of actual parameters passed to a method.

                                                                       68
Sequence diagram                             [for withdrawal of cash, normal flow]



:Customer    Insert card
                                :ATM                                       :Bank
        Request password
        Enter the password
                                           Verify account
                                            Account o.k.
            Request option
             Enter option              Create

            Request amount
                                       Transaction
                                                     :Transaction
            Enter the amount
                                          Update transaction
                                          Transaction commit
                                           Transaction
              Dispense cash                complete
            Request take cash
              Take cash
            Request continuation

               Terminate
        Print receipt ,eject card
         Request take card
             Take card                                                                69
        Display main screen and prompt for the card.
What is Collaboration diagram?

 Collaboration diagrams illustrate the interaction between the objects,
 using static spatial structure.
 Unlike sequence diagram the time is not explicitly represented in these
 diagrams
 In collaboration diagram the sequence of messages is indicated by
 numbering the messages. The UML uses the decimal numbering
 scheme.
 In these diagrams, an actor can be displayed in order to represent the
 triggering of interaction by an element external to the system.
  This helps in representing the interaction, without going into the
 details of user interface.


                                                                      70
Components of collaboration diagram:

 Named objects
 Links: Links are represented by a continuous line between objects, and
 indicates the exchange of messages.
 Messages has following attributes:
      • Synchronization --thread name, step within thread.
      • Sequence number
      • Message labels : The name of the message often corresponds to an operation
        defined in the class of the object that is the destination of the message.
        Message names may have the arguments and return values.
      • *[iteration].
      • It uses decimal notation.
      • Message direction.



                                                                                     71
Semantics of components:

 Object names identify which objects are participating and the links
 show which objects collaborate
 A link between two objects must exist for one object to send message
 to another and vice a versa.
 Messages in the collaboration diagram get transformed to more
 detailed signature.
 They use the decimal notation system for numbering the messages.
 The direction of the message defines the sender and receiver of
 the message



                                                                    72
The elements of message:

 Predecessor
 Role names
 Message qualifiers
  –   Iteration expression
  –   Parameters
  –   Return values
  –   Guard
  –   Message stereotypes
 Concurrent thread sequencing
 Thread dependencies
 Message expression
 [Pre] A1:*(expression):doIt(p,r):return value

                                                 73
The examples of message:
         4:Display(x,y)                     Simple
                                            message
         3.3.1:Display(x,y)                 Nested
                                            message
         4.2:subtract[Today,Birthday]:age   Nested
                                            message with
                                            return value
         [Age >=18] 6.2:Vote()              Conditional
                                            message
         4.a,b.6/c.1:Turnon(Lamp)           Synchro. with
                                            other flow of
                                            execution
         1*:wash()                          Iteration

         3.a,3.b/4*||[i:=1..n]:Turnoff()    Parallel
                                            iteration




                                                            74
Collaboration diagram [for withdrawal of cash, normal flow.]
                       1. Insert card
                       Enter password, Enter kind
                       Enter amount,
                       Take cash, Take card
                       cancel,Terminate, Continue                     Create Transaction
                                                                      Transaction complete
 CUST-                                                                                  TRANSA-
 OMER      Display main screen
           unreadable card message,
                                                     ATM                                CTION
           request password,
           request kind, request amount,
           canceled message, eject card, failure message,
           dispense cash, request take cash
                                                                  Transaction succeed
           request continuation,
                                                                  Transaction failed
           print receipt, request take card
                                                                  account o.k.
           bad account message,             Verify account,       bad account,
           bad bank account message         process transaction   bad password,
                                                                  bad bank code

                                                    BANK
                                                                                                  75
Objective of the fifth module

 To know the interaction among the objects in temporal and spatial
 form.
 To know how objects collaborate among each other and hence
 delegate the responsibility to the respective objects.
 To understand how the messages get matured with more information.




                                                                 76
Module-5



           77
What is Class diagram?
 A class diagram shows the existence of classes and their relationships
 in the logical view of a system

 UML modeling elements in class diagrams are:
  – Classes, their structure and behavior.
  – relationships components among the classes like association,
    aggregation, composition, dependency and inheritance
  – Multiplicity and navigation indicators
  – Role names or labels.




                                                                      78
Major Types of classes:

Concrete classes
  A concrete class is a class that is instantiable; that is it can have
  different instances.
  Only concrete classes may be leaf classes in the inheritance tree.
Abstract classes
  An abstract class is a class that has no direct instance but whose
  descendants classes have direct instances.
  An abstract class can define the protocol for an operation without
  supplying a corresponding method we call this as an abstract
  operation.
  An abstract operation defines the form of operation, for which each
  concrete subclass should provide its own implementation.
                                                                          79
RELATIONSHIP:

 Association
 Aggregation
 Composition
 Inheritance
 Dependency
 Instantiation




                 80
ASSOCIATION:

 These are the most general type of relationship:
 It denotes a semantic connection between two classes
  It shows BI directional connection between two classes
 It is a weak coupling as associated classes remain somewhat
 independent of each other
 Example:


 CUSTOMER
                                       ATM system




                                                               81
AGGREGATION:

 This is a special type of association
 The association with label “contains” or “is part of” is an
 aggregation
  It represents “has a “ relationship
 It is used when one object logically or physically contains other
  The container is called as aggregate
 It has a diamond at its end
 The components of aggregate can be shared with others
 It expresses a whole - part relationships


                                                                     82
AGGREGATION:
Example:




     Customer   ATM card




                           83
COMPOSITION:

 This is a strong form of aggregation
 It expresses the stronger coupling between the classes
 The owner is explicitly responsible for creation and deletion of
 the part
 Any deletion of whole is considered to cascade its part
  The aggregate has a filled diamond at its end



        Window                              Client Area


                                                                    84
INHERITANCE:

 The inheritance relationship helps in managing the complexity by
 ordering objects within trees of classes with increasing levels of
 abstraction. Notation used is solid line with arrowhead,shown below.
 Generalization and specialization are points of view that are based on
 inheritance hierarchies.
                            Account




                    CurrentAccount   SavingAccount




                                                                      85
DEPENDENCY:

 Dependency is semantic connection between dependent and
 independent model elements.
 This association is unidirectional and is shown with dotted
 arrowhead line.
 In the following example it shows the dependency relationship
 between client and server.
 The client avails services provided by server so it should have
 semantic knowledge of server.
 The server need not know about client.


           Client                      Server
                                                                   86
INSTANTIATION

 This relationship is defined between parameterized class and
 actual class.
 Parameterized class is also referred as generic class.
 A parameterized class can’t have instances unless we first
 instantiated it
 Example:
                               Element
                           Queue



                 Queue<int>


                                                                87
What is Cardinality? :

 Definition: Number of instances of each class involved in the
 dialogue is specified by cardinality.
 Common multiplicity values:
 Symbol                  Meaning
 1                       One and only one
 0..1                    Zero or one
 M…N                     From M to N (natural integer)
 0..*                    From zero to any positive integer
 1..*                    From one to any positive integer

 Also thought can be given about navigability to every applicable
 relationship.
                                                                    88
Reaching the class diagram:

 In collaboration diagram we have shown the objects, their interaction
 and detailed message signature.
 This information is carried forward to the class diagram.
 At this point,we group the similar objects and form classes.
 Messages get mapped to responsibilities for respective classes.
 Find the attributes for every class.
 Transform the links to appropriate relationships.
 Relationship is further refined with respect to multiplicity and
 navigability.

 This complete procedure brings the minimal class diagram [for withdraw cash
 use case, normal flow.]


                                                                          89
Class diagram [for withdrawal of cash, normal flow]


                                          Customer
                                      1
                                              1..*


                                       1..*

                                    ATMSystem
                             0..*
               Transaction                     1
                                                     1
                         1..*                            Bank[Branch]
                                                     1




                                                                        90
What more to the Class Diagram?

 Till this slide we have worked out the essentials of class diagram for
 withdrawal of cash use case, normal flow of events.
 Similar exercise required to be carried out for every scenario and
 clubbed all in the class diagram.
 At this point, we refine this integrated class diagram to add further fine
 details. Approximate sketch for this class diagram has been shown at
 the end of this module.
 Refinement attributes should be updated right from sequence diagram
 to class diagram.
 Next few slides will take into the discussion of refinement attributes.
 This process of iterative and incremental development will continue
 till there is no change in two consecutive iteration.

                                                                         91
OOAD---Iterative & Incremental Approach

                      Identify objects


Validate Classes                             Identify Messages
& Objects

                                               Group Objects
Group classes                                  into classes
into domains

                                         Identify & classify
     Identify class                      Class relationships   92
     behavior
Refinement attributes:

 Stereotypes:

 Stereotypes are part of the range of extensibility mechanism provided
 by UML

 It permits user to add new model element classes on top of the kernel
 predefined by UML




                                                                         93
Refinement attributes:
 Contd…
 Constraints:
 Constraints are functional relationship between the entities and object
 model. The entities include objects, classes, attributes, association,
 links.
 A constraint restricts the values that entities can assume.
 UML doesn't specify a particular syntax for constraints, other than
 they should appear between braces, so they may therefore be
 expressed using natural language, pseudo code, navigation expression
 or mathematical expression
 UML1.2 does prefer the use of a constraint language OCL i.e. Object
 Constraint Language, which is subset of UML.
                                                                       94
Refinement attributes:
  Example:Constraints
 Number of withdrawal transaction should be less than five per day.
                                        Constraint on the same class.
    Transaction

 {No. of transaction <=5 /day}
No window will have an aspect ratio i.e. (length/width) of less than 0.8 or > 1.5


      Window                            A constraint between the
    length/width                        properties of the same object


  {0.8<=length/width <= 1.5}
                                                                                    95
Refinement attributes:

 Qualifier:
 UML provides a role of constraint notation to indicate different kind
 of collections that may be inherent in the analysis model

 Common role constraints for multi valued roles include
 {ordered}     Collection is maintained in sorted manner
 {bag}         Collection may have multiple copies of same item.
 {set}         Collection may have at most one copy of given item.


 Some constraints may be combined such as:           {ordered set}



                                                                         96
Refinement attributes:
 Qualifier:
 Another common design scheme is to use a key value to retrieve an
 item from the collection. This is called as qualified association and the
 key value as qualifier.
 A qualified association is the UML equivalent of a programming
 concept variously known as associative arrays, maps,dictionaries
 A qualified association relates two object classes and a qualifier
 The qualifier is a special attribute that reduced the effective
 multiplicity of an association.
 One to many and many to many association may be qualified.



                                                                        97
Refinement attributes:

 Check for many to many relationship, if any, normalize with qualifier
 or association class.
 Check for the scope forming abstract classes and template classes.
 Check for helper functions.
 Thought can be given for using the design patterns.




                                                                     98
Objective of the fifth module:

 Learn to build the architecture, which contains the entire information
 of the system to be developed.
 It is this architecture which is called as BLUE PRINT is handed over
 for coding.




                                                                          99
Refined Class diagram                                            [for withdrawal of cash]




Few more relationship can be further added to the shown diagram:
                     Area        ATMSystem               BatchJob



                 1..*                                          Cash
                                 BankComputer
                        1
              Bank[Branch]
                                                                       <<abstract>>
                                                                      AccountAccessor
                 1          1                <<abstract>>
                                               person
                      Transaction
                                                            CashierStation
                                1..*
                                         1                                      ATMScreen
                                Slips         Customer BankAssociates
                1..*
                                                     1
             <<abstract>>                                              TellerScreen
               Account
                        1                              0..1
                                                    BankCard    NoteHelpForBankCard
                                                1
          CurrentAccount SavingAccount




                                                                                            100
Module-6



           101
What is state transition diagram?

 A state transition diagram shows the states of a single object, the
 events or the messages that cause a transition from one state to another
  and the action that result from a state change.
 A state transition diagram will not be created for every class in the
 system.
 Components of State Diagram:
  – Start State
  – Stop state
  – State Transition




                                                                      102
Semantics of every components:
 State: A state is a condition during the life of an object when it
 satisfies some condition, performs some action, or waits for an event.
 The UML notation for a state is a rectangle with rounded corners.

 Special states:There are two special states.
  Start state: Each state diagram must have one and only one start
  state. Notation for start state is “filled solid circle”.
  Stop State: An object can have multiple stop states. Notation for stop
  state is bull’s eye.




                                                                      103
Semantics of every components:

 Contd...
 State transition: A state transition represents a change from an
 originating to a successor state.
 Transition label: event name[guard condition] / action




                                                                    104
State Transition Diagram [for Account class. ]


        request and fill the form for new saving account[ validate ] / process


                                  Open

                                     transaction request[ validate ] / update()

            transactionStrart / Transfer_to_main_ledger ()        Operational

                        Dormant
                                  no transaction / Transfer_to_Dormant_Ledger

                                 fill_the_request_form/update(          Fraud or authorized instruction[Validate]
                                                )                                     / lockAccount()
                                                  matter_resolved[ validate ] / unlockAccount()

                                    close
                                                                                    seized
                                                 fill_the_request_form / update()

                                                              Note:Account can be closed from open state as well

                                                                                                          105
More about State Diagram:
 A state diagram will not be created for every class.
 state diagrams are used only for those classes that exhibit interesting
 behavior.
 State diagrams are also useful to investigate the behavior of user
 interface and control classes.
 State diagram are used to show dynamics of a individual class




                                                                           106
What is activity diagram?

 It is a special kind of state diagram and is worked out at use case level.
 These are mainly targeted towards representing internal behavior of a
 a use case.
 These may be thought as a kind of flowchart.
 Flowcharts are normally limited to sequential process; activity
 diagrams can handle parallel process.
 Activity diagrams are recommended in the following situations:
             s Analyzing use case
             s Dealing with multithreaded application
             t    Understanding workflow across many use cases.


                                                                        107
Consistency Checking


 Consistency checking is the process of ensuring that,
 information in both static view of the system(class diagram)
 and the dynamic view of the system(sequence and
 collaboration diagram) is telling the same story.




                                                                108
Objective of the sixth module

 Understand the dynamic behavior of a class

 Way to find the parallel processes at use case level.




                                                         109
Module-7



           110
What is component diagram?

COMPONENT DIAGRAM:

    Component diagrams illustrate the organizations and dependencies
    among software components.

    A component may be
     • A source code component
     • A run time components
     • An executable component
     • Dependency relationship.



                                                                 111
Component Diagram                       [for withdrawal of cash]




            policy.dll

                                                   Bank
                                                   Server.exe
                                 Branch
        customer.dll             Bank.dll




                                   Branch
                                   Bank.exe


                       ATM.exe




                                                                   112
What is deployment diagram?

 A deployment diagram shows the relationship among software and
 hardware components in the delivered system.
 These diagram include nodes and connections between nodes.
 Each node in deployment diagram represents some kind of
 computational unit, in most cases a piece of hardware.
 Connection among nodes show the communication path over which
 the system will interact.
 The connections may represent direct hardware coupling line RS-232
 cable, Ethernet connection, they also may represent indirect coupling
 such as satellite to ground communication.



                                                                    113
Deployment diagram

                 Branch
                 Bank_
                  Bank.exe

                             Ethernet
           Ethernet


                                        Bank_
      ATM_                              server
     machine
                                        BankServer.exe
       ATM.exe




                                                         114
Objective of the seventh module:

 To understand the organization of software modules and their
 deployment on the respective hardware.




                                                                115
Module-8



           116
Understanding the project culture


It may be:
1.Calendar Centric
2.Requirement Centric
3.Documentation Centric
4.Quality Centric
5.Architecture Centric




                                    117
Understanding the project’s culture

 Architecture driven projects represent the most mature style of
 development.

  These projects are characterized by a focus on creating a frame
 work that satisfies all known requirement, yet is resilient enough to
 adapt to those requirements, that are not yet known or well
 understood.

 In every sense of the word, architect-driven policies are in
 evolutionary step beyond requirement driven policies.

 Architecture driven style of development is usually the best
 approach for the creation of most complex software intensive
                                                                         118
 systems
Understanding the project’s culture
Architecture driven style of development typically observe the
following process:

1. Specify the system’s desired behavior through a collection of
   scenarios. (Analysis)
2. Create, then validate, an architecture. (Design)
3. Evolve that architecture, making mid-course corrections as
   necessary to adopt to new requirements as they are uncovered.




                                                                   119
OOAD---Architecture Centric

What exactly is nature of the well structured object oriented
architecture??

 1. A set of classes, typically organized into multiple hierarchies.
 2. A set of collaboration that specify how those classes co-operate
    to provide various system function.




                                                                       120
ESSENCE OF OOAD AND UML



 Use case driven
 Architecture centric
 Incremental and iterative approach.




                                       121
Desire for good Architecture


  Those of us who have been trained as architects have this desire
  perhaps at the very center of our lives,that one day, some where
  somehow, we shall build one building which is wonderful, beautiful,
  breathtaking, a place where people can walk and dream for
  centuries.
                                  CHRISTOPHER ALEXANDER

  Same desire should also be applicable in creating software architecture as
  well.



                                                                               122
Appendix-A



             123
Strong recommendation


  Object Technology
   – David A. Taylor
  Object Oriented Analysis and design with Applications
   – Grady Booch
  UML distilled
   –Martin Fowler
  Instant UML
   – Pierre - Alain Muller
  Software Engineering
   – Roger S Pressman


                                                          124
REFERENCES

Contd...
  Object Oriented Modeling and Design
 – James Rumbaugh
  Object Oriented Software Engineering
 – Ivar Jacobson
  Clouds to code
 – Jesse Liberty
   Applying use cases
 – Geri Schneider
 –Jason p. Winters
 UML Toolkit
 – Hans-Eriksson and Magnus Penker       Version1.1

                                                 125
THANK-U!



           126
Course description:

 SESSION BREAKUP:
 The course will be offered in series of fourteen hours theory session.
 One demonstration session on the tool like Rational Rose can be
 accompanied.The following is the suggested agenda for the course.
 Session                Duration
 Module-1,2             2-hours demonstration lecture
 Module-3               2-hours
 Module-4               2-hours
 Module-5               4-hours
 Module-6               2-hours
 Module-7,8             2-hours
 Demonstration          2-hours
                                                                      127
Course description:

 REFERENCE AND READING MATERIALS:
 Refer to Appendix-A

 EXERCISE AND HANDS ON:
 One case study should be given to the group of four members.

 TEST:
 Case study given for exercise can be evaluated as part of the test.




                                                                       128
Course description:

 INSTRUCTION TO THE FACULTY:
 Course should emphasize on OO modeling.
 Focus should be primarily on understanding UML[1.2] and UML
 diagrams and then applying to a problem.

 Several excellent references are given in Appendix-A. Following are
 strongly recommended reading and should be used as supplementary
 with this power point courseware.
 1.UML toolkit by Eriksson and Magnus Penker
 2.Object oriented analysis and design with applications by Grady Booch

 Note: UML toolkit should be refereed for UML notations,their syntax and semantics.
       Object oriented analysis and design with applications should be refereed for OO concepts.
                                                                                                   129

More Related Content

What's hot

14 ooad uml-19
14 ooad uml-1914 ooad uml-19
14 ooad uml-19Niit Care
 
13 ooad uml-17
13 ooad uml-1713 ooad uml-17
13 ooad uml-17Niit Care
 
Devnology Back to School: Empirical Evidence on Modeling in Software Development
Devnology Back to School: Empirical Evidence on Modeling in Software DevelopmentDevnology Back to School: Empirical Evidence on Modeling in Software Development
Devnology Back to School: Empirical Evidence on Modeling in Software DevelopmentDevnology
 
09 ooad uml-11
09 ooad uml-1109 ooad uml-11
09 ooad uml-11Niit Care
 
Function oriented design
Function oriented designFunction oriented design
Function oriented designVidhun T
 
Object oriented analysis and design
Object oriented analysis and designObject oriented analysis and design
Object oriented analysis and designnaveed428
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignAnirban Majumdar
 
Unit 1- OOAD ppt
Unit 1- OOAD  pptUnit 1- OOAD  ppt
Unit 1- OOAD pptPRIANKA R
 
An Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsAn Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsMohammed Misbhauddin
 
Unified modelling language (UML)
Unified modelling language (UML)Unified modelling language (UML)
Unified modelling language (UML)Hirra Sultan
 
Information Systems Analysis and Design Overview of OOAD, UML, and RUP
 Information Systems Analysis and Design Overview of OOAD, UML, and RUP Information Systems Analysis and Design Overview of OOAD, UML, and RUP
Information Systems Analysis and Design Overview of OOAD, UML, and RUPDang Tuan
 
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTCS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTleela rani
 
Object Oriented Analysis Design using UML
Object Oriented Analysis Design using UMLObject Oriented Analysis Design using UML
Object Oriented Analysis Design using UMLAjit Nayak
 

What's hot (20)

14 ooad uml-19
14 ooad uml-1914 ooad uml-19
14 ooad uml-19
 
13 ooad uml-17
13 ooad uml-1713 ooad uml-17
13 ooad uml-17
 
Devnology Back to School: Empirical Evidence on Modeling in Software Development
Devnology Back to School: Empirical Evidence on Modeling in Software DevelopmentDevnology Back to School: Empirical Evidence on Modeling in Software Development
Devnology Back to School: Empirical Evidence on Modeling in Software Development
 
09 ooad uml-11
09 ooad uml-1109 ooad uml-11
09 ooad uml-11
 
Lab 2
Lab 2Lab 2
Lab 2
 
Function oriented design
Function oriented designFunction oriented design
Function oriented design
 
Lab 1
Lab 1Lab 1
Lab 1
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Object oriented analysis and design
Object oriented analysis and designObject oriented analysis and design
Object oriented analysis and design
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Chapter1
Chapter1Chapter1
Chapter1
 
Unit 1- OOAD ppt
Unit 1- OOAD  pptUnit 1- OOAD  ppt
Unit 1- OOAD ppt
 
An Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsAn Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence Diagrams
 
Jeet ooad unit-2
Jeet ooad unit-2Jeet ooad unit-2
Jeet ooad unit-2
 
Unified modelling language (UML)
Unified modelling language (UML)Unified modelling language (UML)
Unified modelling language (UML)
 
Uml
UmlUml
Uml
 
Information Systems Analysis and Design Overview of OOAD, UML, and RUP
 Information Systems Analysis and Design Overview of OOAD, UML, and RUP Information Systems Analysis and Design Overview of OOAD, UML, and RUP
Information Systems Analysis and Design Overview of OOAD, UML, and RUP
 
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTCS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
 
Object Oriented Analysis Design using UML
Object Oriented Analysis Design using UMLObject Oriented Analysis Design using UML
Object Oriented Analysis Design using UML
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 

Viewers also liked

Object Oriented Analysis & Design
Object Oriented Analysis & DesignObject Oriented Analysis & Design
Object Oriented Analysis & Designvishykn
 
Uml book 7th ed. by Roger S. Pressman
Uml book 7th ed. by Roger S. PressmanUml book 7th ed. by Roger S. Pressman
Uml book 7th ed. by Roger S. PressmanS M K
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentRishabh Soni
 
Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)guest251d9a
 
srs for railway reservation system
 srs for railway reservation system srs for railway reservation system
srs for railway reservation systemkhushi kalaria
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignHaitham El-Ghareeb
 

Viewers also liked (12)

Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Analysis & Design
Object Oriented Analysis & DesignObject Oriented Analysis & Design
Object Oriented Analysis & Design
 
3 analysis and design overview
3 analysis and design overview3 analysis and design overview
3 analysis and design overview
 
Uml book 7th ed. by Roger S. Pressman
Uml book 7th ed. by Roger S. PressmanUml book 7th ed. by Roger S. Pressman
Uml book 7th ed. by Roger S. Pressman
 
4b use-case analysis
4b use-case analysis4b use-case analysis
4b use-case analysis
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
 
Sadcw 6e chapter8
Sadcw 6e chapter8Sadcw 6e chapter8
Sadcw 6e chapter8
 
Chapter02
Chapter02Chapter02
Chapter02
 
Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)
 
srs for railway reservation system
 srs for railway reservation system srs for railway reservation system
srs for railway reservation system
 
Ooad
OoadOoad
Ooad
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 

Similar to Book of Uml

View Alignment Techniques
View Alignment TechniquesView Alignment Techniques
View Alignment TechniquesJIGAR MAKHIJA
 
_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf
_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf
_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdfdo_2013
 
_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf
_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf
_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdfdo_2013
 
Software-Architecture_Course-Notes.pdf
Software-Architecture_Course-Notes.pdfSoftware-Architecture_Course-Notes.pdf
Software-Architecture_Course-Notes.pdfdo_2013
 
Unit-1 OOAD Introduction.pptx
Unit-1 OOAD Introduction.pptxUnit-1 OOAD Introduction.pptx
Unit-1 OOAD Introduction.pptxRavindranath67
 
Code Craftsmanship Checklist
Code Craftsmanship ChecklistCode Craftsmanship Checklist
Code Craftsmanship ChecklistRyan Polk
 
Project Management
Project ManagementProject Management
Project ManagementBabu Appat
 
Various Approaches Of System Analysis
Various Approaches Of System AnalysisVarious Approaches Of System Analysis
Various Approaches Of System AnalysisLaura Torres
 
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Dr Sukhpal Singh Gill
 
Power point presentation 1
Power point presentation 1Power point presentation 1
Power point presentation 1Student
 
Difference Between Agile And Waterfall Model
Difference Between Agile And Waterfall ModelDifference Between Agile And Waterfall Model
Difference Between Agile And Waterfall ModelTammy Moncrief
 
Comparing Various SDLC Models On The Basis Of Available Methodology
Comparing Various SDLC Models On The Basis Of Available MethodologyComparing Various SDLC Models On The Basis Of Available Methodology
Comparing Various SDLC Models On The Basis Of Available MethodologyIJMER
 
Ooad lab manual(original)
Ooad lab manual(original)Ooad lab manual(original)
Ooad lab manual(original)dipenpatelpatel
 
Object Orientation Fundamentals
Object Orientation FundamentalsObject Orientation Fundamentals
Object Orientation FundamentalsPramod Parajuli
 

Similar to Book of Uml (20)

View Alignment Techniques
View Alignment TechniquesView Alignment Techniques
View Alignment Techniques
 
Ch01
Ch01Ch01
Ch01
 
_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf
_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf
_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf
 
_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf
_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf
_773d48108e2dda1c1a731bf69b06c3be_Software-Architecture_Course-Notes.pdf
 
Software-Architecture_Course-Notes.pdf
Software-Architecture_Course-Notes.pdfSoftware-Architecture_Course-Notes.pdf
Software-Architecture_Course-Notes.pdf
 
Jar chapter 1
Jar chapter 1Jar chapter 1
Jar chapter 1
 
Unit-1 OOAD Introduction.pptx
Unit-1 OOAD Introduction.pptxUnit-1 OOAD Introduction.pptx
Unit-1 OOAD Introduction.pptx
 
Code Craftsmanship Checklist
Code Craftsmanship ChecklistCode Craftsmanship Checklist
Code Craftsmanship Checklist
 
UNIT 01 SMD.pptx
UNIT 01 SMD.pptxUNIT 01 SMD.pptx
UNIT 01 SMD.pptx
 
Project Management
Project ManagementProject Management
Project Management
 
Various Approaches Of System Analysis
Various Approaches Of System AnalysisVarious Approaches Of System Analysis
Various Approaches Of System Analysis
 
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
 
Power point presentation 1
Power point presentation 1Power point presentation 1
Power point presentation 1
 
SMD Unit i
SMD Unit iSMD Unit i
SMD Unit i
 
Difference Between Agile And Waterfall Model
Difference Between Agile And Waterfall ModelDifference Between Agile And Waterfall Model
Difference Between Agile And Waterfall Model
 
Comparing Various SDLC Models On The Basis Of Available Methodology
Comparing Various SDLC Models On The Basis Of Available MethodologyComparing Various SDLC Models On The Basis Of Available Methodology
Comparing Various SDLC Models On The Basis Of Available Methodology
 
Ooad lab manual(original)
Ooad lab manual(original)Ooad lab manual(original)
Ooad lab manual(original)
 
Introduction to OOAD
Introduction to OOADIntroduction to OOAD
Introduction to OOAD
 
Object Orientation Fundamentals
Object Orientation FundamentalsObject Orientation Fundamentals
Object Orientation Fundamentals
 
reaserch ppt.pptx
reaserch ppt.pptxreaserch ppt.pptx
reaserch ppt.pptx
 

Recently uploaded

Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
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
 
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
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
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
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
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
 
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
 
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
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
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
 

Recently uploaded (20)

Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
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Ă...
 
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
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
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
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/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
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
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
 
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
 
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
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
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
 
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
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 

Book of Uml

  • 1. Object Oriented Analysis and Design Using UML 1
  • 2. Course description: OBJECTIVE: The understand the Unified Modeling Language and orient towards Object Oriented methodology using UML for modeling software systems. TARGET AUDIENCE: In particular, it is intended for software professionals who have sound knowledge of object concepts and some experience towards analysis and design. PREREQUISITES: Good understanding of object concepts. Sound knowledge of any object oriented language. Knowledge of software engineering process. 2
  • 3. Course description: TABLE OF CONTENTS: Module1 Introduction Module2 Use case diagram Module3 Flow of events Module 4 Realization of the class diagram Sequence diagram and Collaboration Diagram Module5 Class diagram and refinement attributes Module6 State transition and activity diagram Module7 Implementation diagram Component diagram and Deployment diagram Module8 Understanding project culture Appendix-A 3
  • 5. Importance of modeling What is a model? – A model is a simplification of reality Why do we model? – help visualizing – permit specification – provides a template – document decisions 5
  • 6. 4 Principles of Modeling Choose your models well Every model may be expressed at various levels of precision The best models are connected to reality No single model is sufficient 6
  • 7. What is Software Engineering? DEFINITION:The application of systematic, disciplined and qualifiable approach to the development, operation and maintenance of a software system is software engineering. Software development life cycle has following stages: REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TESTING 7
  • 8. Effort Distribution for each stage: Analysis & design 40 % Development 20 % Testing 40 % Analysis - What is to be done ? Design - How it is to be done ? Two Popular methodology approaches are: Structured Analysis & Design Object Oriented Analysis & Design-OO model 8
  • 9. Major benefits of OOAD: The object oriented approach is a way of thinking about a problem using real world concepts instead using adhoc function concepts. We intent to learn OOAD approach for the following reason: –Promotes better understanding of user requirements –Leads cleaner design –Design flexibility' –Decomposition of the system is consistent –Facilitates data abstraction & information hiding –Software reuse –Easy maintenance –Implementation flexibility 9
  • 10. Elements of OO Methodology: Following are three elements for every OO methodology: Notation Process / Method Tool 10
  • 11. What is Notation? Notation: It is collection of graphical symbols for expressing model of the system. The Unified Modeling Language [UML] provides a very robust set of notation which grows from analysis to design. This brings end of the method wars as far as notation is concerned with adoption of the language [UML] By unifying the notations used by these object oriented methods, the unified modeling language provides the basis for a de facto standard in the domain of object oriented analysis and design founded on a wide 11 base of user experience
  • 12. What is UML? It is a Unified Modeling Language, which is mainly a collection of graphical notation that methods use to express the designs. The UML is language for visualizing, specifying, constructing and documenting the artifacts of software system. UML is visual modeling language for modeling systems and is non proprietary UML is not a radical departure from Booch, OMT, OOSE notations but rather legitimate successor to all three. It is an evolutionary step, which is more expressive and more uniform than individual notations. Whitehead says “ By relieving the brain of unnecessary work, a good notation, sets it free to concentrate on more advance and creative problems “ UML is not a method or process but is the means to express the same. 12
  • 13. Where can you use the UML? System of several different kinds, absolutely anywhere everywhere. Primarily for software intensive systems like: Systems software Business processes 13
  • 14. The Evolution of the UML: OMG vote’97 Public Feedback Submission to OMG, sept’97 UML1.1 Submission of OMG group UML1.0 Beta version OOPSLA’96 UML0.9 Unified Method 0.8 Other method Booch OMT OOSE 14
  • 15. Advantages of UML: Captures business processes Enhance communication and ensures the right communication Capability to capture the logical software architecture independent of the implementation language Manages the complexity Enables reuse of design 15
  • 16. UML refers to: UML things: Class, component, node, relationship, package etc.. UML diagrams: Use case diagram, interaction diagram, class diagram, State diagram,deployment diagram 16
  • 17. What is Process? What is Process? It is an extensive set of guidelines that address the technical and organizational aspects of software development focusing on requirements, analysis and design. Process basically encapsulates the activities leading to the orderly construction of system model. OO model supports the iterative and incremental model for the process. 17
  • 18. More about Process? Guidance as to the order of team’s activities It specifies what artifacts should be developed It directs the task of individual developers and team as a whole It offers criteria for monitoring and measuring project activities The selection of particular process will vary greatly depending upon things like problem domain, implementation technology and skills of team Booch,OMT,OOSE and many other methods have well defined process and UML supports almost all methods There has been some convergence on development process practices but there is no consensus for standardization. Framework for the every stage of software development life cycle. 18
  • 19. Best Practices followed by Rational Unified Process Develop software iteratively Manage requirements Use component based architectures Visually model software Verify S/W quality Control changes to software. 19
  • 20. What is a tool? It is automated support for every stage of software development life cycle. Since we are concentrating on requirement, analysis and design phase, following are the names of few tools which are greatly in use: 1. Rational Rose 2. Cayenne 3. Platinum 4. Select 20
  • 21. Why Tool? Helps designer for creating designs much more quickly. Supports validations like: Consistency checking Completeness checking Constrain checking. Time required for certain operation could be predicted . Code generation Reverse engineering. Round trip engineering Conversion from SSAD to OOAD Quick documentation…etc 21
  • 22. Triangle for Success: All three components play equally important role towards the success of the project. Notation Tool Method 22
  • 23. Objective of the first module: Get introduced with Unified Modeling Language and know the basic components of software development life cycle. 23
  • 24. Module-2 24
  • 25. OO model: DYNAMIC MODEL STATIC MODEL LOGICAL MODEL PHYSICAL MODEL The models of Object Oriented Development 25
  • 26. Models and Views: 4+1 view of OO model. – Process view – Deployment view – Logical view – Dynamic view + – Use case view As shown in the model , for each dimension we define a number of diagrams that denote a view of the system’s model. The use case view is central since its contents drive the developments of other views. 26
  • 27. UML diagrams: 1. Use case diagram 2. Class Diagram 3. Behavioral diagrams - State chart diagrams - Object diagram - Activity diagrams - Interaction diagrams - Sequence diagrams - Collaboration diagrams 4. Implementation diagrams - Component diagram - Deployment diagram 27
  • 28. Semantics of Diagrams: · Use case diagrams represent the functions of a system from the user’s point of view. · Sequence diagrams are a temporal representation of objects and their interactions. · Collaboration diagrams are a spatial representation of objects, links, and interactions. · Object diagrams represent objects and their relationships, and correspond to simplified collaboration diagrams that do not represent message broadcasts. · Class diagrams represent the static structure in terms of classes and relationships. 28
  • 29. Semantics of Diagrams: Contd... · State chart diagrams represent the behavior of a class in terms of states · Activity diagrams are to represent the parallel behavior of an operation as a set of actions. · Component diagrams represent the logical components of an application. · Deployment diagrams represent the deployment of components on particular pieces of hardware. 29
  • 30. What is USE CASE diagram? A use case diagram establish the capability of the system as a whole. Components of use case diagram: Actor Use case System boundary Relationship Actor relationship Semantic of the components is followed. 30
  • 31. ACTOR: What is an actor? An actor is some one or something that must interact with the system under development UML notation for actor is stickman, shown below. Customer Manager Cashier 31
  • 32. ACTOR: More about an actor: It is role a user plays with respect to system. Actors are not part of the system they represent anyone or anything that must interact with the system. Actors carry out use cases and a single actor may perform more than one use cases. Actors are determined by observing the direct uses of the system, 32
  • 33. ACTOR: Contd… Those are responsible for its use and maintain as well as other systems that interact with the developed system. An actor may - input information to the system. - receive information from the system. - input to and out from the system. 33
  • 34. ACTOR: How do we find the actor? Ask following questions to find the actors: – Who uses the system? – Who installs the system? – Who Starts up the system? – What other systems use this system? – Who gets the information from the system? – Who provides information to the system? Actor is always external to the system. They are never part of the system to be developed. 34
  • 35. ACTOR: 4-Categories of an actor: Principle : Who uses the main system functions. Secondary : Who takes care of administration & maintenance. External h/w : The h/w devices which are part of application domain and must be used. Other system: The other system with which the system must interact. 35
  • 36. ACTOR: Note: If newly identified actor is using a system in a same way like an existing actor, then new actor can be dropped. If two actors use system in the same way they are same actors. 36
  • 37. USE CASE: What is USE case? A use case is a pattern of behavior, the system exhibits Each use case is a sequence of related transactions performed by an actor and the system in dialogue. USE CASE is dialogue between an actor and the system. Examples: Open new account Withdrawal of cash from ATM 37
  • 38. USE CASE: More about USE CASE: It is a snapshot of one aspect of system. They model a dialog between actor and system. A use case typically represents a major piece of functionality that is complete from beginning to end. Most of the use cases are generated in initial phase, but you find some more as you proceed. A use case may be small or large. It captures a broad view of a primary functionality of the system in a manner that can be easily grasped by non technical user. 38
  • 39. USE CASE: Contd… A use case must deliver something of value to an actor. The use cases may be decomposed into other use cases. Use cases also present a good vehicle for project planning. 39
  • 40. USE CASE: How do we find the use cases? What functions will the actor want from the system? Does the system store information? What actors will create, read, update. Or delete that information? Does the system need to notify an actor about changes in its internal state? 40
  • 41. USE CASE: Generic format for documenting the use case: - Pre condition: If any – Use case : Name of the case. – Actors : List of actors(external agents), indicating who initiates the use case. – Purpose : Intention of the use case. – Overview : Description. – Type : primary / secondary. – Post condition: If any Typical Course of Events: ACTOR ACTION : Numbered actions of the actor. SYSTEM RESPONSE : Numbered description of system responses. 41
  • 42. USE CASE: USE CASE documentation example: The following use case describes the process of opening a new account in the bank. Use case :Open new account Actors :Customer, Cashier, Manager Purpose :Like to have new saving account. Description :A customer arrives in the bank to open the new account. Customer requests for the new account form, fill the same and submits, along with the minimal deposit. At the end of complete successful process customer receives the passbook. Type :Primary use case. 42
  • 43. Grouping USE CASES: Those use case functionality which are directly dependent on the system environment are placed in interface objects Those functionality dealing with storage and handling of information are placed in entity objects Functionality's specific to one or few use cases and not naturally placed in any of the other objects are placed in control objects By performing this division we obtain a structure which helps us to understand the system from logical view 43
  • 44. OOAD --- USE CASE driven Analysis Design & Implementation Test Use cases make up the glue Implement Verify that use cases Capture,clarify use cases are satisfied & validate use cases 44
  • 45. SYSTEM BOUNDARY: What is System Boundary? It is shown as a rectangle. It helps to identify what is external verses internal, and what the responsibilities of the system are. The external environment is represented only by actors. 45
  • 46. RELATIONSHIP: What is Relationship? Relationship between use case and actor. Communicates Relationship between two use cases Extends Uses Notation used to show the relationships: << >> 46
  • 47. RELATIONSHIP: Relationship between use case and actor is often referred as “communicates” . Relationship between two use cases is refereed as either uses or extends. USES: - Multiple use cases share a piece of same functionality. - This functionality is placed in a separate use case rather than documenting in every use case that needs it. 47
  • 48. RELATIONSHIP: Contd... A uses relationship shows behavior that is common to one or more use cases. EXTENDS: It is used to show optional behavior, which is required only under certain condition. 48
  • 49. USE CASE diagram: Use case diagram for the shown functionality. Balance status report extends Withdraw cash Clerk Customer uses Validation ATM Manager 49
  • 50. Objective of the second module To understand and capture the detailed specification of a system to be developed, from user perspective. 50
  • 51. Module-3 51
  • 52. Beginning Analysis and Design Completion of first version of use case diagram initiates the processes of analysis and design. UML provides the framework to carry out the process of analysis and design in form of set of diagrams. Every diagram and notation used in the diagram carries the semantics. First step towards analysis and design is to specify the flow of events. 52
  • 53. Flow of Events: A flow of events document is created for each use case. Details about what the system must provide to the actor when the use is executed. Typical contents – How the use case starts and ends – Normal flow of events – Alternate flow of events – Exceptional flow of events Typical Course of Events has: Actor Action(AA) System Response(SR) 53
  • 54. Normal Flow of Events: For withdrawal of cash: 1.(SR) The ATM asks the user to insert a card. 2.(AA) The user inserts a cash card. 3.(SR) The ATM accepts the card and reads its serial number. 4.(SR) The ATM requests the password. 5.(AA) The user enters 1234. 6.(SR) The ATM verifies the serial number and password with the bank and gets the notification accordingly. 7.(SA)The ATM asks the user to select the kind of transaction. 8.(AA)User selects the withdrawal. 54
  • 55. Normal Flow of Events: Contd... 9.(SR)The ATM asks for the amount of cash; user enters Rs. 2500/- 10.(SR)The ATM verifies that the amount of cash is within predefined policy limits and asks the bank, to process the transaction which eventually confirms success and returns the new account balance. 11.(SR) The ATM dispenses cash and asks the user to take it. 12.(AA) The user takes the cash. 13.(SR) The ATM asks whether the user wants to continue. 14.(AA) The user indicates no. 55
  • 56. Normal Flow of Events: Contd... 15.(SR) The ATM prints a receipt, ejects the card and asks the user to take them 16.(AA) The user takes the receipt and the card. 17.(SR) The ATM asks a user to insert a card. 56
  • 57. Alternative Flow of Events: For withdrawal of cash use case: 9. The ATM asks for the amount of cash; the user has change of mind and hits the “cancel”. 57
  • 58. Exceptional Flow of Events: For withdrawal of cash use case: 3 Suspicious pattern of usage on the card. 10 The machine is out of cash. 11 Money gets stuck in the machine. 58
  • 59. Why flow of events? It helps in understanding the functionality of a system to be developed. Flow of events helps in finding objects of the system to be developed. Happens to be most important and very first step towards analysis and design. 59
  • 60. What is Scenario? The functionality of the use case is captured in flow of the events. A scenarios is one path through the flow of events for the use case. Scenarios are developed to help identify objects, classes and object interactions for that use case. 60
  • 61. Objective of the third module To understand the flow of each functionality and find out the objects and methods required to build the system. 61
  • 62. Module-4 62
  • 63. USE CASE Realizations: The use case diagram presents an outside view of the system Interaction diagrams describe how use cases are realized as interactions among societies of objects. Two types of interaction diagrams – Sequence diagrams – Collaboration diagrams 63
  • 64. What is Interaction diagram? Interaction diagrams are models that describe how groups of objects collaborate in some behavior There are 2 kinds of interaction diagrams • Sequence diagram • Collaboration diagram Sequence diagrams are a temporal representation of objects and their interactions Collaboration diagrams are spatial representation of objects, links and interrelations 64
  • 65. What is sequence diagram? Typically these diagrams capture behaviors of the single scenario. Shows object interaction arranged in time sequence. They show sequence of messages among the objects. It has two dimensions, vertical represents time & horizontal represents objects. Components of sequence diagram: -objects -object lifeline -Message -pre/post conditions. 65
  • 66. OBJECT & OBJECT LIFE LINE: Object are represented by rectangles and name of the objects are underlined. Object life line are denoted as dashed lines. They are used to model the existence of objects over time. Name:Class 66
  • 67. MESSAGES: They are used to model the content of communication between objects. They are used to convey information between objects and enable objects to request services of other objects. The message instance has a sender, receiver, and possibly other information according to the characteristics of the request. Messages are denoted as labeled horizontal arrows between life lines. The sender will send the message and receiver will receive the message. 67
  • 68. MESSAGES: Contd… May have square brackets containing a guard conditions. This is a Boolean condition that must be satisfied to enable the message to be sent. May have have an asterisk followed by square brackets containing an iteration specification. This specifies the number of times the message is sent. May have return list consisting of a comma -separated list of names that designate the values of returned by the operation. Must have a name or identifier string that represents the message. May have parentheses containing an argument list consisting of a comma separated list of actual parameters passed to a method. 68
  • 69. Sequence diagram [for withdrawal of cash, normal flow] :Customer Insert card :ATM :Bank Request password Enter the password Verify account Account o.k. Request option Enter option Create Request amount Transaction :Transaction Enter the amount Update transaction Transaction commit Transaction Dispense cash complete Request take cash Take cash Request continuation Terminate Print receipt ,eject card Request take card Take card 69 Display main screen and prompt for the card.
  • 70. What is Collaboration diagram? Collaboration diagrams illustrate the interaction between the objects, using static spatial structure. Unlike sequence diagram the time is not explicitly represented in these diagrams In collaboration diagram the sequence of messages is indicated by numbering the messages. The UML uses the decimal numbering scheme. In these diagrams, an actor can be displayed in order to represent the triggering of interaction by an element external to the system. This helps in representing the interaction, without going into the details of user interface. 70
  • 71. Components of collaboration diagram: Named objects Links: Links are represented by a continuous line between objects, and indicates the exchange of messages. Messages has following attributes: • Synchronization --thread name, step within thread. • Sequence number • Message labels : The name of the message often corresponds to an operation defined in the class of the object that is the destination of the message. Message names may have the arguments and return values. • *[iteration]. • It uses decimal notation. • Message direction. 71
  • 72. Semantics of components: Object names identify which objects are participating and the links show which objects collaborate A link between two objects must exist for one object to send message to another and vice a versa. Messages in the collaboration diagram get transformed to more detailed signature. They use the decimal notation system for numbering the messages. The direction of the message defines the sender and receiver of the message 72
  • 73. The elements of message: Predecessor Role names Message qualifiers – Iteration expression – Parameters – Return values – Guard – Message stereotypes Concurrent thread sequencing Thread dependencies Message expression [Pre] A1:*(expression):doIt(p,r):return value 73
  • 74. The examples of message: 4:Display(x,y) Simple message 3.3.1:Display(x,y) Nested message 4.2:subtract[Today,Birthday]:age Nested message with return value [Age >=18] 6.2:Vote() Conditional message 4.a,b.6/c.1:Turnon(Lamp) Synchro. with other flow of execution 1*:wash() Iteration 3.a,3.b/4*||[i:=1..n]:Turnoff() Parallel iteration 74
  • 75. Collaboration diagram [for withdrawal of cash, normal flow.] 1. Insert card Enter password, Enter kind Enter amount, Take cash, Take card cancel,Terminate, Continue Create Transaction Transaction complete CUST- TRANSA- OMER Display main screen unreadable card message, ATM CTION request password, request kind, request amount, canceled message, eject card, failure message, dispense cash, request take cash Transaction succeed request continuation, Transaction failed print receipt, request take card account o.k. bad account message, Verify account, bad account, bad bank account message process transaction bad password, bad bank code BANK 75
  • 76. Objective of the fifth module To know the interaction among the objects in temporal and spatial form. To know how objects collaborate among each other and hence delegate the responsibility to the respective objects. To understand how the messages get matured with more information. 76
  • 77. Module-5 77
  • 78. What is Class diagram? A class diagram shows the existence of classes and their relationships in the logical view of a system UML modeling elements in class diagrams are: – Classes, their structure and behavior. – relationships components among the classes like association, aggregation, composition, dependency and inheritance – Multiplicity and navigation indicators – Role names or labels. 78
  • 79. Major Types of classes: Concrete classes A concrete class is a class that is instantiable; that is it can have different instances. Only concrete classes may be leaf classes in the inheritance tree. Abstract classes An abstract class is a class that has no direct instance but whose descendants classes have direct instances. An abstract class can define the protocol for an operation without supplying a corresponding method we call this as an abstract operation. An abstract operation defines the form of operation, for which each concrete subclass should provide its own implementation. 79
  • 80. RELATIONSHIP: Association Aggregation Composition Inheritance Dependency Instantiation 80
  • 81. ASSOCIATION: These are the most general type of relationship: It denotes a semantic connection between two classes It shows BI directional connection between two classes It is a weak coupling as associated classes remain somewhat independent of each other Example: CUSTOMER ATM system 81
  • 82. AGGREGATION: This is a special type of association The association with label “contains” or “is part of” is an aggregation It represents “has a “ relationship It is used when one object logically or physically contains other The container is called as aggregate It has a diamond at its end The components of aggregate can be shared with others It expresses a whole - part relationships 82
  • 83. AGGREGATION: Example: Customer ATM card 83
  • 84. COMPOSITION: This is a strong form of aggregation It expresses the stronger coupling between the classes The owner is explicitly responsible for creation and deletion of the part Any deletion of whole is considered to cascade its part The aggregate has a filled diamond at its end Window Client Area 84
  • 85. INHERITANCE: The inheritance relationship helps in managing the complexity by ordering objects within trees of classes with increasing levels of abstraction. Notation used is solid line with arrowhead,shown below. Generalization and specialization are points of view that are based on inheritance hierarchies. Account CurrentAccount SavingAccount 85
  • 86. DEPENDENCY: Dependency is semantic connection between dependent and independent model elements. This association is unidirectional and is shown with dotted arrowhead line. In the following example it shows the dependency relationship between client and server. The client avails services provided by server so it should have semantic knowledge of server. The server need not know about client. Client Server 86
  • 87. INSTANTIATION This relationship is defined between parameterized class and actual class. Parameterized class is also referred as generic class. A parameterized class can’t have instances unless we first instantiated it Example: Element Queue Queue<int> 87
  • 88. What is Cardinality? : Definition: Number of instances of each class involved in the dialogue is specified by cardinality. Common multiplicity values: Symbol Meaning 1 One and only one 0..1 Zero or one M…N From M to N (natural integer) 0..* From zero to any positive integer 1..* From one to any positive integer Also thought can be given about navigability to every applicable relationship. 88
  • 89. Reaching the class diagram: In collaboration diagram we have shown the objects, their interaction and detailed message signature. This information is carried forward to the class diagram. At this point,we group the similar objects and form classes. Messages get mapped to responsibilities for respective classes. Find the attributes for every class. Transform the links to appropriate relationships. Relationship is further refined with respect to multiplicity and navigability. This complete procedure brings the minimal class diagram [for withdraw cash use case, normal flow.] 89
  • 90. Class diagram [for withdrawal of cash, normal flow] Customer 1 1..* 1..* ATMSystem 0..* Transaction 1 1 1..* Bank[Branch] 1 90
  • 91. What more to the Class Diagram? Till this slide we have worked out the essentials of class diagram for withdrawal of cash use case, normal flow of events. Similar exercise required to be carried out for every scenario and clubbed all in the class diagram. At this point, we refine this integrated class diagram to add further fine details. Approximate sketch for this class diagram has been shown at the end of this module. Refinement attributes should be updated right from sequence diagram to class diagram. Next few slides will take into the discussion of refinement attributes. This process of iterative and incremental development will continue till there is no change in two consecutive iteration. 91
  • 92. OOAD---Iterative & Incremental Approach Identify objects Validate Classes Identify Messages & Objects Group Objects Group classes into classes into domains Identify & classify Identify class Class relationships 92 behavior
  • 93. Refinement attributes: Stereotypes: Stereotypes are part of the range of extensibility mechanism provided by UML It permits user to add new model element classes on top of the kernel predefined by UML 93
  • 94. Refinement attributes: Contd… Constraints: Constraints are functional relationship between the entities and object model. The entities include objects, classes, attributes, association, links. A constraint restricts the values that entities can assume. UML doesn't specify a particular syntax for constraints, other than they should appear between braces, so they may therefore be expressed using natural language, pseudo code, navigation expression or mathematical expression UML1.2 does prefer the use of a constraint language OCL i.e. Object Constraint Language, which is subset of UML. 94
  • 95. Refinement attributes: Example:Constraints Number of withdrawal transaction should be less than five per day. Constraint on the same class. Transaction {No. of transaction <=5 /day} No window will have an aspect ratio i.e. (length/width) of less than 0.8 or > 1.5 Window A constraint between the length/width properties of the same object {0.8<=length/width <= 1.5} 95
  • 96. Refinement attributes: Qualifier: UML provides a role of constraint notation to indicate different kind of collections that may be inherent in the analysis model Common role constraints for multi valued roles include {ordered} Collection is maintained in sorted manner {bag} Collection may have multiple copies of same item. {set} Collection may have at most one copy of given item. Some constraints may be combined such as: {ordered set} 96
  • 97. Refinement attributes: Qualifier: Another common design scheme is to use a key value to retrieve an item from the collection. This is called as qualified association and the key value as qualifier. A qualified association is the UML equivalent of a programming concept variously known as associative arrays, maps,dictionaries A qualified association relates two object classes and a qualifier The qualifier is a special attribute that reduced the effective multiplicity of an association. One to many and many to many association may be qualified. 97
  • 98. Refinement attributes: Check for many to many relationship, if any, normalize with qualifier or association class. Check for the scope forming abstract classes and template classes. Check for helper functions. Thought can be given for using the design patterns. 98
  • 99. Objective of the fifth module: Learn to build the architecture, which contains the entire information of the system to be developed. It is this architecture which is called as BLUE PRINT is handed over for coding. 99
  • 100. Refined Class diagram [for withdrawal of cash] Few more relationship can be further added to the shown diagram: Area ATMSystem BatchJob 1..* Cash BankComputer 1 Bank[Branch] <<abstract>> AccountAccessor 1 1 <<abstract>> person Transaction CashierStation 1..* 1 ATMScreen Slips Customer BankAssociates 1..* 1 <<abstract>> TellerScreen Account 1 0..1 BankCard NoteHelpForBankCard 1 CurrentAccount SavingAccount 100
  • 101. Module-6 101
  • 102. What is state transition diagram? A state transition diagram shows the states of a single object, the events or the messages that cause a transition from one state to another and the action that result from a state change. A state transition diagram will not be created for every class in the system. Components of State Diagram: – Start State – Stop state – State Transition 102
  • 103. Semantics of every components: State: A state is a condition during the life of an object when it satisfies some condition, performs some action, or waits for an event. The UML notation for a state is a rectangle with rounded corners. Special states:There are two special states. Start state: Each state diagram must have one and only one start state. Notation for start state is “filled solid circle”. Stop State: An object can have multiple stop states. Notation for stop state is bull’s eye. 103
  • 104. Semantics of every components: Contd... State transition: A state transition represents a change from an originating to a successor state. Transition label: event name[guard condition] / action 104
  • 105. State Transition Diagram [for Account class. ] request and fill the form for new saving account[ validate ] / process Open transaction request[ validate ] / update() transactionStrart / Transfer_to_main_ledger () Operational Dormant no transaction / Transfer_to_Dormant_Ledger fill_the_request_form/update( Fraud or authorized instruction[Validate] ) / lockAccount() matter_resolved[ validate ] / unlockAccount() close seized fill_the_request_form / update() Note:Account can be closed from open state as well 105
  • 106. More about State Diagram: A state diagram will not be created for every class. state diagrams are used only for those classes that exhibit interesting behavior. State diagrams are also useful to investigate the behavior of user interface and control classes. State diagram are used to show dynamics of a individual class 106
  • 107. What is activity diagram? It is a special kind of state diagram and is worked out at use case level. These are mainly targeted towards representing internal behavior of a a use case. These may be thought as a kind of flowchart. Flowcharts are normally limited to sequential process; activity diagrams can handle parallel process. Activity diagrams are recommended in the following situations: s Analyzing use case s Dealing with multithreaded application t Understanding workflow across many use cases. 107
  • 108. Consistency Checking Consistency checking is the process of ensuring that, information in both static view of the system(class diagram) and the dynamic view of the system(sequence and collaboration diagram) is telling the same story. 108
  • 109. Objective of the sixth module Understand the dynamic behavior of a class Way to find the parallel processes at use case level. 109
  • 110. Module-7 110
  • 111. What is component diagram? COMPONENT DIAGRAM: Component diagrams illustrate the organizations and dependencies among software components. A component may be • A source code component • A run time components • An executable component • Dependency relationship. 111
  • 112. Component Diagram [for withdrawal of cash] policy.dll Bank Server.exe Branch customer.dll Bank.dll Branch Bank.exe ATM.exe 112
  • 113. What is deployment diagram? A deployment diagram shows the relationship among software and hardware components in the delivered system. These diagram include nodes and connections between nodes. Each node in deployment diagram represents some kind of computational unit, in most cases a piece of hardware. Connection among nodes show the communication path over which the system will interact. The connections may represent direct hardware coupling line RS-232 cable, Ethernet connection, they also may represent indirect coupling such as satellite to ground communication. 113
  • 114. Deployment diagram Branch Bank_ Bank.exe Ethernet Ethernet Bank_ ATM_ server machine BankServer.exe ATM.exe 114
  • 115. Objective of the seventh module: To understand the organization of software modules and their deployment on the respective hardware. 115
  • 116. Module-8 116
  • 117. Understanding the project culture It may be: 1.Calendar Centric 2.Requirement Centric 3.Documentation Centric 4.Quality Centric 5.Architecture Centric 117
  • 118. Understanding the project’s culture Architecture driven projects represent the most mature style of development. These projects are characterized by a focus on creating a frame work that satisfies all known requirement, yet is resilient enough to adapt to those requirements, that are not yet known or well understood. In every sense of the word, architect-driven policies are in evolutionary step beyond requirement driven policies. Architecture driven style of development is usually the best approach for the creation of most complex software intensive 118 systems
  • 119. Understanding the project’s culture Architecture driven style of development typically observe the following process: 1. Specify the system’s desired behavior through a collection of scenarios. (Analysis) 2. Create, then validate, an architecture. (Design) 3. Evolve that architecture, making mid-course corrections as necessary to adopt to new requirements as they are uncovered. 119
  • 120. OOAD---Architecture Centric What exactly is nature of the well structured object oriented architecture?? 1. A set of classes, typically organized into multiple hierarchies. 2. A set of collaboration that specify how those classes co-operate to provide various system function. 120
  • 121. ESSENCE OF OOAD AND UML Use case driven Architecture centric Incremental and iterative approach. 121
  • 122. Desire for good Architecture Those of us who have been trained as architects have this desire perhaps at the very center of our lives,that one day, some where somehow, we shall build one building which is wonderful, beautiful, breathtaking, a place where people can walk and dream for centuries. CHRISTOPHER ALEXANDER Same desire should also be applicable in creating software architecture as well. 122
  • 123. Appendix-A 123
  • 124. Strong recommendation Object Technology – David A. Taylor Object Oriented Analysis and design with Applications – Grady Booch UML distilled –Martin Fowler Instant UML – Pierre - Alain Muller Software Engineering – Roger S Pressman 124
  • 125. REFERENCES Contd... Object Oriented Modeling and Design – James Rumbaugh Object Oriented Software Engineering – Ivar Jacobson Clouds to code – Jesse Liberty Applying use cases – Geri Schneider –Jason p. Winters UML Toolkit – Hans-Eriksson and Magnus Penker Version1.1 125
  • 126. THANK-U! 126
  • 127. Course description: SESSION BREAKUP: The course will be offered in series of fourteen hours theory session. One demonstration session on the tool like Rational Rose can be accompanied.The following is the suggested agenda for the course. Session Duration Module-1,2 2-hours demonstration lecture Module-3 2-hours Module-4 2-hours Module-5 4-hours Module-6 2-hours Module-7,8 2-hours Demonstration 2-hours 127
  • 128. Course description: REFERENCE AND READING MATERIALS: Refer to Appendix-A EXERCISE AND HANDS ON: One case study should be given to the group of four members. TEST: Case study given for exercise can be evaluated as part of the test. 128
  • 129. Course description: INSTRUCTION TO THE FACULTY: Course should emphasize on OO modeling. Focus should be primarily on understanding UML[1.2] and UML diagrams and then applying to a problem. Several excellent references are given in Appendix-A. Following are strongly recommended reading and should be used as supplementary with this power point courseware. 1.UML toolkit by Eriksson and Magnus Penker 2.Object oriented analysis and design with applications by Grady Booch Note: UML toolkit should be refereed for UML notations,their syntax and semantics. Object oriented analysis and design with applications should be refereed for OO concepts. 129

Editor's Notes

  1. 118
  2. 116
  3. 116
  4. 116
  5. 116
  6. 116
  7. 118