Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Small calender program

 
Roger Fed
Ranch Hand
Posts: 82
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello every one
i need your help in understanding the following program:
(Displaying the first days of each month) Write a program that prompts the user to enter the year and first day of the year, and displays the first day of each month in the year on the console. For example, if the user entered the year 2005, and 6 for Saturday, January 1, 2005, your program should display the following output:
January 1, 2005 is Saturday
...
...
...
...
December 1, 2005 is Thursday

I don't ask you to solve the problem by coding but i just want you to tell me what i should do to solve this
and what is the meaning of " 6 for Saturday"?
is that mean that the days numbered from 0 to 6 so 6 refer to Saturday or what?
will i use the calender class here?
if yes, what is the methods i will use from it?
thanks in advance
 
Kevin Workman
Ranch Hand
Posts: 151
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
moustafa taha wrote:I don't ask you to solve the problem by coding but i just want you to tell me what i should do to solve this
and what is the meaning of " 6 for Saturday"?
is that mean that the days numbered from 0 to 6 so 6 refer to Saturday or what?

That's how I would see it. Perhaps use both 0 and 7 for Sunday.

will i use the calender class here?

Definitely.

if yes, what is the methods i will use from it?

Why don't you read the Javadoc page and tell us which ones you think you'll need?
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks.

Moustafa, please BeForthrightWhenCrossPostingToOtherSites.
 
Roger Fed
Ranch Hand
Posts: 82
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please BeForthrightWhenCrossPostingToOtherSites.

I'm really sorry for this as i don't read these rules before
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic