/**
 * This application/main class is used to test the "switch" statement, a control
 * structure in Java.  
 *
 * JDEP183H Fall 2008
 * @author Leen-Kiat Soh
 * @version 1.0
 */

import java.awt.*;

class TestSwitch  {

   public static void main(String[] args)  {

      int x, y;

      x = Integer.parseInt(args[0]);
      y = Integer.parseInt(args[1]);

      if (x = y) 
         System.out.println("they are equal");
      else
         System.out.println("they are not");

      /*


      if ((x < 10) || !(y != x))  
         System.out.println("what the heck?");
      else
         System.out.println("Oh, I see!");
         */



      // what is a "break"?
      //
      /*
      int selection = 5;
      switch (selection)  {
         case 0 : System.out.println(0); break
         case 1 : System.out.println(1); break;
         case 2 : System.out.println(2); break;
         case 3 : System.out.println(3); break;
         default: System.out.println("I am here!"); break;
      }


      // a cool way of using "break"s.
      int input = Integer.parseInt(args[0]);
      switch (input)  {
         case 10:
         case 9:
         case 8:  System.out.println("Master"); 
                  System.out.println("Master again");
                  break;
         case 7: 
         case 6:  System.out.println("Journeyman"); break;
         case 5:
         case 4:  System.out.println("Apprentice"); break;
         default: System.out.println("Error: Invalid data");
      }

      
      // will the following compile?
      String input2 = "Ali Baba";
      switch  (input2)  {
	 case "Ali Baba":  System.out.println("it works"); break;
	 default: System.out.println("it does not work"); break;

	 }

      */
   }
   
}


