• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Date CLass

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

Posts: 3742
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Ranch Hand
Posts: 657
Spring VI Editor Clojure
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Already answered here:

    Bookmark Topic Watch Topic
  • New Topic