The Artima Developer Community
Sponsored Link

Java Answers Forum
its a date!

1 reply on 1 page. Most recent reply: Oct 2, 2005 11:38 PM by Matthias Neumair

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
marjorjie

Posts: 6
Nickname: jorj
Registered: Sep, 2005

its a date! Posted: Oct 2, 2005 11:29 PM
Reply to this message Reply
Advertisement
A. Create a class named DateClass. It should contain three fields for the month, day, and year. Create a two constructors. The first initializes the fields to any value that you want, and the second should accept three arguments, one for each field, the ocnstructor then initializes the fields to these arguments. The class should also have a getDateString method that returns the specified date in dddd mmmm dd yyyy format (ie Monday Sept. 29, 2005). Be sure that invalid dates are not accepted. (ie Feb.29,2005) . Lastly, include a method named isLeapYear which returns true if the date is a leap year false otherwise.

B. Create a class named TestDate which contain the main method. It asks the user to enter the month, day , and year. It will theb instantiate the DateClass and calls the getDateString method then display the output.


*HI! this is task..anyway ive already started this assignment. And it make me confused on how to post the DAy of that certain date. Thanks a lot!


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: its a date! Posted: Oct 2, 2005 11:38 PM
Reply to this message Reply
Can't you first read the other messages?
Now we have 3 topics regarding your homework.

Flat View: This topic has 1 reply on 1 page
Topic: need help regex ...Word Possibility ? Previous Topic   Next Topic Topic: NEED Programming HELP ASAP!!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use