next up previous
Next: Problem Decomposition Up: In the Laboratory: The Previous: In the Laboratory: The

Problem Description

A year is a leap year if it is evenly divisible by 4 but not evenly divisible by 100 unless it is also evenly divisible by 400. So 1996 was a leap year. But 1900 was not a leap year because, although it is divisible by 4, it is also divisible by 100 and not by 400. 2000 is a leap year because it is divisible by 400.

Design and write a Java applet that allows the user to enter a year (as an integer) and reports whether the year entered is a leap year or not.



Ralph Morelli {Faculty}
12/22/1999