You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
If a class is expected in the default package, e.g., with the following test.json snippet:
and cannot be found (or is misplaced), the error message will read: "The exercise expects a class with the name SomeClass in the package . You did not implement the class in the exercise."
Describe the solution you'd like
I think the error message should look like:
- The exercise expects a class with the name SomeClass in the package . You did not implement the class in the exercise.+ The exercise expects a class with the name SomeClass in the default package. You did not implement the class in the exercise.
And, maybe, to mitigate that beginners then try to add package default; at the beginning of their Java files, one could even go further:
- The exercise expects a class with the name SomeClass in the package . You did not implement the class in the exercise.+ The exercise expects a class with the name SomeClass in the default package (i.e., no package). You did not implement the class in the exercise.
Describe alternatives you've considered
Adding a special hint in the problem statement.
Providing class templates in the template repository.
Changing the exercise to not use the default package. However, for beginner exercises it's actually nice to skip as many distractions as possible.
Additional context
This is only affects very basic Java programming exercises w/o packages.
Ares-Version you are using
1.11.3
The text was updated successfully, but these errors were encountered:
Would The exercise expects a class with the name SomeClass in the package <default> (i.e., no package). You did not implement the class in the exercise. be OK? I would choose that implementation, as it does not require reordering in the messages or grammatical adjustments:
default package
package net.example.test
It should address the problem for now, that the package name is just an empty string.
If this solution does not meet your needs, feel free to reopen the ticket and preferably open a pull request with your suggestion.
Is your feature request related to a problem? Please describe.
If a class is expected in the default package, e.g., with the following
test.json
snippet:and cannot be found (or is misplaced), the error message will read: "The exercise expects a class with the name SomeClass in the package . You did not implement the class in the exercise."
Describe the solution you'd like
I think the error message should look like:
And, maybe, to mitigate that beginners then try to add
package default;
at the beginning of their Java files, one could even go further:Describe alternatives you've considered
Additional context
This is only affects very basic Java programming exercises w/o packages.
Ares-Version you are using
1.11.3
The text was updated successfully, but these errors were encountered: