Académique Documents
Professionnel Documents
Culture Documents
Representation of a Class
day day
just show name Date()
month month
year getDay() year
getMonth()
getYear() Date()
show name & getDayOfWeek() getDay()
variables nextDay() getMonth()
daysBetween() getYear()
Stereotype Properties getDayOfWeek()
nextDay()
show name &
«class» Vehicle daysBetween()
methods
Date {abstract}
Class Variables & Methods show name,
optional: show optional: show variables &
stereotype, in «» properties, in {} Underline any class variables and methods
methods.
«class» Or write static as part of the
{abstract} declaration.
«interface»
Suppressing the visibility marker does not You can show the declaration, or just
mean the visibility is undefinded or public! the name of methods & variables
You can show the visibility markers (+, #, −, @), show the Java visibility modifiers (public,
protected, private or <package>) as part of the declaration, or suppress all visibility information.
Association (uses a)
Human Head
Multiplicity:
A Turtle walks on
1 means: exactly one
exactly one floor. A Human has a Head. A Head is an
0..1 means: zero or one
A floor may be used by inherent part of a Human, it is
1..* means: one or more
multiple turtles. "exclusively owned" by the Human.
* means: zero, one or more
Inheritance (is a)
Shape
ActionListener is an TestApplet is an
EventListener. ActionListener.
Circle Rectangle ActionListener extends TestApplet implements
EventListener. ActionListener.