// COMP 1631 (Fall 2006) // Author(s): 1631 instructors // // Lab Test code - Monday solution // // This class is just a holder for the main method where students are required // to insert code (which will involve if statements). public class IffyMonday { public static void main(String[] args) { int numLegs, numWings; numLegs = Console.readInt("Enter the number of legs: "); numWings = Console.readInt("Enter the number of wings: "); if ((numLegs == 8) && (numWings == 0)) { System.out.println("This is a spider."); } // if else if ((numLegs == 6) && (numWings == 4)) { System.out.println("This is a fly."); } // else if else { System.out.println("This is neither a spider nor a fly."); } // else } // end main } // end class IffyMonday