/** A class that tests the GregorianYear class. */ public class GregorianYearTester { /** Contains the main method. @param args not used */ public static void main(String[] args) { // Constructs a new GregorianYear object with the year set to zero. GregorianYear myYear = new GregorianYear(); // Sets the year to 2000. myYear.setYear(2000); // Gets the year. System.out.println(myYear.getYear()); // Prints the year. System.out.println("Expected: 2000"); // Prints the expected value, which is 2000. // Prints the results. System.out.println(myYear.isLeapYear()); // Prints true if the year is a leap year and false otherwise. System.out.println("Expected: true"); // Prints the expected value, which is true. } }