Simple Animated Turtle Turtle -------------------------------- (behaviors/methods) drawOn(canvas) drawAnimationOn(canvas) moveBy(vector) moveBy(vector) scale(factor) scale(factor) setColor(color) setColor(color) setStyle(style) setStyle(style) turn(angle) turn(angle) forward(dist) forward(dist)
Shape | ----------------+---------------- | | | Circle Rectangle Ellipse
Shape ------------------------ (behaviors/methods) drawOn(canvas) moveBy(vector) scale(factor) setColor(color) setStyle(style)
Simple Animated Turtle Turtle -------------------------------- (behaviors/methods) drawOn(canvas) drawAnimationOn(canvas) moveBy(vector) moveBy(vector) scale(factor) scale(factor) setColor(color) setColor(color) setStyle(style) setStyle(style) turn(angle) turn(angle) forward(dist) forward(dist)
Simple Animated Turtle Turtle -------------------------------- (behaviors/methods) drawOn drawAnimationOn moveBy moveBy scale scale setColor setColor setStyle setStyle turn turn forward forward
Simple Animated
Turtle Turtle
--------------------------------
(behaviors/methods)
drawOn drawAnimationOn
moveBy moveBy
scale scale
setColor setColor
setStyle setStyle
turn turn
forward forward
Simple Animated Turtle Turtle -------------------------------- (behaviors/methods) COMMON-1 COMMON-1 drawOn drawAnimationOn
Simple Animated Turtle Turtle -------------------------------- (behaviors/methods) COMMON-1 COMMON-1 drawOn drawAnimationOn
Shape | ----------------+---------------- | | | Circle Rectangle Ellipse Shape ------------------------ (behaviors/methods) drawOn moveBy scale setColor setStyle
COMMON-1 Shape
Methods Methods
--------- ----------
moveBy moveBy
scale scale
setColor setColor
setStyle setStyle
turn
forward
Simple Animated Turtle Turtle -------------------------------- (behaviors/methods) COMPONENT-1 COMPONENT-1 COMMON-1 COMMON-1 drawOn drawAnimationOn
Simple Animated
Turtle Turtle
--------------------------------
(behaviors/methods)
COMPONENT-1 COMPONENT-1
COMMON-1 COMMON-1
drawOn drawAnimationOn
Shape | ----------------+---------------- | | | Circle Rectangle Ellipse
SimpleTurtle AnimatedTurtle | | shape shape | | +---- aShape +---- aShape
SimpleTurtle has-a Shape AnimatedTurtle has-a Shape
Simple Animated
Turtle Turtle
--------------------------------
(behaviors/methods)
COMPONENT-1 COMPONENT-1
COMMON-1 COMMON-1
drawOn drawAnimationOn
SimpleTurtle AnimatedTurtle | | shape shape | | +---- aShape +---- aShape
Shape
|
----------------+----------------
| | |
Circle Rectangle Ellipse
SimpleTurtle AnimatedTurtle | | shape shape | | +---- aShape +---- aShape Simple Animated Turtle Turtle -------------------------------- (behaviors/methods) COMPONENT-1 COMPONENT-1 COMMON-1 COMMON-1 drawOn drawAnimationOn
SimpleTurtle AnimatedTurtle | | shape shape | | +---- aShape +---- aShape
Turtle | ---------+--------- | | Simple Animated Turtle Turtle
SimpleTurtle is-a Turtle AnimatedTurtle is-a Turtle
Turtle | shape | +---- aShape
COMPONENT-1 (group) COMMON-1 (group)
Turtle
|
---------+---------
| |
Simple Animated
Turtle Turtle
Simple Animated
Turtle Turtle
--------------------------------
drawOn drawAnimationOn
Turtle | ---------+--------- | | Simple Animated Turtle Turtle Turtle ------------------------ (components/ivars) shape (behaviors/methods) moveBy* scale* setColor* setStyle* turn forward SimpleTurtle ------------------------ drawOn* AnimatedTurtle ------------------------ drawAnimationOn *delegated method Component "shape" is object type "Shape"
Simple Animated
Turtle Turtle
--------------------------------
(behaviors/methods)
drawOn(canvas) drawAnimationOn(canvas)
moveBy(vector) moveBy(vector)
scale(factor) scale(factor)
setColor(color) setColor(color)
setStyle(style) setStyle(style)
turn(angle) turn(angle)
forward(dist) forward(dist)
Turtle | ---------+--------- | | Simple Animated Turtle Turtle Turtle ------------------------ (components/ivars) shape (behaviors/methods) moveBy(vector)* scale(factor)* setColor(color)* setStyle(style)* turn(angle) forward(dist) SimpleTurtle ------------------------ drawOn(canvas)* AnimatedTurtle ------------------------ drawAnimationOn(canvas) *delegated method Component "shape" is object type "Shape"