Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,14 @@
Object Class new: Point(x, y)
Point method: initialize(x, y) x := x y := y ;
Point method: _x @x ;
Point method: _y @y ;
Point method: << "(" << @x << ", " << @y << ")" << ;
Object Class new: Circle(x, y, r)
Circle method: initialize(x, y, r) x := x y := y r := r ;
Circle method: _x @x ;
Circle method: _y @y ;
Circle method: _r @r ;
Circle method: << "(" << @x << ", " << @y << ", " << @r << ")" << ;
Circle classMethod: newFromPoint(aPoint, r) self new(aPoint _x, aPoint _y, r) ;

View file

@ -0,0 +1,9 @@
: testPoly
| p c |
Point new(3, 4) ->p
p println
System.Out "Attributes of this point are : " << p _x << " and " << p _y << cr
Circle new(5, 6, 7.1) ->c
c println
System.Out "Attributes of this circle are : " << c _x << ", " << c _y << " and " << c _r << cr
Circle newFromPoint(p, 2) println ;