Professional Documents
Culture Documents
Modeling
Language
Rajeev Kumar
CSE, IIT-Kgp
PART I
A model is an abstraction
describing a system or a subset
of a system
A view depicts selected aspects of
a model
A notation is a set of graphical
or textual rules for representing
views
described by depicted by
airplane:System
scaleModel:Model flightSimulator:Model
blueprints:ViewfuelSystem:View
electricalWiring:Vie
Rajeev Kumar, CSE, IIT - Kgp 4
What is UML?
• Visualizing
• Specifying
• Constructing
• Documenting
Design View
Object
Collaboration
State
Activity
Name
A Class
represents a
Concept Attributes
Represents a set
of objects that Surface
have the same
Texture
Attributes,
Operations,
Relationships increaseTex()
descreaseTex()
and Semantics.
returnTex()
Can be mapped
directly to many
programming
languages Operations
Rajeev Kumar, CSE, IIT - Kgp 7
Class
Singleton
2 or more
instances
Surface [2..*]
Instance
scope (
+ Tex : Texture auto )
+ Col : Colour 1
# Dim : Dimension
Class
scope
Public + changeCol() ( static )
+ increaseTex()
+ decreaseTex()
Private - queryTex()
# findSibling()
Protected
+ rotateLeft() Template
+ rotateRight() parameters
+ enlarge()
A Relation is a Connection
between things (e.g.: Classes).
The three types or relations
are:
• Dependency
• Generalization
• Association
Dependency
FindRecord ReadBlock
B A
B depends on A
Rajeev Kumar, CSE, IIT - Kgp 11
Relations -
Generalization
generalized
Button
specialized
specialized
Generalization relationships
denote inheritance between
classes.
The children classes inherit the
attributes and operations of the
parent class.
Multiplicity
1 Is made of 1..*
House Bricks
Association
parent / aggregate
House
aggregation
12 1..* children
Windows Bricks
aggregation
1 1 children
A Realization is:
• A contract
• Used to model an Interface
processRec
record seekRecord
getNewData()
updateRec()
realization
A Realization relation...
• Classes
• Interfaces
• Collaborations
• Dependency / generalization
/ association
Cardinality
WristWatch Association
11 1 1 1
2 1 2 1
Operations
Attributes
Rajeev Kumar, CSE, IIT - Kgp 19
Objects
An Object is a
physical instantiation of a class.
abstract concrete
Rajeev Kumar, CSE, IIT - Kgp 20
Objects
Named Instance
op : Operations
op : orphan instance
underlined op : Operations
An Object Diagram:
• objects
• links
• attribute value
c : Company Object
d1 : Department d2 : Department
e2 : Employee e2 : Employee
Attribute
e3 : Employee value
c :- Contact
name = “Satish” Rajeev Kumar, CSE, IIT Kgp 23