wood burning stoves
The moose likes Beginning Java and the fly likes Date CLass Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Date CLass" Watch "Date CLass" New topic

Date CLass

Bill Ballou

Joined: Jun 17, 2007
Posts: 2
I hope this is the right place for this. Ok I am studying for a final test in my java class (groan). I have been trying to run through all of the codes in chapter 8 of Java How to Program 6th edition and I have hit the wall on 8.16. Here are the books requirements:
(Date Class) Create class Date with the following capabilities:

Output the date in multiple formats, such as

June 14, 1992

Use overloaded constructors to create Date objects initialized with dates of the formats in part (a). In the first case the constructor should receive three integer values. In the second case it should receive a String and two integer values. In the third case it should receive two integer values, the first of which represents the day number in the year. [Hint: To convert the string representation of the month to a numeric value, compare strings using the equals method. For example, if s1 and s2 are strings, the method call s1.equals( s2 ) returns true if the strings are identical and otherwise returns false.]

If anyone could help me with this code or has the code so I can take a look at it I would be extremely grateful. I want to stress that this is not homework and I am not asking for someone to help me cheat. Thanks in advance for any help, and if this is the wrong place to post let me know.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted, often without warning

Joanne Neal

Joined: Aug 05, 2005
Posts: 3742
The spec is pretty detailed, so can you tell us exactly which bit you are having trouble with. Post what code you have so far.

Steve Morrow
Ranch Hand

Joined: May 22, 2003
Posts: 657

Already answered here:

I agree. Here's the link: http://aspose.com/file-tools
subject: Date CLass
It's not a secret anymore!