Code assignments that run and grade themselves

Set a Java programming problem and write the test cases that check it. Students write code in the browser and press Run. A real compiler builds their program, the code runner executes it against every test, and the autograder reports what passed.

Write some code, run it against the tests, submit it, and watch the autograder score it.

Sum of digits

100 pts Not started
Instructions

Write a method sumDigits(int n) that returns the sum of the digits of n.

Visible checks
sumDigits(123) returns 6
sumDigits(0) returns 0
Code
SumOfDigits.java

Hidden tests and honest compiler errors

Mark a test hidden and students cannot read the expected output from it, so they have to actually solve the problem. Compiler errors point at the line the student really wrote, not a line inside some wrapper they never saw.

Scores come back automatically from the autograder. Due dates, late submissions and scheduled publishing are all there, and you can override any score with written feedback.

Not every assignment is code

An assignment can also be a written response or an interactive app. The three modes share the same due dates, submissions and grading.

Four kinds of assignment

Not every task is a method that returns a value, so an assignment can take one of four shapes.

Code

A Java problem checked by test cases. The code runner compiles and executes it, and the autograder scores what passed.

App

Java that drives buttons, fields and labels on a phone screen and keeps running while students use it. See app assignments

Written response

Reflections and short answers where there is no code to run. Students can attach files, and you preview them without downloading anything.

Free for every classroom

Get started free