File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Small calender program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Small calender program" Watch "Small calender program" New topic
Author

Small calender program

Roger Fed
Ranch Hand

Joined: Oct 17, 2010
Posts: 82

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


I Hear I Forget, I See I Remember, I Do I Understand.
Kevin Workman
Ranch Hand

Joined: Sep 28, 2010
Posts: 151
Crossposted: http://www.java-forums.org/new-java/33716-small-calender-program.html
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19790
    
  20

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?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19790
    
  20


Thanks.

Moustafa, please BeForthrightWhenCrossPostingToOtherSites.
Roger Fed
Ranch Hand

Joined: Oct 17, 2010
Posts: 82

please BeForthrightWhenCrossPostingToOtherSites.

I'm really sorry for this as i don't read these rules before
 
wood burning stoves
 
subject: Small calender program