• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Shall we write comment for the private methods and variables?Thank you for reply.
Best,
Damu
 
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Just the other day, I was thinking ... about this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic