how do you do this piece!!!

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: how do you do this piece!!!

  1. #1
    Join Date
    Aug 2009

    how do you do this piece!!!

    Object Oriented Programming(JAVA)

    Implement a class called Birthday that extends the my MyDate class. Include 2 constructors, one with month, day and year parameters and another one with only month and day as parameters. The second constructor will second constructor will call parent constructor passing default value 1970 for the year.

    Implement an inner class InvalidDateException that extends the exception class. The message should read “Invalid Date!” include a method called String getZodiacSign() throws invalidate exception that returns the zodiac sigh of the person if it’s valid and throws an exception if not valid.

    Use this table
    Aquarius Jan 20 – Feb 18
    Pisces Feb 19 – Mar 20
    Aries Mar 21 – Apr 19
    Taurus Apr 20 – May 20
    Gemini May 21 – Jun 20
    Cancer Jun 21 – Jul 22
    Leo Jul 23 – Aug 22
    Virgo Aug 23 – Sep 22
    Libra Sep 23 – Oct 22
    Scorpio Oct 23 – Nov 21
    Sagittarius Nov 22 – Dec 21
    Capricorn Dec 22 – Jan 19

  2. #2
    Join Date
    Dec 2004
    San Bernardino County, California
    What do you have so far?

Similar Threads

  1. Is this piece of code correct?
    By houzem in forum C++
    Replies: 2
    Last Post: 07-31-2006, 08:50 AM
  2. error in the piece of code
    By opengl_C++ in forum C++
    Replies: 1
    Last Post: 11-23-2005, 07:49 AM
  3. problem with scroll animation
    By cifroes in forum Java
    Replies: 2
    Last Post: 05-08-2005, 08:41 PM
  4. Cant get my balls to move
    By pwnedjoo in forum Java
    Replies: 42
    Last Post: 05-05-2005, 05:52 PM
  5. SQL 2000 is a piece of garbage.
    By Unhappy SQL2000 Owner in forum Database
    Replies: 16
    Last Post: 12-15-2000, 11:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center