If Else Method

Your Task:

Define a method that receives input and outputs a response using if/else logic. Call this method several times with different inputs in your main() method, and output the results to the terminal.

Requirements:

  • Your method must use at least one input parameter
  • Your  method must use a return statement to output a value, which is not the same as using System.out.println()
  • The method has to use if/else logic in a way that affects the final result
  • The method has to return a value no matter what, so be sure to use an else{} clause.
  • Do not use a System.out.println() in your if/else method.
  • DO use the System.out.println() method in your main() method when you call your if/else method.