The MathFunction.java file generated did not compile.
(1) First error was related to comments. The /** was missing a closing **/
/**
* "This will test the MathFunctions class which contains add, multiply, etc. Use for the Spring 2010 section of ITEC 2120"
* Input .CSV: SampleInputFileProfs.txt
**/
(2) When I fixed that error in the source file, I received another set of errors:
[javac] C:\Documents and Settings\nnapier\workspace\codeturtle2\build.xml:197: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to C:\Documents and Settings\nnapier\workspace\codeturtle2\build\sample\grader
[javac] C:\Documents and Settings\nnapier\workspace\codeturtle2\samples\alpha\project-grader\MathFunctions.java:51: '[' expected
[javac] result = (int) invokeMethod(multiplyMethod, mathfunctions, new int{5});
[javac] ^
[javac] C:\Documents and Settings\nnapier\workspace\codeturtle2\samples\alpha\project-grader\MathFunctions.java:51: ']' expected
[javac] result = (int) invokeMethod(multiplyMethod, mathfunctions, new int{5});
[javac] ^
[javac] C:\Documents and Settings\nnapier\workspace\codeturtle2\samples\alpha\project-grader\MathFunctions.java:51: ')' expected
[javac] result = (int) invokeMethod(multiplyMethod, mathfunctions, new int{5});
[javac] ^
[javac] C:\Documents and Settings\nnapier\workspace\codeturtle2\samples\alpha\project-grader\MathFunctions.java:51: ';' expected
[javac] result = (int) invokeMethod(multiplyMethod, mathfunctions, new int{5});
[javac] ^
[javac] 4 errors
Problem # 2 above was resolved by a correction of the *.txt file. Please ignore.
Additional issues:
(3) When calling the register method, the first argument to the method should be an integer instead of a double:
register(5, "Add one number"); // NPN 5.0 to 5
(4) When calling the invokeMethod, should cast the return code to Integer instead of int
(Integer) invokeMethod(sumMethod, mathfunctions, new int[]{5}); // NPN int to Integer