|
On DocumentationDocumentation is the bridge between the general specifications for your program and the actual code. You should document your code either before or while you write it, not as an afterthought. Using JavaDoc comments (/** */) you should include at least:
You should also use implementation comments (/* */ and //) to comment on tricky or confusing sections of code. Here is an partial example of such JavaDoc documentation (without the code): Employee.java. JavaDocWhen you're done writing your code, you can type:
at the command line, where [file].java is your source code. (On uhunix, you should use javadoc2). This will create a webpage of your documentation that looks like the Java2 API Documentation.
Here is an example of such a page created from the documentation given above: Employee.html
The
So, an example javadoc command is:
You can learn more about JavaDoc in general and How to Write JavaDoc Comments directly from java.sun.com. |
~ztomasze Index :
TA Details: ICS211: Docs http://www2.hawaii.edu/~ztomasze |
Last Edited: 01 Sept 2003 ©2002 by Z. Tomaszewski. |