class Date {
private int day, month, year; // the date
Date(int d, int m, int y){
day = d; month = m; year = y;
}
Date(){ };
void get() {
day = Console.readInt(); month = Console.readInt(); year = Console.readInt();
}
void put(){
System.out.println(day + "/" + month + "/" + year);
private int elapsedDays() {
// The number of days elapsed from 1/1/1900 to this date
int days = (year-1900)*365+(year-1901)/4;
int k = 1;
while (k<month) {
int daysInMonth;
if (k==9||k==4||k==6||k==11)
daysInMonth = 30;
else if (k==2) {
if (year%4==0 && year!=1900) daysInMonth = 29;
else daysInMonth = 28;
}
else daysInMonth = 31;
days = days + daysInMonth;
k++;
}
return days + day;
}
boolean postDates(Date d) {
// Does this date occur on or after d?
.....
}
}
my mind has gone completely blank with the boolean method postDates would appreciate a bit of help!!