Well, I don't understand it yet.
What do you mean by "hijack a programs input and output ". Can you
give me a sample code?? Hope my first question clear enough. Anyway,
i think my project will use only character UI, not a complex GUI. And
these are the detailed steps :
1. Suppose the Homework program has a function : int calculate(int x,
int y), which returns x * y. This is the function that must be tested
at runtime. The students must submit the Homework.java file
2. So how should my program works?? I guess my program must try to
compile Homework.java from each student (guess I can use this by
executing javac from Runtime). If Homework.class can created, then go
to step 3. Otherwise, Homework program failed.
3. My project then execute the Homework.class. Well, now
Homework.class is running. And this is the most confusing part. How
can i enter first input (for x), second input (for y) and gets the
output from "calculate" function from the running program?? If this
part you called as "hijack", how can i interrupt a running program??
Hope someone can help me, cause this is really important to
me.........