/** Calendar.java - include helpful static methods dealing with calendars. * We include a main method to test the functions. */ public class Calendar { public static boolean isLeapYear(int y) { // YOU NEED TO IMPLEMENT return true; } // Return the # of days in the month. public static int monthLength(int month, int year) { // YOU NEED TO IMPLEMENT return 0; } // The Julian day is the number of days since 12/31 of the previous year. // For example, the Julian day of February 1 is 32. public static int julian(int month, int day, int year) { // YOU NEED TO IMPLEMENT return 0; } public static String zodiac(int month, int day) { // YOU NEED TO IMPLEMENT return "error"; } public static void main(String [] args) { System.out.printf("Test of isLeapYear():\n"); System.out.printf("1900 was a leap year - %s\n", isLeapYear(1900) ? "true" : "false"); System.out.printf("2000 was a leap year - %s\n", isLeapYear(2000) ? "true" : "false"); System.out.printf("2004 was a leap year - %s\n", isLeapYear(2004) ? "true" : "false"); System.out.printf("2005 was a leap year - %s\n", isLeapYear(2005) ? "true" : "false"); System.out.printf("\nTest of monthLength():\n"); for (int month = 1; month <= 12; ++month) System.out.printf("%02d/2016 has %d days. %02d/2019 had %d days.\n", month, monthLength(month, 2016), month, monthLength(month, 2019)); System.out.printf("\nTest of julian():\n"); for (int month = 1; month <= 12; ++month) System.out.printf("%02d/1/2016 --> %3d %02d/1/2019 --> %3d\n", month, julian(month, 1, 2016), month, julian(month, 1, 2019)); System.out.printf("\nTest of zodiac():\n"); for (int month = 1; month <= 12; ++month) System.out.printf("%d/%d has the sign %s\n", month, 1, zodiac(month, 1)); } }