Question: EXPLANATION Computer programming contests feature an automation feature where the judge, a software script, checks if a solution submitted by a team is CORRECT or

EXPLANATION

Computer programming contests feature an automation feature where the "judge", a software script, checks if a solution submitted by a team is CORRECT or not. We do not require further details as to what exactly is wrong nor provide any further feedback on the erroneous output. To achieve this, the judge works by taking the following basic steps (we show the simplified version here):

1. A source code (C, C++, or Java solution) is compiled.

2. If there is a compile error, the response back to the team will be "INCORRECT: Compilation Error" --> done

3. Execute the program and redirect the input stream to read input cases from a previously prepared human judge's file and redirect the output to a temporary file.

4. Compare the output file from the team's program with the file provided by the human judge that contains the correct (expected) output for that input file.

5. If the comparison returns no differences, the response back to the team will be "CORRECT", otherwise "INCORRECT".

Task

Your task is to write a simple automated judge that can input a source code file written in any one of these three languages C or Java, and return an appropriate message indicating if is CORRECT or not. i.e. no graphics or submission interface is needed.

You can use any problem from the ICPC ECNA archives(icpc-ecna.ysu.edu/PastResults/2010/home.html) to test your program. Be sure to test your code properly demonstrating the three possible outputs described above.

Submission:

Documented code: AutoJudge.c/java

Instructions on how to run code: readme.txt

A script file (use the script command) to capture the testing you did for your program showing the compilation and execution of AutoJudge along with the input and output tests for each of the three test cases. assignment1_scriptfile.txt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!