Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A old question: shall we write comment for the private methods and variables?

 
Bigwood Liu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Shall we write comment for the private methods and variables?Thank you for reply.
Best,
Damu
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Damu,
It's not mandatory. I know that some people did (Andrew did for sure), while others just documented public ones as stated in the instructions. I think I'll do something between both : document everything in my db, net and util packages while being far less talkative in the GUI part. Would it make any sense to document a private JButton instance named bookButton with something like "This is a button which - when clicked by the user - will call a book method" ?!
Best,
Phil.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written comments for all components.
However, I wanna ask, when I submit the Javadoc with the assignment,
should I generate all of them?
or ONLY public and protected methods and variables?
or even ONLY public methods and variables?
Thanks.
 
Dave Knipp
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you only need to generate public and protected methods and vars b/c thats how sun does it, they never include any private members in the api do they?
Dave
 
Bigwood Liu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends, Thank you.
I prefer to doc only the public/protected/friendly member. After all it is more simple . Is there anyone pass the exam with such doc?
Best,
Damu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic