:main
# Make a new Ball and name it red_ball
red_ball = Ball("red", 2)
# Examine its properties
print(red_ball.name())
print(red_ball.volume())
end
# Constructors can take parameters (that automatically become properties)
constructor Ball(color, radius)
# Objects can also have functions (closures)
:volume
return 4/3 * {pi} * (radius ** 3)
end
:name
return "a " + color + " ball with radius " + radius
end
end