File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Help with maze time result code... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Help with maze time result code..." Watch "Help with maze time result code..." New topic
Author

Help with maze time result code...

Phillip Browne
Greenhorn

Joined: Mar 08, 2008
Posts: 1
Hey guys,

Just asking for a little help here. I am trying to finish a java program for a class and I am stuck on a bit of code. I've figured out most of the code but am stuck on the code at the end:




Here is the code in it's entirety:

marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Phillip Browne:
...I've figured out most of the code...

Welcome to JavaRanch!

Have you compiled this code yet? Don't wait until it's "done" to compile. You should recompile each time you add something, so you don't end up with errors that build on each other.

Also, if "Time" is java.sql.Time, you should check the API. Most of the methods are deprecated. The non-deprecated methods are inherited from java.util.Date, so you might want to consider using Date instead. Better yet, use java.util.Calendar.
[ March 08, 2008: Message edited by: marc weber ]

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32708
    
    4
Agree with Marc Weber. Also your method which has a return null in looks very peculiar; I think it might not work correctly. Beware of returning null anywhere; it can produce unexpected exceptions or errors later.
Bob Good
Ranch Hand

Joined: Jan 09, 2008
Posts: 86
Well you have these members in the maze result:

private Rat rodent;
private Time startTime;
private Time endTime;

Perhaps your toString() would do something like:

return getRodent().toString() + "; start: " + getStartTime() + "; end: " + getEndTime();

Rat class should have a toString method too.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Help with maze time result code...
 
Similar Threads
Overloaded constructors and this()
a very elusive bug
July Newsletter Puzzle (Maze Solver)
Problem deplying struts application in weblogic
webservice dropping a method and field from my object