Está en la página 1de 20

What is UML?

A popular, standardized modeling language for object-oriented software The Object Management Group (OMG) is the group that dictates the UML standard Created by Grady Booch, James Rumbaugh, and Ivar Jacobson

Origins of UML
In the 1980s, object-oriented programming moved from research labs into the real world C++ became popular language and various people started thinking about object-oriented graphical design languages Between 1988 and 1992, the key authors were Booch, Coad, Jacobson, Odell, Rumbaugh, Shlaer, Mellor, and Wirfs-Brock In 1997, UML 1.0 was released.

1. Introduction: UML Diagrams

Classification of Diagram Types


Class Diagram Structure Diagram Composite Structure Diagram Object Diagram Diagram Deployment Diagram Package Diagram Sequence Diagram Communication Diagram Interaction Overview Diagram Timing Diagram Component Diagram

Use Case Diagram Behavior Diagram Activity Diagram Interaction Diagram State Machine Diagram

Use Case Diagrams


Describes what a system does from the standpoint of an external observer. Emphasis on what a system does rather then how. Provides system requirements from the users point of view. Scenario an example of what happens when someone interacts with the system. Actor A user or another system that interacts with the modeled system. A use case diagram describes the relationships between actors and scenarios.

Example Use Case Diagram


Make menu selections

Expert Menu System

Order food and drink

Customer

Notify customer that food and drink are ready

Cook

Pay for food and drink

Payment System

Activity Diagram
Activities are states that represent the performance of actions. Is similar to a flowchart except that it can also show parallel behavior. Can be used to describe the actions in a use case Carried out during requirements analysis and specification stage.

Example Activity Diagram

Class Diagram
Class Diagrams describe the static structure of a system, or how it is structured rather than how it behaves.

Class diagrams are static display what interacts but not what happens when interaction occurs. A class box has three parts: Name of the class Attributes of the class Operations of the class Main constituents are classes and their relationships:
Association Aggregation Generalization

An example of Class

Account_Name - Customer_Name - - Balance +addFunds( ) +withDraw( ) +transfer( )

Name Attributes

Operations

State Machine Diagram


Commonly called a state diagram In object-oriented technology, a state diagram shows the lifetime behavior of a single object A state diagram captures the behavior of a object across several use cases Elements of state chart diagram Initial State: A filled circle Final State: A filled circle inside a larger circle State: Rectangle with rounded corners Transitions:A transition indicates a movement from one state to another because an event has occurred.

Example State Diagram

Sequence Diagram
Captures the behavior of a single scenario in a use case Shows a number of example objects and messages that are passed between those objects within the use case Objects are shown as boxes at top Objects existence are shown as dashed lines (lifeline) Objects activeness, shown as a rectangle on lifeline Gives a good picture about which participants are doing which processing

Example

14

Object Diagram
Object Diagrams describe the static structure of a system at a particular time. A class model describes all possible situations whereas an object model describes a particular situation. Object diagrams contain the following elements: Objects- which represent particular entities. These are instances of classes. Links- which represent particular relationships between objects. These are instances of associations.

Object Diagram
LibraryMember Mritunjay B10028 C-108, Laksmikant Hall 1119 Mrituj@cse 25-02-04 25-03-06 NIL IssueBook( ); findPendingBooks( ); findOverdueBooks( ); returnBook( ); findMembershipDetails( ); LibraryMember Mritunjay B10028 C-108, Laksmikant Hall 1119 Mrituj@cse 25-02-04 25-03-06 NIL LibraryMember

Different representations of the Library Member object

Package Diagram
Used most often to group classes Corresponds to the package concept in Java Represented by a tabbed folder, where the tab contains the package name Useful for large projects with large number of classes

PACKAGE DIAGRAM

Advantages of UML
You can model just about any type of application, running on any type and combination of hardware, operating system, programming language, and network, in UML. UML is effective for modeling large, complex software systems. Working with a new developer will be easier. Communication with programmers and outside contractors will be more efficient You know exactly what you are getting The right decisions are made before you are given poorly written code. Less overall costs

THANK YOU

También podría gustarte