⌛⌛ JSON & JavaDoc

Submit your code as a Maven project. Fetch task material from student_template_project.

This task concerns creating JavaDoc documentation for classes of a package. The task will use the classes Node, ArrayNode, ObjectNode and ValueNode from a previous JSON task almost as such.

The task material provides an example JavaDoc documentation. You should reorganize and modify the classes Node, ArrayNode, ObjectNode and ValueNode in such manner that Java’s javadoc tool will generate documentation similar to the provided example documentation.

You should on one hand add suitable JavaDoc comments into the code files, and on the other hand also do some small modifications: the example documentation reflects some changes in comparison to the previous JSON task.

  • The classes now belong to the package fi.tuni.prog3.json.

  • The classes ArrayNode, ObjectNode and ValueNode now have the specifier final.

  • The classes ArrayNode and ObjectNode now have explicit constructor definitions (so that we can provide JavaDoc comments for them).

  • Some member functions now throw exceptions.

  • The class Node does not (need to) have print functions.

    • You may either remove them altogether, make them private or provide @hidden JavaDoc comments for them.

Your code will be handled as a Maven project. The minimum requirement is that the code must reside in the directory src/main/java and follow the usual package-based directory structure. The actual functionality of the classes will not be tested, but the code must compile without errors.

Testing

The grader seeks to check whether the JavaDoc documentation generated from your code files is similar with the provided example documentation. To be more precise, the check concerns the HTML files in the subdirectory apidocs/fi/tuni/prog3/json (you may view the files in a browser and compare them with the example documentation).

In order to make the documentation checks work smoothly, it is highly recommended that you copy-paste the JavaDoc comment texts more or less directly from the example documentation.

Although your submission should consist of a Maven project, you do not have to use Maven for generating the JavaDoc documentation on your own computer. You may instead use the javadoc tool directly e.g. as javadoc -d apidocs -sourcepath src/main/java fi.tuni.prog3.json and then compare the HTML files in the directory apidocs/fi/tuni/prog3/json with the corresponding files in the example documentation.

But as mentioned further above, your code does need to compile without errors. The grader will both compile your code with Maven as mvn package and generate the JavaDoc documentation. There are no special requirements regarding your Maven project file; the grader will anyway use its own project file when compiling your code.

A+ presents the exercise submission form here.