File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes public/private Methods in assignment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "public/private Methods in assignment" Watch "public/private Methods in assignment" New topic

public/private Methods in assignment

Sandra Baker

Joined: Jul 10, 2002
Posts: 26
I am about to wrap up my assignment, and found that almost all methods in my FlightBooking application classes only need to be private. In another word, they are application-specific methods, not really usable for other applications (not like Data class). Does this look right to you?
If private methods are okay, then, I am confused what the javadoc would look like, since only those Data class/DataServer class related methods are public to be shown in the javadoc API.....
I am really worried.... any help would be very very appreciated....TIA
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I had some doubts about this too when I submitted my assignment. I had programmed everything in a way that seemed very natural to me:
everything that is only needed from within the class is private, everything needed by other classes is public.
I took the easy way out and just left it as it was, and I passed !
I don't think the assignments are graded to such a low level (Sun has to grade too many to do that in my opinion).
More important is a rational, clear and consistent divisioning of functionality in classes and packages, I think.
hope this lightens your worries. I know pushing that "Submit assignment" button is something very stressing ...
I agree. Here's the link:
subject: public/private Methods in assignment
It's not a secret anymore!