Task

Create two classes   Point(x,y)   and   Circle(x,y,r)   with a polymorphic function print, accessors for (x,y,r), copy constructor, assignment and destructor and every possible default constructors




Class MyPoint
 
  BeginProtect
    x.i
    y.i
  EndProtect
 
  Public Method GetX()
    MethodReturn This\X
  EndMethod
 
  Public Method GetY()
    MethodReturn This\Y
  EndMethod
 
  Public Method SetX(n)
    This\X=n
  EndMethod
 
  Public Method SetY(n)
    This\Y=n
  EndMethod
 
  Public Method Print()
    PrintN("Point")
  EndMethod
 
  Public Method Init(x=0,y=0)
    This\x=x
    This\y=y
  EndMethod
EndClass
 
Class Circle Extends MyPoint
 
  Protect  Radie.i
 
  Public Method Circel(x=0, y=0, r=0)
    This\X  = x
    This\y  = y
    This\Radie=r
  EndMethod
 
  Public Method GetRadie()
    MethodReturn This\Radie
  EndMethod
 
  Public Method SetRadie(n)
    This\Radie = n
  EndMethod
 
  Public Method Print()
    PrintN("Circle: "+ _
    " X= "+Str(This\X)+ _
    " Y= "+Str(This\Y)+ _
    " R= "+Str(This\Radie))
  EndMethod
 
EndClass