Using Java file attachments in a java_program question

Re: Using Java file attachments in a java_program question

por Richard Lobb -
Número de respuestas: 0
I haven't ever used CodeRunner for teaching Java and my Java's about 15-years rusty, but in the absence of a response from any Java teachers ...

The error "Disallowed File Name" suggests that the regular expression you set for the allowed/required attachments wasn't right. It should be "Grade\.java" although "Grade.java" should also have worked.

I attach an xml export of a rudimentary question that requires an attachment file of Grade.java defining a class that simply wraps a grade string. The answer defines a UniversityCourse class that uses that attachment. It looks like this when run:
 
image.png