summaryrefslogtreecommitdiff
path: root/testapp/java_files/main_square.java
diff options
context:
space:
mode:
authorankitjavalkar2015-04-23 19:32:37 +0530
committerankitjavalkar2015-04-26 19:46:01 +0530
commit17752a69114e7dbad266337e768013920aec8c0c (patch)
tree7f88fe72bda2dfca49e0032888fb0cb01cc73d1a /testapp/java_files/main_square.java
parent0580f99fecc0bb495beb5706e18246834174710b (diff)
downloadonline_test-17752a69114e7dbad266337e768013920aec8c0c.tar.gz
online_test-17752a69114e7dbad266337e768013920aec8c0c.tar.bz2
online_test-17752a69114e7dbad266337e768013920aec8c0c.zip
Code Review: Code refactoring
- Add from_json classmethod - Question language is passed directly to the code server - Fix errors in evaluation of code - Fix test cases
Diffstat (limited to 'testapp/java_files/main_square.java')
-rw-r--r--testapp/java_files/main_square.java32
1 files changed, 0 insertions, 32 deletions
diff --git a/testapp/java_files/main_square.java b/testapp/java_files/main_square.java
deleted file mode 100644
index 5cb8c35..0000000
--- a/testapp/java_files/main_square.java
+++ /dev/null
@@ -1,32 +0,0 @@
-class main_square
-{
- public static <E> void check(E expect, E result)
- {
- if(result.equals(expect))
- {
- System.out.println("Correct:\nOutput expected "+expect+" and got "+result);
- }
- else
- {
- System.out.println("Incorrect:\nOutput expected "+expect+" but got "+result);
- System.exit(1);
- }
- }
- public static void main(String arg[])
- {
- Test t = new Test();
- int result, input, output;
- input = 0; output = 0;
- result = t.square_num(input);
- System.out.println("Input submitted to the function: "+input);
- check(output, result);
- input = 5; output = 25;
- result = t.square_num(input);
- System.out.println("Input submitted to the function: "+input);
- check(output, result);
- input = 6; output = 36;
- result = t.square_num(input);
- System.out.println("Input submitted to the function: "+input);
- check(output, result);
- }
-}