Duz Posted December 7, 2009 Share Posted December 7, 2009 Hi Em I have a project due and its totaly screwed it was workin, but now the file is missing and whats left wont work. Please help me get this done. Project2 Here is the requirements Pro2 descrip Thank you for helping. Quote Link to comment Share on other sites More sharing options...
MRGRIM Posted December 7, 2009 Share Posted December 7, 2009 Ewww Java! If it was written in something else I may be able to help, but after studying Java for 4 years of University it still confuses the fuck out of me and as a result I havn't used it since getting a "real" job :) If no one helps you here try throwing this up on www.rentacoder.com Quote Link to comment Share on other sites More sharing options...
Deveant Posted December 7, 2009 Share Posted December 7, 2009 Lol. a reason to help? Quote Link to comment Share on other sites More sharing options...
Sparda Posted December 7, 2009 Share Posted December 7, 2009 Seriously, this program is so simple you shouldn't need help. Java is a high level language and can do each function your program needs to do in a single line of code. The program you are required to write would even be quite simple to do in assembler. Quote Link to comment Share on other sites More sharing options...
d4rkfe4r Posted December 7, 2009 Share Posted December 7, 2009 I only took 1 semester of programming before i moved out of the country to get a job and that was C.. sorry cant help ya bud. Quote Link to comment Share on other sites More sharing options...
Duz Posted December 7, 2009 Author Share Posted December 7, 2009 Thanks to those of you trying to help. Doin my best to fix the problem but if anyone compiles what I uploaded you will see the errors keep goin up Im on like 34 now. Quote Link to comment Share on other sites More sharing options...
Netshroud Posted December 7, 2009 Share Posted December 7, 2009 Eww, Moodle. Oh - just checking you saw this? Academic Honesty You may help each other to complete labs, as the purpose of the labs is to increase your understanding. This, however, this does not mean that someone else can do your lab work for you, or that you can do someone else’s work for them. Any work that you submit for continuous assessment or assignments must contain a significant contribution by you. Any help you receive from someone must be acknowledged in the work submitted. Failure to acknowledge the source of a significant idea or approach is considered plagiarism and not allowed. Academic dishonesty will be dealt with severely. At a minimum, you will receive a mark of zero for the assignment. Quote Link to comment Share on other sites More sharing options...
Zimmer Posted December 8, 2009 Share Posted December 8, 2009 Wow you still have 8 days... heck I could learn enough Java and program that in 8 days (you know if I broke my rule of "If you ever user Java, stab your eyes out."). Also did you purposely spell project as porject? Quote Link to comment Share on other sites More sharing options...
syphanx Posted December 8, 2009 Share Posted December 8, 2009 Although I didn't actually compile your program, it looks like you deleted or moved the Keyboard.java file. Since Java is only compiled to bytecode instead of binary, you should be able to decompile the Keyboard.class file to retrieve the original source without comments. I decompiled the Keyboard.class file in the classes folder for you. Put the following code in a file called Keyboard.java in the src folder and then recompile. It should work this time. Hope this helps. Good Luck. import java.io.*; import java.util.StringTokenizer; public class Keyboard { public Keyboard() { } public static int getErrorCount() { return errorCount; } public static void resetErrorCount(int i) { errorCount = 0; } public static boolean getPrintErrors() { return printErrors; } public static void setPrintErrors(boolean flag) { printErrors = flag; } private static void error(String s) { errorCount++; if(printErrors) System.out.println(s); } private static String getNextToken() { return getNextToken(true); } private static String getNextToken(boolean flag) { String s; if(current_token == null) { s = getNextInputToken(flag); } else { s = current_token; current_token = null; } return s; } private static String getNextInputToken(boolean flag) { String s = null; try { if(reader == null) reader = new StringTokenizer(in.readLine(), " \t\n\r\f", true); for(; s == null || " \t\n\r\f".indexOf(s) >= 0 && flag; s = reader.nextToken()) for(; !reader.hasMoreTokens(); reader = new StringTokenizer(in.readLine(), " \t\n\r\f", true)); } catch(Exception exception) { s = null; } return s; } public static boolean endOfLine() { return !reader.hasMoreTokens(); } public static String readString() { String s; try { for(s = getNextToken(false); !endOfLine(); s = (new StringBuilder()).append(s).append(getNextToken(false)).toString()); } catch(Exception exception) { error("Error reading String data, null value returned."); s = null; } return s; } public static String readWord() { String s; try { s = getNextToken(); } catch(Exception exception) { error("Error reading String data, null value returned."); s = null; } return s; } public static boolean readBoolean() { String s = getNextToken(); boolean flag; try { if(s.toLowerCase().equals("true")) flag = true; else if(s.toLowerCase().equals("false")) { flag = false; } else { error("Error reading boolean data, false value returned."); flag = false; } } catch(Exception exception) { error("Error reading boolean data, false value returned."); flag = false; } return flag; } public static char readChar() { String s = getNextToken(false); char c; try { if(s.length() > 1) current_token = s.substring(1, s.length()); else current_token = null; c = s.charAt(0); } catch(Exception exception) { error("Error reading char data, MIN_VALUE value returned."); c = '\0'; } return c; } public static int readInt() { String s = getNextToken(); int i; try { i = Integer.parseInt(s); } catch(Exception exception) { error("Error reading int data, MIN_VALUE value returned."); i = 0x80000000; } return i; } public static long readLong() { String s = getNextToken(); long l; try { l = Long.parseLong(s); } catch(Exception exception) { error("Error reading long data, MIN_VALUE value returned."); l = 0x8000000000000000L; } return l; } public static float readFloat() { String s = getNextToken(); float f; try { f = (new Float(s)).floatValue(); } catch(Exception exception) { error("Error reading float data, NaN value returned."); f = (0.0F / 0.0F); } return f; } public static double readDouble() { String s = getNextToken(); double d; try { d = (new Double(s)).doubleValue(); } catch(Exception exception) { error("Error reading double data, NaN value returned."); d = (0.0D / 0.0D); } return d; } private static boolean printErrors = true; private static int errorCount = 0; private static String current_token = null; private static StringTokenizer reader; private static BufferedReader in; static { in = new BufferedReader(new InputStreamReader(System.in)); } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.