kirrz 0 #1 June 2, 2006 I have this assignment, I've written the code.. the output is not right. It's doing everything but it's just calculating wrong answers.. I'm so stressed because it's due in 3 hours and the marking criteria is - "the code will be automatically tested, if your code has inconsistent outputs you will automatically receive a mark of 0. there will be no manual re-marking." The code & description of the problem is located at http://forum.java.sun.com/thread.jspa?threadID=741685&tstart=0 Please please please please please if you know what I'm doing wrong help me! Please!!!! Quote Share this post Link to post Share on other sites
Sockpuppet 0 #2 June 2, 2006 What are your outputs varying as? Are they the same wrong answer or multiple wrong answers? ------ Two of the three voices in my head agree with you. It might actually be unanimous but voice three only speaks Welsh. Quote Share this post Link to post Share on other sites
kirrz 0 #3 June 2, 2006 In my assignment sheet we have a sample for input.txt and what is supposed to come up. I'm getting binaries up but they're not what they are supposed to be.. I think somewhere in my code the conversion between integer<-->binary is messed up. I just don't know where and I don't know how to do it... I haven't tested it against anything else.. Also with the sample file for the second part it is supposed to be error free but it is showing up as an error. So that means both sections of the code aren't working properly because they've been individually tested... Quote Share this post Link to post Share on other sites
piisfish 140 #4 June 2, 2006 QuoteIs anyone good at Java? Desperate!!I thought you were asking about the earthquake scissors beat paper, paper beat rock, rock beat wingsuit - KarlM Quote Share this post Link to post Share on other sites
gus 1 #5 June 2, 2006 It's a while since I did any Java. How confident are you about the "n = n/2" in toBinaryString? It looks like you're relying on it to round down, are you sure that's what it's doing? fromBinaryString looks to me like it'll work. GusOutpatientsOnline.com Quote Share this post Link to post Share on other sites