Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
15
Task/Classes/Ring/classes-2.ring
Normal file
15
Task/Classes/Ring/classes-2.ring
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
New point # create new object using the point class
|
||||
{ # access the new object attributes and methods
|
||||
x = 10 # set the x attribute to 10
|
||||
y = 20 # set the y attribute to 20
|
||||
z = 30 # set the z attribute to 30
|
||||
print() # call the print method
|
||||
} # end of object access
|
||||
|
||||
|
||||
Class Point # define the Point class
|
||||
x y z # the class contains three attributes x, y & z
|
||||
func print # define the print method
|
||||
see x + nl + # print the x attribute
|
||||
y + nl + # print the y attribute
|
||||
z + nl # print the z attribute
|
||||
Loading…
Add table
Add a link
Reference in a new issue