public class Doomsday {
public static final int Monday = 0;
public static final int Tuesday = 1;
public static final int Wednesday= 2;
public static final int Thursday = 3;
public static final int Friday = 4;
public static final int Saturday = 5;
public static final int Sunday = 6;

public  int Year(){}
public int Month() {}  // the private memebers
public int  Day() {}

public int getAnchorDay()

for (day;day==1800-1899;day++){
return Friday;
}
for (day;day==1900-1999;day++){
return Wednasday;
}
for (day;day==2000-2099;day++){
return Tuesday;
}
for (day;day==2100-2199;day++){
return Sunday;
}
publlic getDoomsdayDate()
//Jan – 3 (or 4 if leap year), Feb – 28 (or 29 if leap year)
//March – 0 (last day in February), April – 4, May – 9, June - 6
//July – 11, August – 8, September – 5, October – 10, November - 7
//December – 12
//I dont know how to do this one ?
public getDoomsday()
//I din't know how to do this one ?
//y last 2 digits of year
//a [ y/12]
//b y mod 12
//c [b 4
//d a + b + c
//diff  DAY - DOOMSDAYDATE
//DOOMSDAY (d + diff + ANCHORDAY) mod 7
//Ensure DOOMSDAY is in the range 0-6

Edited 3 Years Ago by pyTony: fixed formating

Congratulations on copying your homework assignment. The part you copied is pretty much what you have do, except replace the arrows with = and the mod with %.

If you want more explicit help, be more explicit with your question and show that you've put some effort forth already. And procrastinating on your homework is definitely not recommended.

This article has been dead for over six months. Start a new discussion instead.