Circular Rectangular Elliptical Turtle Turtle Turtle -------------------------------------------------- (behaviors/methods) drawOn(canvas) drawOn(canvas) drawOn(canvas) moveBy(vector) moveBy(vector) moveBy(vector) scale(factor) scale(factor) scale(factor) setColor(color) setColor(color) setColor(color) setStyle(style) setStyle(style) setStyle(style) turn(angle) turn(angle) turn(angle) forward(dist) forward(dist) forward(dist)
Shape | ----------------+---------------- | | | Circle Rectangle Ellipse
Shape ------------------------ (behaviors/methods) drawOn moveBy scale setColor setStyle setPosition getPosition
Circular Rectangular Elliptical Turtle Turtle Turtle -------------------------------------------------- (behaviors/methods) drawOn(canvas) drawOn(canvas) drawOn(canvas) moveBy(vector) moveBy(vector) moveBy(vector) scale(factor) scale(factor) scale(factor) setColor(color) setColor(color) setColor(color) setStyle(style) setStyle(style) setStyle(style) turn(angle) turn(angle) turn(angle) forward(dist) forward(dist) forward(dist)
Circular Rectangular Elliptical Turtle Turtle Turtle -------------------------------------------------- (behaviors/methods) drawOn drawOn drawOn moveBy moveBy moveBy scale scale scale setColor setColor setColor setStyle setStyle setStyle turn turn turn forward forward forward
Circular Rectangular Elliptical
Turtle Turtle Turtle
--------------------------------------------------
(behaviors/methods)
drawOn drawOn drawOn
moveBy moveBy moveBy
scale scale scale
setColor setColor setColor
setStyle setStyle setStyle
turn turn turn
forward forward forward
Circular Rectangular Elliptical Turtle Turtle Turtle -------------------------------------------------- (behaviors/methods) COMMON-1 COMMON-1 COMMON-1
Circular Rectangular Elliptical Turtle Turtle Turtle -------------------------------------------------- (behaviors/methods) COMMON-1 COMMON-1 COMMON-1
Shape | ----------------+---------------- | | | Circle Rectangle Ellipse Shape ------------------------ (behaviors/methods) drawOn moveBy scale setColor setStyle setPosition getPosition
COMMON-1 Shape
Methods Methods
(New) (Existing)
--------- ----------
drawOn drawOn
moveBy moveBy
scale scale
setColor setColor
setStyle setStyle
turn setPosition
forward getPosition
Circular Rectangular Elliptical Turtle Turtle Turtle -------------------------------------------------- (behaviors/methods) COMPONENT-1 COMPONENT-1 COMPONENT-1 turn turn turn forward forward forward
Circular Rectangular Elliptical
Turtle Turtle Turtle
--------------------------------------------------
(behaviors/methods)
COMPONENT-1 COMPONENT-1 COMPONENT-1
turn turn turn
forward forward forward
Shape | ----------------+---------------- | | | Circle Rectangle Ellipse
CircularTurtle RectangularTurtle EllipticalTurtle | | | circle rectangle ellipse | | | +---- aCircle +---- aRectangle +---- anEllipse
CircularTurtle has-a Circle RectangularTurtle has-a Rectangle EllipticalTurtle has-a Ellipse
Circular Rectangular Elliptical Turtle Turtle Turtle -------------------------------------------------- (components/ivars) circle rectangle ellipse (behaviors/methods) COMPONENT-1 COMPONENT-1 COMPONENT-1 turn turn turn forward forward forward
CircularTurtle RectangularTurtle EllipticalTurtle | | | circle rectangle ellipse | | | +---- aCircle +---- aRectangle +---- anEllipse
Shape
|
----------------+----------------
| | |
Circle Rectangle Ellipse
Shape
------------------------
(behaviors/methods)
drawOn(canvas)
moveBy(vector)
scale(factor)
setColor(color)
setStyle(style)
CircularTurtle has-a Shape RectangularTurtle has-a Shape EllipticalTurtle has-a Shape
CircularTurtle RectangularTurtle EllipticalTurtle | | | circle rectangle ellipse | | | +---- aShape +---- aShape +---- aShape
CircularTurtle RectangularTurtle EllipticalTurtle | | | shape shape shape | | | +---- aShape +---- aShape +---- aShape
Circular Rectangular Elliptical Turtle Turtle Turtle -------------------------------------------------- (components/ivars) shape shape shape (behaviors/methods) COMPONENT-1 COMPONENT-1 COMPONENT-1 turn turn turn forward forward forward Component "shape" is object type "Shape"
CircularTurtle RectangularTurtle EllipticalTurtle | | | shape shape shape | | | +---- aShape +---- aShape +---- aShape Circular Rectangular Elliptical Turtle Turtle Turtle -------------------------------------------------- COMPONENT-1 COMPONENT-1 COMPONENT-1 turn turn turn forward forward forward Component "shape" is object type "Shape"
CircularTurtle RectangularTurtle EllipticalTurtle | | | shape shape shape | | | +---- aShape +---- aShape +---- aShape
Turtle | ----------------+---------------- | | | Circular Rectangular Elliptical Turtle Turtle Turtle
CircularTurtle is-a Turtle RectangularTurtle is-a Turtle EllipticalTurtle is-a Turtle
Turtle | shape | +---- aShape
COMPONENT-1 (group) turn forward
Turtle | ----------------+---------------- | | | Circular Rectangular Elliptical Turtle Turtle Turtle
Turtle ------------------------ (components/ivars) shape (behaviors/methods) drawOn(canvas)* moveBy(vector)* scale(factor)* setColor(color)* setStyle(style)* turn(angle) forward(dist) *delegated method Component "shape" is object type "Shape"
Circular Rectangular Elliptical
Turtle Turtle Turtle
--------------------------------------------------
(behaviors/methods)
drawOn(canvas) drawOn(canvas) drawOn(canvas)
moveBy(vector) moveBy(vector) moveBy(vector)
scale(factor) scale(factor) scale(factor)
setColor(color) setColor(color) setColor(color)
setStyle(style) setStyle(style) setStyle(style)
turn(angle) turn(angle) turn(angle)
forward(dist) forward(dist) forward(dist)
Turtle ------------------------ (components/ivars) shape (behaviors/methods) drawOn(canvas)* moveBy(vector)* scale(factor)* setColor(color)* setStyle(style)* turn(angle) forward(dist) *delegated method Component "shape" is object type "Shape"