- COMP.CS.140
- 10. Work Distribution and Working in a Team
- 10.3 ⌛⌛ JSON & Javadoc
⌛⌛ JSON & Javadoc¶
Note!
New branches were created in the previous task. Please, make sure that you are working in
the main
branch in this task.
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.
Submit your code as a Maven project.
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 example documentation
provided in the round10\javadocjson\apidocs
directory of the remote material repository.
Order the functions in your own classes to the order given in the example documentation.
Do not create or comment the package-info.java file.
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
. Therefore, your files should be in theround10\javadocjson\src\main\java\fi\tuni\prog3\json
directory.The classes
Node
,ArrayNode
andObjectNode
now have explicit constructor definitions so that we can provide Javadoc comments for them.Some member functions now throw exceptions.
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.
Place the JsonTest.java
file in the round10\javadocjson\src\main\java
directory,
if you wish to test your Maven project with a test class.
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 even if the tester does not assume that comments are worded identically.
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, for example, as
javadoc -d myapidocs -sourcepath src/main/java fi.tuni.prog3.json
and then compare the HTML files
in the directory myapidocs\fi\tuni\prog3\json
with the corresponding files in the example
documentation. It is assumed above that the command is given in the root directory
round10\javadocjson
of the Maven project.
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 pom.xml
project file, when compiling your code.
A+ presents the exercise submission form here.