Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with this question. I am asked to create a simple auto judge in JAVA or C or bash. This program (auto judge)

Please help me with this question. I am asked to create a simple auto judge in JAVA or C or bash. This program (auto judge) takes as parameters another program and a sampleInput file. It compiles the program and runs it using the sample data in the sample input file. Then it compares the output to another file that has the correct results. the auto judge outputs the following:

1. If the program being tested does not compile, it outputs compilation error.

2. If the results of running the code using the data from the sampleInput file matches the results in the sampleOutput file, then the auto judge outputs "correct answer"

2. If the results of running the code using the data from the sampleInput file DOES NOT matches the results in the sampleOutput file, then the auto judge outputs "wrong answer"

You will need to submit the following files:

1. autojudge.java or autojudge.c

2. sampleInputfile and sampleOtputfile

3. Codebeingtested.java and Codebeingtested.c

4. read me file explaining how to run the autojudge file.

For example the code being tested could be AddTwoNumbers.java

public class AddTwoNumbers { public static void main(String[] args) { int num1 = 5, num2 = 15, sum; sum = num1 + num2; System.out.println("Sum of these numbers: "+sum); } }

sampleInput file could have data like:

1 2

3 4

5 5

0 0

sampleOutput file would have the correct answers:

3

7

10

Thank you. Please let me know if you have any questions.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

ISBN: 0619064625, 978-0619064624

More Books

Students also viewed these Databases questions

Question

Murtipie monce )2.927xA 57+17942 ?243470 408,4974

Answered: 1 week ago

Question

8. Design office space to facilitate interaction between employees.

Answered: 1 week ago