// COMP 1631 (Fall 2006) // Author(s): 1631 instructors // // Lab Test code - Thursday solution // // This class is just a holder for the main method where students are required // to insert code (that will involve if statements). public class IffyThursday { public static void main(String[] args) { int numPositions, numPieces; numPositions = Console.readInt("Enter the number of board positions: "); numPieces = Console.readInt("Enter the number of playing pieces: "); if ((numPositions == 64) && (numPieces == 32)) { System.out.println("This is a chess set."); } // if else if ((numPositions == 24) && (numPieces == 30)) { System.out.println("This is a backgammon set."); } // else if else { System.out.println("This is neither a chess set nor a backgammon set."); } // else } // end main } // end class IffyThursday