Question Authors' Forum

First try

 
Picture of Stefan Simic
First try
by Stefan Simic - Saturday, 9 September 2017, 8:31 PM
 

Hi there,

Can someone tell me how i can fix this problem? 
help

Picture of Richard Lobb
Re: First try
by Richard Lobb - Sunday, 10 September 2017, 10:06 PM
 

CodeRunner tests generally have to generate some output. A test case int x = 1 is a declaration, and doesn't generate any output. Since none of the tests generate any output, the Got column of the result table has been hidden.

If this is an example of a Java write-a-class question then the tests will have to create an instance of the student-supplied class and call it. For example:

Tester tester = new Tester();
System.out.println(tester.test(17));

I suggest you check out the sample questions supplied in the samples folder in the CodeRunner distribution, e.g. here.

Richard