/**
 * A simple example that uses nested if statements
 *
 * @author  Prof. David Bernstein, James Madison University
 * @version 1.0
 */
public class IfExample2
{
    public static void main(String[] args)
    {
       int       income;
       String    level;

       income = 0;
       level  = "Low";


       // Missing code (to determine the income)


       //[0    Nested if statements (one style)
       if (income < 30000) 
       {
          level = "Low";
       }
       else
       {
          if (income < 60000) 
          {
             level = "Middle";
          }
          else
          {
             level = "High";
          }
       }

       //]0



       //[1    Nested if statements (another  style)
       if      (income < 30000) level = "Low";
       else if (income < 60000) level = "Middle";
       else                     level = "High";

       //]1
    }

}
