touseef tahir [email protected] lecturer cs comsats institute of information...

Click here to load reader

Upload: augustine-mckenzie

Post on 24-Dec-2015

217 views

Category:

Documents


4 download

TRANSCRIPT

  • Slide 1
  • Touseef Tahir [email protected] Lecturer CS COMSATS Institute of Information Technology, Lahore Unified Modeling Language(UML) BY
  • Slide 2
  • Overview Introduction History Goals Diagrams and Examples Latest Changes Disadvantages Conclusion
  • Slide 3
  • What is UML? Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing software artifacts. Not necessarily restricted to software systems used in business modeling. Has proven successful in modeling of large and complex systems. Uses graphical notations to describe the architecture of software.
  • Slide 4
  • Goals Provide users a expressive, visual language to enable sharing of meaningful models. Enables developers to compare models before implementation phase. Independent of programming language and development process. Encourage growth of Object Oriented Tools market.
  • Slide 5
  • History First modeling languages 1970s. More than 50 modeling languages present during 1994. Lead to method wars. Methods began to incorporate each others techniques. In 1994, Grady Booch and Jim Rumbaugh (Rational Software Corporation) unified Booch and Object Modeling Technique methods to create UML. Ivar Jacobson incorporated the OOSE method in 1995, leading to UML version 0.9 in late 1996.
  • Slide 6
  • UML Versions UML 1.0 was created through a collaboration of various organizations: Microsoft, IBM, HP, etc. Today, UML is on Version 2.0. It is managed by the Object Management Group not for profit consortium. UML specification is available for download at http://www.uml.org/http://www.uml.org/ Tools that conform the latest 2.0 specification Rational Software Architect, Sparx System Architect, Star UML, etc.
  • Slide 7
  • Types of UML diagrams
  • Slide 8
  • Class Diagram
  • Slide 9
  • Class diagram Abstraction Inheritance Polymorphism Encapsulation Message Sending Associations Multiplicity Aggregation
  • Slide 10
  • Class diagram
  • Slide 11
  • Inheritance Generalization in UML
  • Slide 12
  • Inheritance (Cont..)
  • Slide 13
  • Aggregation Two types of Association Part-whole association Composition
  • Slide 14
  • Aggregation Part-whole association Multiplicity
  • Slide 15
  • Aggregation Multiplicity
  • Slide 16
  • Aggregation Composition A strong type of aggregation. Each component in composite can belong to just one whole. The Diamond shape used for composition is same but its just filled.
  • Slide 17
  • Package UML Packages are a grouping of objects into sets of objects that provide related services. The package has responsibilities that are strongly related. Coupling & cohesion
  • Slide 18
  • Stereotype and comments
  • Slide 19
  • Generalization
  • Slide 20
  • State Diagrams
  • Slide 21
  • State diagram Behavior of systems Finite number of states Components of state diagram
  • Slide 22
  • State diagram An objects state and behaviour can be affected by: Changes to attribute values Results of operations Changes of links with other objects Internal events External events
  • Slide 23
  • Three models Object model: Static structure of objects in a system and their relationships. Contains class diagrams. dynamic model; describes aspects that change over time: state transition diagrams functional model; Use Case diagrams
  • Slide 24
  • State and Events A state is an abstraction of the attribute. Sets of values are grouped together into a state according to properties that affect the gross behaviour of the object. A change of state is called a transition
  • Slide 25
  • Event classes Event occurrences are grouped into event classes Flight 123 departs from Chicago / Flight 456 departs from Rome Event class is Flight Departs Attributes of event classes Departure origin of flight Flight number destination Data values are Attributes
  • Slide 26
  • Event Classes and Attributes Aeroplane flight departs (airline, flight no, city) Mouse button pushed (button, location) Input string entered (text) phone receiver lifted( True, False) digit dialled (digit) engine speed enters danger zone
  • Slide 27
  • Events Something that happens at a point in time Mouse button clicked / Signal changes Logically ordered events - causally related Concurrent events - causally unrelated do not effect each other there is no order between them 1-way transmission of information from one object to another
  • Slide 28
  • Characterisations of a state State: Alarm ringing Description: alarm on watch is ringing to indicate target time Event sequence that produces the state: set alarm (target time) any sequence not including clear alarm current time = target time
  • Slide 29
  • How to make state diagram Identify states and identify which variables identify states Identify events Create state chart Create state table with all finite stated and event
  • Slide 30
  • Example
  • Slide 31
  • ExampLe
  • Slide 32
  • State Transition Diagram
  • Slide 33
  • Slide 34