/* Mike Leonard * L Train919@aol.com * MoreControl.java * * Created on February 27, 2003, 1:50 PM */ package assignment6; import IO.Keyboard; /** * * @author leonarm1 */ public class MoreControl { /** Creates a new instance of MoreControl */ public MoreControl() { } /** * @param args the command line arguments */ public static void main(String[] args) { System.out.println("Determining if February Date is Valid"); System.out.println("What year?"); int year = Keyboard.readInt(); System.out.println("What day?"); int day = Keyboard.readInt(); if(year < 1582){ System.out.println("Bad year, sorry!"); } else{ if(day > 29){ System.out.println("I'm sorry, February never has that day!"); } else{ if(day < 29){ System.out.println("This is a valid day for February " + year); } else{ if(year % 4 != 0){ System.out.println("This is not a valid day for February " + year); } else{ if(year % 100 != 0){ System.out.println("This is a valid day for February " + year); } else{ if(year % 400 == 0){ System.out.println("This is a valid day for February " + year); } else{ System.out.println("I'm sorry, February " + year + " doesn't have that day!"); } } }}}}}}