%
%   >> g1 = Shape( 0, 0 )
%   >> g1 = g1.move( 1, -2 )
% 
classdef Shape
    
  properties (Access = protected)
    x = 0;
    y = 0;
  end
   
  methods
    function obj = Shape( x, y )
      obj.x = x;
      obj.y = y;
    end
       
    function obj = move( obj, dx, dy )
      obj.x = obj.x + dx; 
      obj.y = obj.y + dy; 
    end
    
    function print( obj ) 
       fprintf( 'Shape: (x,y) = (%g,%g) \n', obj.x, obj.y );  
    end
  end
    
end  % end classdef 