-
Question: Explain
why you should document your code
and why you should use a disciplined method.
-
Question: Explain
what Javadoc does for you.
- Why documenting your program's code is important
- Why using the disciplined design method called Javadoc is important
| Documenting your program's code
|
-
Question: How many
doc comments are in the Eye.java file of the JavaEyes project?
- Confirm that your answer is the same as the
number of doc comments that I counted.
(If not, get help as needed.)
- Look closely at a couple of the doc comments
that are in the Eye.java file in JavaEyes,
to see the basic format and what is contained within.
- How to write Javadoc comments
| How to write Javadoc comments
|
-
Make the HTML documentation for JavaEyes.
- When you make the documentation,
a bunch of messages will appear in the bottom pane,
most of which begin with Generating ....
The last message should be "Process Completed."
-
Show the HTML documentation for JavaEyes.
- When you show the documentation,
the HTML version of the doc comments should appear in your browser.
If you don't see HTML that describes JavaEyes, get help now.
- How to create HTML documentation from Javadoc comments
- How easy it is to create HTML documentation from Javadoc comments
- The value of HTML documentation for your program's code
|
The Javadoc program creates HTML files from your Javadoc comments.
You can run this program from a MS-DOS Prompt
but it is easier to run it from inside JCreator, as follows:
- To create HTML documentation from Javadoc comments,
select Tools -> Make HTML Documentation.
- If you make changes to a project's Javadoc comments,
recompile the project before doing the above,
since compiling saves the files.
- To view the HTML documentation, point your browser to
the docs subfolder of the project or (more simply) just select
Tools -> Show HTML Documentation.
If you lack these items in your Tools menu,
then get help now
to complete items 9 and 10 in the setup of JCreator Pro.
|
- Using your browser:
- Find the documentation for the Eye class.
- Find the summary of the documentation for the look method.
- Find the details of the documentation for the look method.
- Make sure that you understand how to find your way in the javadoc-generated html.
- How to find the documentation for a given class
- How to find the summary of the documentation for a given method
- How to find the details of the documentation for a given method
|
- To find the documentation for a given class:
- Use the All Classes frame on the left
- To find the summary of the documentation for a given method:
- Click the METHOD link at the top of the page for the class, then scroll as needed
- To find the details of the documentation for a given method:
- Click the link to the method in the summary item
|
- At the appropriate place in the JavaEyes code,
list you, your partner and the existing authors as co-authors in the
@author tag
of the EyeBall class.
- Compile the project.
- This will save the file with the code, thus saving the changes you just made
(otherwise the next step will not notice them).
- You should routinely compile after changing your code,
to be sure that your changes did not introduce errors.
- Re-make and re-show the HTML documentation for JavaEyes.
Confirm that your newly-typed information
(including the authors) now appears in the newly generated HTML.
- You may need to use your browser's Reload button.
- How to modify doc comments
- How easy it is to create HTML documentation from Javadoc comments
- The value of HTML documentation for your program's code
| How to write Javadoc comments
- Checkin your JavaEyes project, tagging it
Stage4
spelled just like that.
|
- How to checkin a project (update, add contents, commit, tag)
- What checking out a project accomplishes
- What checking in a project accomplishes
- Why version control is useful
| How to checkin a project
(update, add contents, commit and tag)
by using Tortoise CVS
|
Summary
- Question:
Write (in your report, not in JCreator) a doc comment for the Capitalizer's
transform method:
String transform(String thePhrase) {
return thePhrase.toUpperCase();
}
- Compare your answer to
my doc comment for the Capitalizer's transform method.
- Question:
How much time did you spend on Part 4 of JavaEyes?
|  
|  
|
- Close your JavaEyes project in the proper fashion.
|
| To close a project:
It is best to leave a "clean slate" when you exit a JCreator project. To do so:
- Window ~ Close All
- File ~ Save Workspace
- File ~ Close Workspace
| | | | | | |