Login
Logout
Login / Get an account
Logout
view
edit
history
discuss
Exercise 1 solution using inheritance
abstract
Lamp
xor
shape
ball
square
diamond
TrafficLightSystem
Lamps
Red
:
Lamp
[
no
diamond
]
Yellow
:
Lamp
[
no
square
]
Green
:
Lamp
[
ball
]
allBalls
?
[
all l
:
Lamp
|
l
.
shape
.
ball
]
xor
orientation
vertical
[
allBalls
]
horizontal
[
Red
.
shape
.
square
&&
Yellow
.
shape
.
diamond
]
Configure with ClaferConfigurator
Back to
country specific features
Site
Front page
All pages
Categories
Random page
Recent activity
Upload a file
Help
This page
Raw page source
Printable version
Delete this page