title: The use of protected member variables from child class and abstract parent
body: <p>According to our professor, the use of protected visibility should be avoided at all costs. However, I'm a little puzzled as to why. Say We have this for example:</p>
  
  <pre><code>public abstract class Animal {
  
      private int maxSpeed;
  
      public Animal() {} 
  
      public abstract void setMaxSpeed();
  
  }
  </code></pre>
  
  <p>Where each <code>Animal</code> would have a max speed that would need to be defined later in the child class. However, throwing this in:</p>
  
  <pre><code>public class Tutrle extends Animal {
  
      public Tutrle() {
  
      }
  
      @Override
      public void setMaxSpeed() {
  
  
      }
  
  }
  </code></pre>
  
  <p>There is no way to be able to access the <code>maxSpeed</code> variable from within the overridden <code>setMaxSpeed()</code> method. Although a solution would be to set <code>maxSpeed</code> via the constructor of the <code>Animal</code> class, wouldn't be better to set the <code>maxSpeed</code> variable to <code>protected</code> and have it accessible to all child sub-classes to be defined later?</p>