MELJUN CORTES Java Lecture UML
Upcoming SlideShare
Loading in...5
×
 

MELJUN CORTES Java Lecture UML

on

  • 900 views

MELJUN CORTES Java Lecture UML

MELJUN CORTES Java Lecture UML

Statistics

Views

Total Views
900
Views on SlideShare
900
Embed Views
0

Actions

Likes
0
Downloads
7
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    MELJUN CORTES Java Lecture UML MELJUN CORTES Java Lecture UML Presentation Transcript

    • Introduction to the Unified Modeling Langua ge MELJUN CORTES Java Fundamentals and Object-Oriented Programming The Complete Java Boot Camp MELJUN CORTES
    • Contents I. What is UML? II. Class Diagrams III.Sequence Diagrams IV.Others
    • Reference  UML Distilled Martin Fowler  practical, no-frills approach to UML 
    • Reference  Agile Modeling Hope Page “Effective Practices for Modeling and Documentation”  Scott Ambler  http://www.agilemod eling.com 
    • What is UML?  Consolidation of the various graphical- modeling methods existent during the late '80's and early '90's (around 5000)  Created by Booch, Rumbaugh, Jacobson (“the three amigos”)  Open standard managed by the Open Management Group (OMG)  Currently at version 2.0, describing about 20 types of diagrams
    • What is UML?  Three ways of using UML: for sketching  for blue printing     forward engineering reverse engineering as programming language  “model-driven architecture” / “executable UML”
    • Class Diagram
    • Class Diagram  primary means of describing classes and the static relationships between them
    • Class Diagram  Describing a class  compartments    class name attributes operations
    • Class Diagram  Describing a class  access levels   protected:  public: - private: # +
    • Class Diagram  Describing an interface different tools / books will render an interface differently  most texts will render it same as class but without attribute compartment 
    • Class Diagram  Relationships Navigability  Multiplicity / Cardinality  Association     Aggregation Composition Dependency Inheritance / Generalization  Realization   Others replacing attributes with named associations  stereotypes 
    • Class Diagram  Navigability  arrowhead   one-way navigability, the side with the arrowhead cannot see the other no arrowhead  two-way navigability, both sides can see each other
    • Class Diagram  Multiplicity / Cardinality number of possible occurrences of an element  0..*, *, 1, 1..* 
    • Class Diagram  Aggregation  the contained element can exist even if the containing object no longer exists
    • Class Diagram  Composition  the enclosed element cannot exist without the containing element
    • Class Diagram  Dependency  when an element is needed by a class but the element is not and aggregate of the class (such as a parameter)
    • Class Diagram  Inheritance / Generalization  empty-triangle arrowhead with solid line
    • Class Diagram  Realization when a class implements an interface  empty triangle arrowhead with dashed line 
    • Class Diagram  replacing attributes with named associations both can represent a property  to avoid clutter, if you use one don't use the other 
    • Class Diagram  Stereotype  used to create your own special kinds of classes
    • Sequence Diagram
    • Sequence Diagram  used to describe how objects interact with each other and the sequencing of these interactions
    • Sequence Diagram  Top boxes represent objects, not classes. You may optionally add “:class” to the name if desired.  Vertical lines represent the objects “life line”, or existence.  Broken lifeline indicates the object is inactive, a rectangle indicates the object is active.
    • Sequence Diagram  arrows with solid lines represent messages being sent.  arrows with dashed lines (optional if synchronous) represent method return. (May label arrow with name/type of returned object).
    • Sequence Diagram Sending object’s class must have:  An association of some sort with the receiving objects class.  The receiver-side class’s “role” must be the same as the name of the receiving object.
    • Sequence Diagram  Object creation  The new instance appears at end of creation message arrow
    • Sequence Diagram  Object Destruction  accomplished by terminating the lifeline with a large X
    • Sequence Diagram  Sequence diagrams can begin with a user
    • Sequence Diagram  System Sequence Diagram  sequence diagram describing interaction between user and system as a blackbox
    • Other UML Diagrams  Use Case  Collaboration  Activity  Component  Deployment
    • Use Case Diagram  Used to provide overview of the usecases of the system
    • Collaboration Diagram  Similar to sequence diagram but does not plot messages against time
    • Activity Diagram  typically used for business process modeling, for modeling the logic captured by a single use case or usage scenario, or for modeling the detailed logic of a business rule
    • State Machine Diagram  Depicting the move from one state to another of a complex object
    • Component Diagram  High-level representation of system components
    • Deployment Diagram  Similar to component diagram but includes hardware “nodes”