Uml Class Diagram (Autosaved)
Uml Class Diagram (Autosaved)
]
Classes Amity Institute of Information Technology
operations
Class Attributes Amity Institute of Information Technology
Person
/ age : Date
Class Attributes (Cont’d) Amity Institute of Information Technology
Person
Attributes can be:
+ name : String
+ public
# address : Address
# protected
# birthdate : Date
- private
/ age : Date
/ derived
- ssn : Id
Class Operations Amity Institute of Information Technology
Person
name : String
address : Address
birthdate : Date
ssn : Id
eat Operations describe the class behavior
sleep and appear in the third compartment.
work
play
Class Operations (Cont’d) Amity Institute of Information Technology
PhoneBook
SmokeAlarm
Responsibilities
• dependencies
• generalizations
• associations
Dependency Relationships Amity Institute of Information Technology
CourseSchedule
Course
add(c : Course)
remove(c : Course)
Generalization Relationships Amity Institute of Information Technology
Person
A generalization connects a subclass
to its superclass. It denotes an
inheritance of attributes and behavior
from the superclass to the subclass and
indicates a specialization in the subclass
of the more general superclass.
Student
Generalization Relationships (Cont’d) Amity Institute of Information Technology
Student Employee
TeachingAssistant
Association Relationships Amity Institute of Information Technology
Student Instructor
Association Relationships (Cont’d) Amity Institute of Information Technology
Student Instructor
1..*
Association Relationships (Cont’d) Amity Institute of Information Technology
Student Instructor
1..*
Association Relationships (Cont’d) Amity Institute of Information Technology
membership
Student Team
1..* 1..*
Association Relationships (Cont’d) Amity Institute of Information Technology
member of
1..* 1..*
Student Team
1 president of 1..*
Association Relationships (Cont’d) Amity Institute of Information Technology
Router DomainNameServer
Association Relationships (Cont’d) Amity Institute of Information Technology
Registration
modelNumber
serialNumber
warrentyCode
Product Warranty
Association Relationships (Cont’d) Amity Institute of Information Technology
next
LinkedListNode
previous
Association Relationships (Cont’d) Amity Institute of Information Technology
Engine
Car
Transmission
Association Relationships (Cont’d) Amity Institute of Information Technology
Scrollbar
1 1
Window Titlebar
1 1
Menu
1 1 .. *
Interfaces Amity Institute of Information Technology
A realization relationship
<<interface>>
connects a class with an
ControlPanel
interface that supplies its
specifier behavioral specification. It is
rendered by a dashed line with
a hollow triangle towards the
specifier.
implementation
VendingMachine
Interfaces Amity Institute of Information Technology
inputStream
FileWriter
{file must not be locked}
T A parameterized class or
LinkedList template defines a family of
potential elements.
To use it, the parameter must be
T bound.
1 .. *
A template is rendered by a small
dashed rectangle superimposed on
the upper-right corner of the class
rectangle. The dashed rectangle
contains a list of formal
parameters for the class.
Parameterized Class (Cont’d) Amity Institute of Information Technology
T
LinkedList Binding is done with the <<bind>>
stereotype and a parameter to
supply to the template. These are
T
adornments to the dashed arrow
1..*
denoting the realization
relationship.
Here we create a linked-list of
<<bind>>(Name) names for the Dean’s List.
DeansList
Enumeration Amity Institute of Information Technology
<<exception>> <<exception>>
KeyException SQLException
Packages Amity Institute of Information Technology
Compiler
FrontEnd BackEnd
Packages (Cont’d) Amity Institute of Information Technology
Compiler
FrontEnd BackEnd
Packages (Cont’d) Amity Institute of Information Technology
JavaCompiler Java
Component Diagram Amity Institute of Information Technology
path.dll collision.dll
ISelfTest
“parent” “parent”
signal.cpp
interp.cpp version = 4.1
Modeling source code.
[Booch, 99]
irq.h device.cpp
component
spell-check
Dictionary interfaces
synonyms
<<database>>
stereotyped
Account component
usage dependency
component
ATM-GUI
realization dependency
[Rumbaugh,99]
server:HostMachine
<<database>>
meetingsDB
Deployment diagram
of a client-server
:Scheduler reservations system.
<<direct channel>>
clientMachine:PC
[Rumbaugh,99]
:Planner
Student
Student Person
Student
Billing System
Registrar
simple state
selecting
verifying
select another course
check schedule
sign schedule
checking schedule
scheduled
an Order Line
check()
* prepare()
An iteration marker, such as * (as
shown), or *[i = 1..n] , indicates
that a message will be repeated as
Iteration indicated.
marker
prepare()
Condition
* prepare()
Object
check()
Creation
1: prepare() Message
: Order Self-Delegation
5: needToReorder()
[Fowler,97]
Multiple Trigger
Check
Cancel Authorize
Line
Order [failed]
Payment
Item
Assign to
Order
Synchronization Condition
[need to
reorder] Reorder
Item
[stock assigned to
all line items and
payment authorized]
Dispatch
Order