title: Boolean in Mutator Method
body: <p>I have a project in which I'm working on a class that has mutator and accessor methods. <strong>For my mutator methods, I have to return a boolean. "True - indicating the height is within range and that the Object's value has been modified." False, obviously, if it isn't. Height being in range means it's between 1-10 inclusive.</strong> </p>
  
  <p>I know how to write a boolean, but how would I do that inside a mutator method? <em>Usually</em>, and keep in mind I'm very new, I would write something along the following:</p>
  
  <pre><code>public void setHeight(int newHeight){
      height = newHeight;
  }
  </code></pre>
  
  <p>How would I place my boolean inside of the mutator method, as well as ensure that the height is within its proper range?
  My boolean would be something along the lines of: </p>
  
  <pre><code>if (height &gt;= 1 &amp;&amp; height &lt;= 10) {
      System.out.println("It's perfect!");
  } else {
      System.out.println("Not right!");
  }
  </code></pre>