File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes producing javadoc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "producing javadoc" Watch "producing javadoc" New topic
Author

producing javadoc

dave mohammed
Greenhorn

Joined: Dec 29, 2005
Posts: 4
Hello, I want someone to comment off the following coding so that I can produce appropriate javadocs. Thanks. Here'e the coding:


[ December 29, 2005: Message edited by: Mark Spritzler ]

Dave Mohammed
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by dave mohammed:
I want someone to comment off the following coding so that I can produce appropriate javadocs.

Are you serious?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
Seems he forgot to add, "and I want it done, chop-chop!"


There is no emoticon for what I am feeling!
dave mohammed
Greenhorn

Joined: Dec 29, 2005
Posts: 4
Yes I'm serious. I just want appropriate comments so that I can produce javadoc. Please help, thanks.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Umm, No. We are not here to do your work. This is a place to learn. Have you tried doing it yourself? If so, what problems are you having?


GenRocket - Experts at Building Test Data
dave mohammed
Greenhorn

Joined: Dec 29, 2005
Posts: 4
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.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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 ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

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 ]

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
dave mohammed
Greenhorn

Joined: Dec 29, 2005
Posts: 4
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.
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

It seems by your last post that you want someone else to tell you what the code actually does. I didn't think you had written it to begin with, and now I don't think you understand it either.

I don't think this is a question of not knowing what to comment, but knowing what you are doing.

Please do not bring this kind of laziness to the advanced forum. If we had a forum where people can ask others to do both their work and their thinking for them, I'd move it there.

This thread is closed.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Yes Dave, I think you are on track. The comments you just wrote about what the method does is very good. It doesn't have to be perfect.

Mark
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

OH, and here is a good link that someone else mentioned and I want to add it to the bottom here.

http://java.sun.com/j2se/javadoc/writingdoccomments/

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: producing javadoc