BBC (Brian's Boot Camp)

Not to be confused with the British Broadcasting Corporation, the BBC will focus on Brian's fast paced journey of the mastery of the Java programming language.

Thursday, February 17, 2005

Assignment #2: Hot Date, A Date, Dinner with Friends, Dinner Alone

Write a program that takes three command line arguments as numbers, a month, a day, and a year and prints out the "human readable" date. Example input: 2 11 1975, example output: February 11, 1975.

Here's the catch though, don't just map numbers to months, (i.e. if (month == 1) str = "January"... Rather use some combination of the following classes:

java.util.Calendar
java.util.GregorianCalendar
java.text.SimpleDateFormat

You can look up the useage of these classes in the API documentation (see the school of hard docs post for more info on that). This is a non-trivial program as it is your first foray into class usage. I don't expect you to just do it and post the answer -- so by all means, post questions along the way.

1 Comments:

Blogger Brian T. Grant said...

HAHAH! I just got the reference. Good assignment; sounds challenging. I think I'm up to speed enough to code it, but I'll have to get to know those classes.

3:58 PM  

Post a Comment

<< Home