• 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

JavaDoc

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
My assignment spec says the final submission must have 'JavaDoc documentation for all classes and interfaces you are submitting'. Here are my questions.
1.Many or most of my classes don't have to be public. Should I make all classes public and include doc comments, to meet the above criteria?
2.I have very few public methods in my classes. They all have package level access or private access. Should I include doc comments for such methods? They are not going to be generated anyway in the javadoc.

Advanced thanks for your response.

Regards
 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't need to make all classes public. However, I use Javadoc for public, protected, package and private level methods andattributes.
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I also did not make classes public that did not need to be (I think that would be a bad idea that will probably cost you points in the OO or General Considerations categories).

As a habit, I added comments to all methods, even private ones and to all fields that had package level or better visibility. I generated the javadoc using the -package flag. I got the full score in the documentation category, so I guess it was OK.

Frans.
 
Vengan Krish
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to all who replied. I'll got the same way as you guys.


Regards
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic