class MutablePoint

def initialize(x,y); @x, @y = x, y; end

def x; @x; end # The getter method for @x

def y; @y; end # The getter method for @y

def x=(value) # The setter method for @x

@x = value

end

def y=(value) # The setter method for @y

@y = value

 end 

end
Advertisements