Question

1. Write a Java method to determine whether a given year is a leap year using the following

definition (do not use variations of this definition):

A year with 366 days is a leap year. A year is a leap year if it is divisible by four

(for example, 1980), except that it is not a leap year if it is divisible by 100 (for

example, 1900); however, it is a leap year if it is divisible by 400 (for example,

2000). There were no exceptions before the introduction of the Gregorian

calendar on October 15, 1582 (1500 was a leap year).

Test this method in a driver program.

[20 points]

Question image 1