Presentation is loading. Please wait.

Presentation is loading. Please wait.

WeBWorK Java Evaluator

Similar presentations


Presentation on theme: "WeBWorK Java Evaluator"— Presentation transcript:

1 WeBWorK Java Evaluator
Nathan Baur

2 Summary Project Goals What is a Course Management System?
How does the Java evaluator work? Framework JUnit testing Writing problems

3 Project Goals Gently introduce programming concepts
Grade code fragments or entire programs Provide specific feedback to help students identify the problems with their code Provide professors with an easy, flexible system for writing questions Integrate the evaluator into an existing Course Management System

4 What it looks like

5 What is a Course Management System?
Tracks grades and assignments automatically Some grade certain types assignments automatically, providing immediate feedback Popular CMS’s include Moodle, Blackboard and WeBWorK

6 Why choose WeBWorK? Open-source Flexible, modular design
Well supported Already used by a number of institutions

7 How does the evaluator work?
Students are provided with a simple WeBWorK interface to input code Student WeBWorK

8 How does the evaluator work?
Student code is sent from WeBWorK to the Java Evaluator module, which inserts the code into a template file to create a complete Java class Student WeBWorK Evaluator

9 How does the evaluator work?
The Java evaluator launches problem-specific JUnit tests to be run on the student code Student WeBWorK Evaluator JUnit

10 How does the evaluator work?
JUnit returns the results to the Java evaluator module Student WeBWorK Evaluator JUnit

11 How does the evaluator work?
The Java evaluator formats the results into a message for feedback which is sent to WeBWorK Student WeBWorK Evaluator JUnit

12 How does the evaluator work?
WeBWorK gives the students feedback and gives them the opportunity to fix the code and try again. Student WeBWorK Evaluator JUnit

13 JUnit Unit testing framework
Tests are written in Java using JUnit classes Code can be tested for any circumstance Custom failure messages can be provided based on how the test failed

14 Writing problems WeBWorK PG file in perl Template .java file
Includes the problem description and specifies the .java files to be used by JUnit Template .java file Usually minimal Includes class definition and problem-specific setup so that students don’t have to deal with it JUnit test file Includes the tests and feedback messages

15 Sample PG file DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", "javaAnswerEvaluators.pl" ); BEGIN_TEXT Hello World! $PAR Given a String object myString, assign it to "Hello World!“ $BR \{ANS_BOX(1,1,30);\} END_TEXT ANS(java_cmp("JavaSampleSet/HelloWorld/","HelloWorld")); ENDDOCUMENT(); # This should be the last executable line in the problem.

16 Sample .java template file
public class HelloWorld { private String myString; public HelloWorld(){ doIt(); } public void doIt(){ replaceme public String getMyString(){ return myString;

17 Sample JUnit test file import junit.framework.*;
public class HelloWorldJUnitTest extends TestCase{ private HelloWorld hw; private String ans = "Hello World!"; public void testDefined(){ Assert.assertTrue("Assigning the variable", hw.getMyString()!=null); } public void testCorrect(){ Assert.assertTrue("Making it say exactly \"Hello World!\"“ , hw.getMyString.equals(ans)); public static Test suite(){ return new TestSuite(HelloWorldJUnitTest.class);

18 Acknowledgements Andy Wildenberg Jacqueline Baldwin Christelle Scharff
Cornell College PACE University Made possible by NSF grant #


Download ppt "WeBWorK Java Evaluator"

Similar presentations


Ads by Google