• Mutator
      public void setColor (  Color c   ){
        body.setColor(c);
        tail.setColor(c);
      }
      
  • Accessor
      public Color getColor (){
        return body.getColor();
      }
      
  • Why?
      Hint: Doesn't make sense!
      // Dr. Dale says "Never gonna happen"  Why?  
      //public void move(Location p){
      
  • local variables
      public void moveTo(Location p){
    
         double dx, dy;
    
         dx = p.getX()-body.getX();
         dy = p.getY()-body.getY();
    
         move (dx,dy);
      }
      
  • Why?
      Hint: Move is relative.
      // Dr. Dale says "Move method is easier to write than moveTo." 
      // Why does she think that???  
      public void move(double dx, double dy){
        body.move(dx,dy);
        tail.move(dx,dy);
      }