Computing.Net > Forums > Programming > HELP! Java

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

HELP! Java

Reply to Message Icon

Name: kiran02
Date: December 2, 2002 at 07:53:44 Pacific
OS: XP
CPU/Ram: enough
Comment:

I have to write a program which prints a calendar for a given range eg.March 2001 to August 2003.The program has to start a calendar with a given start month in a given start year and end with a given end month in a given end year. I have to use JBuilder 3.5. I dnt even know where to start! Someone, please help me. I only have 5 days left to complete this. I'd really appreciate some help. URGENT!!! Thanx




Sponsored Link
Ads by Google

Response Number 1
Name: kiran02
Date: December 2, 2002 at 08:00:37 Pacific
Reply:

i forgot, it should also work out whether the year is a leap year. As if the calender alone wasnt enough!!


0

Response Number 2
Name: 54v4g3
Date: December 2, 2002 at 11:38:19 Pacific
Reply:

as with most people, we arent here to do your homework, if you would post what you have done we could help point you to what u need to change.


0

Response Number 3
Name: kiran02
Date: December 2, 2002 at 23:54:04 Pacific
Reply:

I'm not asking someone to DO my work, all i need is some kind of starting point.


0

Response Number 4
Name: Jenne
Date: December 3, 2002 at 15:27:01 Pacific
Reply:

Maybe it is stupid, but here is, what I would do:

1. Make a list, what your programm should do
2. Make a list of needed classes
3. Make the gui Interface
4. Paint a picture on how your programm should work
5. Write plain Methods
6. Write the methods

If you have errors and can not figure out were, just post the part of code and we will try to find it


0

Response Number 5
Name: iggy
Date: December 5, 2002 at 12:59:44 Pacific
Reply:

I did something similar that probably uses similar code. Take a look:

public static void GregorianCalendar(String dateOutput,String timeOutput)
{
int date,minute,second,hour,year,month;
String monthName = "Smarch";
String[] ids = TimeZone.getAvailableIDs(-8 * 60 * 60 * 1000);
SimpleTimeZone edt = new SimpleTimeZone(-5 * 60 * 60 * 1000, ids[0]);
edt.setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
edt.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
//daylight savings times
Calendar calendar = new GregorianCalendar(edt);
date = calendar.get(Calendar.DATE);
month = calendar.get(Calendar.MONTH);
year = calendar.get(Calendar.YEAR);
hour = calendar.get(Calendar.HOUR);
minute = calendar.get(Calendar.MINUTE);
second = calendar.get(Calendar.SECOND);
switch(month)
{
case 1:
monthName = "January";
break;
case 2:
monthName = "February";
break;
case 3:
monthName = "March";
break;
case 4:
monthName = "April";
break;
case 5:
monthName = "May";
break;
case 6:
monthName = "June";
break;
case 7:
monthName = "July";
break;
case 8:
monthName = "August";
break;
case 9:
monthName = "September";
break;
case 10:
monthName = "October";
break;
case 11:
monthName = "November";
break;
case 12:
monthName = "December";
break;
}
dateOutput = monthName + " " + date + ", " + year;
timeOutput = hour + "h:" + minute + ":" + second;
} //end of GregorianCalendar


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: HELP! Java

help help................. java www.computing.net/answers/programming/help-help-java/6028.html

Please help JAVA PRINTING API 1.4 www.computing.net/answers/programming/please-help-java-printing-api-14/1144.html

Programming in java www.computing.net/answers/programming/programming-in-java/10419.html