Making a java program for my intro CS class... I need help.

BigToque

Lifer
Oct 10, 1999
11,700
0
76
In this exercise I'm supposed to print a calender for the month and year that a user requests. They input the year, the month and the day that Jan. 1 falls on during that year.

I have the program setup so that it will print the days of the month, but I don't understand how knowing the day Jan. 1 falls on is supposed to help me figure out what the first day of each successive month is supposed to be.

Note: We've been told we can use something called "Zeller's Congruence" (which we havent been given any info on), but I'm not using that at this point. I'd like to get it working without this thing first just so I understand what is going on.
 

BigToque

Lifer
Oct 10, 1999
11,700
0
76
I figured that it had to do with the number of days in each month, but I'm really tired and I still dont understand the connection.

Btw, this isnt due until the 23rd, so I'm not in a big hurry :)

Thanks for the help guys

 

cpals

Diamond Member
Mar 5, 2001
4,494
0
76
My java class sucked and I learned nothing from my teacher. Hope you have better luck. :)
 

BigToque

Lifer
Oct 10, 1999
11,700
0
76
just a hint.

it looks like people keep quoting that one responce, so I'm gonna think about that for a bit.
 

TranSoft

Senior member
Jul 19, 2003
246
0
0
i'm guessing it's gonna be based on a gregorian calendar?
leap years n stuff? yea... you'll need to find a way to count the days and put them in correct order.
 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
Originally posted by: Stefan
just a hint.

it looks like people keep quoting that one responce, so I'm gonna think about that for a bit.

well just think, if you know today is the 8th and it's a saturday, what day will the 10th be? it's the same idea...