This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
yes I did try to do it myself. I wrote some comments but they didn't sound too right. I did alot of research but still. I am trying to produce relevant comments so that I can produce the javadoc in the right way. I commented some parts but I ended up with complicated javadocs. I thought I would get someone else's solutions to try to learn and understand how they derived at their commented solution. I would appreciate if you can assist me in any way.
If you want some hints for writing javadoc comments, I'd recommend that you download the source to a well known Open Source Java project (Http://jakarta.apache.org has a bunch of them) and see what you like and dislike about the comments in that project.
Most developers don't enjoy documenting their own code, much less someone else's. [ December 29, 2005: Message edited by: Ben Souther ]
Dave, we don't do other people's work here, especially homework, so I have sort of commented your code so that you get the basics, but you will have to write your own comments and remove some of mine before you turn in your homework.
I only commented public methods that are not methods from an interface, which already has Javadocs. But I did in a couple of cases like actionPerformed.
So tell us what you have learned from my doing some of your work.
[ December 29, 2005: Message edited by: Mark Spritzler ]
Thanks, it did help to an extent. I learnt that for each constructor and methods, I should provide comments to support what function it performs. I know I have to re-structure my coding to support Sun's java programming standards, so I'll take note of it. I am aware of what each method does but I am unsure as to the appropriate wording and context in which to implement it so as to produce efficient and effective javadocs. That's why I asked for another person's input. For instance, the actionPerformed method I believe is called to perform the binary and linear searches. The chekNext method checks to see if a linear search was chosen or a binary search was chosen, whether or not to perform calculations that calls the repaint method to output the actual linear or binary results. The class Seeker implements the interface Runnable, which creates a new ShellGame and performs calculations that either starts the searches or stops the searches. Am I on the right track? Please advise me or correct me where I was wrong. Thanks.