g
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
g
Last edited by dmanmeds; June 23rd, 2014 at 07:10 PM.
How can the code be compiled and executed for testing? There are missing classes.
If you don't understand my answer, don't ignore it, ask a question.
I forgot to change the class name, sorry I fixed that part now. I was having really hard trouble doing all three at once so I started by scratch but only with one dog and once I got one dog running well, I put the other dogs in.
The code needs formatting to make it easier to read.
Several } are hidden at end of a line. }s should be on a line by itself
Statement(s) after an if and for statement should be enclosed in {}s.
Statements after if hidden on same line vs in {}s on a new line
If you don't understand my answer, don't ignore it, ask a question.
This is NOT good style:if(fido >=(track-1)) fido = (track-1); //<<<<<<<< HIDDEN statement // it should be on two lines: if(fido >=(track-1)) { fido = (track-1); }
Also there any many for statements with missing {}s
If you don't understand my answer, don't ignore it, ask a question.