/** * @author Musard Balliu * * @date Sep 20, 2015 * */ public class Date { // State of a Date object int day; int month; // between 1 and 12 int year; // from 1900 on // global variable, not part of the object state static String[] monthInEnglish = { "january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december" }; //constructor public Date(int y, int m, int d) { //initialize constructor here checkData(); } //constructor public Date(int m, int d) { } // constructor public Date(int d) { } //default constructor public Date() { } //Check whether the date is correct public void checkData() { int[] daysOfMonth = getDaysOfMonth(); } // returns true if the year is leap public boolean isLeapYear(int year) { } //string representation of date public String toString() { } //returns # days of a given month public int[] getDaysOfMonth() { int[] daysOfMonth = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; if (isLeapYear(year)) daysOfMonth[1] = 29; return daysOfMonth; } //compares this date with other date public boolean precede(Date otherDate) { } // public int daysPassedSinceYearStart() { } public int daysPassedSinceVeryStart() { } }