Skip to content

Mortal/csaudk-submitj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADS programming exercises

Intended audience: Students of Algorithms and Data Structures (ADS), Aarhus University.

In ADS, you have to solve a number of programming tasks along the way. The programming tasks should be solved in Java using the BlueJ or IntelliJ programming environment.

To solve a programming task, first find the task either in Brightspace or in the tasks list of this repository. Read the task description, and start solving the task!

To upload your solution, you need three things:

  • Task ID (from the task description)
  • Username (adsYY-djXXXX, where YY is the current year and XXXX is your programming group number, found on Brightspace grade)
  • Password (from Brightspace grade)

If you have technical problems, contact Casper Rysgaard on the Brightspace discussion board. See also the list of common mistakes.

Step-by-step guide for BlueJ

  1. Open BlueJ

    Blank BlueJ

  2. Click "New Project..."

    Project menu

  3. Save the new project somewhere

    New project dialog

  4. In the edit menu, select "Add Class from File..."

    Edit menu

  5. Select the skeleton Java file for the problem you're solving and the Submit.java file

    Select Java files

  6. Click "Compile" to ensure that the code you're given can compile. If it doesn't compile, write to Casper Rysgaard on the Brightspace discussion board.

    Click compile

  7. Click testAll() on the task class to see that some or all of the tests currently fail

    Click testAll

  8. Read the test output to see that some tests have FAIL written

    Test failures

  9. Open the editor on the class for this task (that is, not the Submit class, but the class named after the problem you're solving)

    Open editor

  10. Sometimes BlueJ opens the file to a random line. If this happens, scroll up to the top, since you don't have to edit most of the methods in the given file.

    Open to random line

  11. At the top of the file, you can now start implementing the algorithm to solve the given task

    Scroll to top

    Solve exercise

  12. Click Compile to see if you have any syntax or type errors to correct

    Click compile

  13. If your code compiled successfully, you can now click testAll() again to see if the tests pass

    Click testAll

  14. If the test output doesn't say FAIL anywhere, you're done!

    Test successes

  15. Right click Submit and choose submit(String taskID, String username, String password). Remember to put "quotes" around the three strings. Find the Task ID in the task description.

    Click submit

  16. Enter the username and password your TA gave you, and enter the ID for this task. If the task ends in "-2", that means you can get 1 point for a correct solution and an additional 1 point for a fast solution.

    Enter credentials

  17. Your code will be submitted to the automated judge, and after a while you will see the judgement. Remember to switch to the console window of BlueJ if it doesn't appear automatically.

    Submit success

Step-by-step guide for IntelliJ

  1. Create a new java project normally.
  2. Add the needed files from the specific task to the src folder, along with the Submit.java file.
  3. Open the Submit.java file, and chance the boolean flag 'intellij' at the top to 'true'.
  4. To test the implementation, open the Submit.java file. In the main method at the top, add calls to the static test methods in the provided files for the task, and run the code.
  5. To submit the code, uncomment the line with the submit call in the main method, add the needed credentials, and run the code.

Common mistakes

  • Submitting code that calls System.out for debugging. System.out.println() is a good tool to use if you can't find out why your solution doesn't work. However, the judge gets confused if you leave in calls to System.out.println() when submitting your code, since it looks at the output of the main() method to determine if your solution is correct. Remember to comment out any System.out-lines in your own code before calling submit()!

If you believe there are other common mistakes that should be mentioned in this list, let us know on the Brightpsace discussion board.

About

DOMjudge submit client written in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published