-
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
-
Similar Threads
-
Replies: 2
Last Post: 07-31-2006, 08:50 AM
-
By opengl_C++ in forum C++
Replies: 1
Last Post: 11-23-2005, 07:49 AM
-
Replies: 2
Last Post: 05-08-2005, 08:41 PM
-
By pwnedjoo in forum Java
Replies: 42
Last Post: 05-05-2005, 05:52 PM
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks