Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

Any Java Programmers willing to help?

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » DU Groups » Computers & Internet » Computer Help and Support Group Donate to DU
 
whatsername Donating Member (45 posts) Send PM | Profile | Ignore Sat Nov-05-05 01:32 AM
Original message
Any Java Programmers willing to help?
I'm in a beginners programming class and I'm having trouble with a program.

We had to develop a class named ElapsedTime. Methods required are
getTime(), setTime(),getDays(), getHours(), getMinutes, and the toString.

We had to run against the Professors testProgram, which I passed, and then write our own test program that I can't seem to make work.

If anyone has a few minutes I would really appreciate it!

Thanks
-L
Printer Friendly | Permalink |  | Top
Ready4Change Donating Member (1000+ posts) Send PM | Profile | Ignore Tue Nov-08-05 07:49 PM
Response to Original message
1. Learning Java myself.
What specifically are you having problems with? (Although it's been long enough at this point you may have figured it out.)
Printer Friendly | Permalink |  | Top
 
whatsername Donating Member (45 posts) Send PM | Profile | Ignore Thu Nov-10-05 10:27 PM
Response to Reply #1
2. Thanks for the reply
What I was having trouble with was my own test program. I knew my program was okay because it was passing the professor's test.

What my problem was...was I was trying to test my methods like this...

s.setTime (2,3,4)
return s;

s.getTime ()
return s;

getDays()
return s;

My problem was that in getDays (getHours, getMinutes) I needed to actually do a calculation ( which I named totalDays), and return totalDays, not s. It was sending some value of s to the toString and messing up the return.

Now I can clearly see the problem, but I just couldn't figure it out. Anyway, I got it done and turned in for a 10% deduction for being late. Oh well!

Hey, keep in touch if you have any thing I can help you with, since you are just learning too. I generally have a pretty good handle on it but this one just lost me!

-L



Printer Friendly | Permalink |  | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Sun May 05th 2024, 05:46 PM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » DU Groups » Computers & Internet » Computer Help and Support Group Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC