/**
 * An example of a sequence of if statements
 *
 * @author  Prof. David Bernstein, James Madison University
 * @version 1.0
 */
public class IfExample5
{
    public static void main(String[] args)
    {
       int        height, idealWeight;

       height      = 0;
       idealWeight = 0;

       // Missing code (to determine the height)


       //[0//[1
       //    One approach (that might not work)
       if (height < 58) idealWeight = 111;
       if (height < 59) idealWeight = 113;
       if (height < 60) idealWeight = 115;

       //]0//]1


       System.out.println("Ideal Weight: "+idealWeight);

       //[0    
       //    Another approach (that might not work)
       if (height < 60) idealWeight = 115;
       if (height < 59) idealWeight = 113;
       if (height < 58) idealWeight = 111;

       //]0

       System.out.println("Ideal Weight: "+idealWeight);


       //[1    
       //    Still another approach (that might not work)
       if      (height < 58) idealWeight = 111;
       else if (height < 59) idealWeight = 113;
       else if (height < 60) idealWeight = 115;

       //]1

       System.out.println("Ideal Weight: "+idealWeight);

    }

}
