Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

TheDamian's scratchpad

by TheDamian (Priest)
on Jun 01, 2004 at 18:58 UTC ( #358396=scratchpad: print w/replies, xml ) Need Help??

class Shape { has $.x; has $.y; method moveTo($newx, $newy) { $.x = $newx; $.y = $newy; } method rMoveTo($newx, $newy) { .moveTo($.x + $newx, $.y + $newy); } } class Rectangle is Shape { has $.width is rw; has $.height is rw; method draw() { print "Drawing a Rectange at:($.x,$.y), width $.width, height +$.height\n"; } } class Circle is Shape { has $.radius; method draw() { print "Draw a Circle at:($.x,$.y), radius $.radius\n"; } } @scribble = (>10, y=>20, width=>5, height->6), Circle. +new(x=>15, y=>25, radius=>8)); for @scribble -> $ashape { $ashape.draw; $ashape.rMoveTo(100, 100); $ashape.draw; } $arectangle =>0, y=>0, width=>15, height=>15); $arectangle.width = 30; $arectangle.draw;
Log In?

What's my password?
Create A New User
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2017-02-26 21:51 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (376 votes). Check out past polls.