title: How to write a private method that returns True for certain peramaters?
body: <p>So the exact wording is, 
  "Write a private method isValid(aRating) that returns true if the given rating is valid, which is between 1-10." </p>
  
  <pre><code>private void isValid(aRating)
  {
  
  }
  </code></pre>
  
  <p>What Goes in the Method above in order to return a true value if given rating is valid, Validity meaning a number 1-10.</p>
  
  <p>This is what i attempted, the instructor wants it the "proper way" This is just an example of what i attempted at, It is a different program completely.(Ignore if confusing).</p>
  
  <pre><code>private void isValid(int hour,  int minute) 
  {
      if (hour &gt;= 0 &amp;&amp; hour &lt;=23) 
      {
          System.out.println("Hour is valid");
          hourIsValid = true;
      } 
  
      else 
      {
          System.out.println("Hour is not valid");
          hourIsValid = false;
          System.exit(0);
      }
  }
  </code></pre>
  
  <p>Would this be correct</p>
  
  <pre><code>    private boolean isValid(int aRating)
  {                     
       if (aRating &gt;= 1 &amp;&amp; aRating &lt;= 10)
           return true;
       else
           return false;
  }
  </code></pre>