Intoduction to uml
-
Upload
mahesh-bhalerao -
Category
Education
-
view
777 -
download
2
description
Transcript of Intoduction to uml
WHAT IS UML ?WHAT IS UML ?
• Unified Modeling Language is a modeling language for software blueprint.
• It is a standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems.
• It was developed by Booch, Jacobson andRumbaugh.
WHAT UML IS NOT ?WHAT UML IS NOT ?
• It’s not an algorithm specification language..
• It’s not a development process.It’s not a development process.
• It’s not a programming language.It’s not a programming language.
• It’s not a caseIt’s not a case tool. tool.
GOALS OF UMLGOALS OF UML
• Provide users with a ready-to-use,
expressive visual modeling language
so they can develop meaningful model.
• Provide extensible and specialization mechanisms to extend the core concept.
• Be independent of programming language and development processes.
TYPES OF UML DIAGRAMSTYPES OF UML DIAGRAMS
Each UML diagram is designed to let developers and customers view a software system from a different perspective.
1. Use Case Diagram : Displays the relationship among actors and use cases.
2. Class Diagram : Models class structure and contents using design elements such as classes, packages and objects. It displays relationships such as inheritance and associations etc.
3. Interaction Diagram : Sequence Diagram : Displays the time
sequence of the objects participating in the interaction.
Collaboration Diagram : Displays an interaction organized around the objects and their links to one another.
4. Statechart Diagram : Displays the sequences of states that an object of an interaction goes through during its life in response to received stimuli/event.
5. Activity Diagram : Displays a special state diagram where most of the states are action states and most of the transitions are triggered by completion of the actions in the source states. In this diagram
Focus is on flows driven by processing. 6. Physical Diagrams :
Component Diagram : Shows the organization and dependencies among a set of components. Involves the modeling of physical things that reside on a node – such as executables, libraries, tables, files and documents.
Deployment Diagram : Displays the configuration of run-time processing elements and the software components, processes and objects that live on them.
ARCHITECTURE OF AARCHITECTURE OF ASOFTWARE SYSTEMSOFTWARE SYSTEM
• Use Case View : It describes the behavior of the system typically as seen by the end user.
• Design View : It encompasses the classes, interfaces and collaborations that make up the system. Shows how functional requirement have been implemented.
• Process View : It encompasses the threads and processes that make up the system.
• Implementation View : It encompasses the components, files and packages that are used to assemble the system.
• Deployment View : It encompasses nodes that form the system and addresses the distributivity and installation of system.
ELEMENTS OR THINGS OF UMLELEMENTS OR THINGS OF UML
Many elements or things that must be well
understood to draw UML diagrams are broken
down into following categories :
• Structural Elements • Behavioral Elements• Grouping Elements• Annotations
• STRUCTURAL ELEMENTS :
They are the static parts of the model usually represents the static concepts or physical entities with system. Classes Interfaces Collaboration Use case Active classes Components Nodes
• BEHAVIORAL ELEMENT : These are the dynamic parts of the model. They represent the behaviour of the staticelements of the model.
Messages : Represents messages exchanged between objects and represents flow of the system.
States : Represents the state of an object at a particular point in time. States allow objects to make choices about how to respond to an event.
• ANNOTATION ELEMENTS:
These are explanatory elements of the UML.
These are used to describe other things
represented by a single element. Note
RELATIONSHIPS IN UMLRELATIONSHIPS IN UML
There are 4 types of relationships :
1. Dependency
2. Association
3. Generalization
4. Realization
0..1 *
employer employee
• DEPENDENCY :It is a semantic relationship between two thingsthat represents that a change to the independentelement will affect the dependent element.
-------• ASSOCIATION :It represents a structural relationship (usually among the classes). It has name, multiplicity,source and target, role names.
• GENERALIZATION :
It indicates specialized element is substitutable
For a generalized element. It represents is-a kind
Of relationship.
• REALIZATION :
It is a semantic relationship that specifies a contract between a specifier and a provider. It exist only between interfaces and classes or components and use cases and collaboration.
----------|
COMMON MECHANISMSCOMMON MECHANISMS
1. NOTES : A note is a graphical symbol for
rendering constraints or comments attached to
a element.
2.STEREOTYPES : Allows to create new kind of building blocks similar to existing ones but specific to our problem
<<exception>
Underflow
3. TAGGED VALUES :Tagged value is
denoted by (name, value) pair that describes the
property of a model element.
Server
{Processor = 3}
4. CONSTRAINTS : Graphically, a
Constraint is rendered as a string enclosed by
Brackets and placed near the associated element.
Portfolio
Bank Account
{secure} Corporation
Person
Gender :{male , female}
{or}
USE CASE DIAGRAMUSE CASE DIAGRAM
• A use case diagram specifies the behavior of a system or a part of a system and is a description of a set of sequences of actions.
• Components of Use Case Model : Actor Use Case
• Relationships in Use Case Model : communicates Relationship :
<<communicates>> Use Case
uses or includes Relationship :Place order Validate Customer
extends Relationship:
Base usecase
Place order
Overdraw amount<<uses>> <<extends>>
.
Get balance
Validate user
Withdraw money
Maintain ATM
Overdraw money
<<extends>>
<<extends>><<uses>>
<<Uses>>
Maintenance person
Save transaction
Database
customer
CLASS DIAGRAMCLASS DIAGRAM• A class diagram shows a set of classes,
interfaces, collaborations and their relationships.
• Class diagram contains following things : Classes Interfaces Collaboration Dependency, Generalization and
Association relationships.
• It may contain notes and constraints.
.
Company
Department Office
name : Name Address : string
Person
Name : String
Eid : Integer
getPhoto(P:Photo)
getContactInfo()
getPersonalInfo()
Head Quarters
generalization
0..1
1
1..* 1..*
Personnel_Record
Contact_Info
dependency
member
role
Tax ID
Salary Isecure information
Interface
SEQUENCE DIAGRAMSEQUENCE DIAGRAM
• Sequence diagram shows, for a particular scenario, the events that external actors generate, their order, and inter-system events.
.
: System
: CashierMake a new sale
enterItem( itemID , quantity )
Description , total
[more items]
loop
end sale
total with taxes
make payment(amount)
receipt
Process Sale Scenario
COLLABORATION DIAGRAMCOLLABORATION DIAGRAM
• Collaboration diagrams model the interactions between the object.
• It is the cross between an object diagram and sequence diagram.
• Notations used : Object Actor Message
..
..
1. Find user
2. Update user WebApp : user
interface
User validator2.1 Validate user
User database1.1 Lookup user
2.1 Look user
Collaboration Diagram
STATE CHART DIAGRAMSTATE CHART DIAGRAM
• A State Chart Diagram relates events and states. When an event is received, the next state depends on the current state as well as the event; a change of state caused by an event is called as transition.
• A State Diagram is a graph whose nodes are states and whose directed arcs are transitions states.
.
State Chart Diagram
ACTIVITY DIAGRAMACTIVITY DIAGRAM
• Activity diagram shows the flow from activity to activity within a system.
• Activity diagram commonly contains: Activity State Action State Transitions Objects Forks and Join Branching Swimlanes
.
Customer Sales Warehouse
Swimlanes
• Request Product
Process Order
O : order
[in progress]
Pull Material
Ship Order
Receive order
Bill customer
Pay Bill
b: bill [paid]
b: bill [unpaid]
O : order [filled]
state
Close order
• Final state
COMPONENT DIAGRAMCOMPONENT DIAGRAM• A component is a physical replaceable part of
a system that conforms to and provides the realization of a set of interfaces.
• COMPONENTS AND CLASSES :1. Class are logical abstraction; while
components represent physical thing.2. Component represent physical packaging of
logical components.3. Classes may have attributes and operations.
Component have only operations that are reachable only through their interfaces.
THANK YOU…!!!THANK YOU…!!!