classdef Shape 
  properties (Access = protected)
    x = 0;
    y = 0;
	scale = 1;
    hnd = [];
  end
   
  methods 
    function obj = Shape( x, y )
      obj.x = x;
      obj.y = y;
    end
       
    function disp( obj )
      fprintf( 'Shape-Pos. = (%g,%g) \n', obj.x, obj.y ); 
    end
       
    function obj = move( obj, dx, dy )
      obj.x = obj.x + dx; 
      obj.y = obj.y + dy; 
    end
	
	function obj = mtimes( obj, scale )
	  obj.scale = obj.scale * scale;
    end
    
    function obj = clear( obj )
      if( ~isempty(obj.hnd) && ishandle(obj.hnd) )
        delete( obj.hnd );
        obj.hnd = [];
      end        
    end    
  end
   
  % Virtuelle Funktionen
  methods (Abstract)
    obj = draw( obj );
  end
end