The Year class is very simple. Its whole purpose in life is just to wait until it is passed a value and then to determine if that value is a leap year or not. One design we could use here is that of the Temperature class. In that case the temperature was stored as an instance variable, and public methods were used to set and get the temperature as either a Fahrenheit or Celsius value.
Another design that would be appropriate here is to model Year after the Math class -- that is, as a utility class that provides a useful method, but which is not designed to be instantiated at all. Since this latter design is simpler, let's adopt it.
The isLeapYear() method should be a public method that takes a single int parameter and returns the boolean value true if its parameter is a leap year and false otherwise. In terms of its algorithm, this method should use an if-else control structure to test whether a year is divisible by 400, by 100, and so on. To determine if an integer is divisible by another integer, you can use the mod operator (%). For example, if N % 100 equals 0, then N is divisible by 100. That is, N is divisible by 100 if dividing it by 100 leaves a remainder of 0:
if (N % 100 == 0) ...
You may find it helpful to draw a flowchart for the isLeapYear(). See Chapter 3 to review the guidelines for drawing flowcharts.