Originally posted by Shyam Murarka:
I guess that WAS really a stupid question as far as I am concerned.
I don't want to hear you, or anyone else, say anything like this again hear at the Ranch, understand? There are no stupid questions.
There are a number of conventions that people use. I've see public, followed by protected, followed by private; I've seen the opposite, with private first. The convention I tend to use is for each public method to be followed by any private helper methods that it uses.
Originally posted by Ernest Friedman-Hill:
... There are a number of conventions that people use. I've see public, followed by protected, followed by private...
Note the reasoning behind this: It allows someone else to look at your code and see all of the public methods -- i.e., those available for outside use (sometimes called the "public interface") -- grouped together up front, so they don't need to look through a lot of supporting code to find something.
Originally posted by Donna Bachner:
Thanks for letting me know I can put them whatever way I choose. It makes life easier for me.
Yes, you can do it however you choose. Like others have said, there are lots of ways to do it. Just make sure it is in some logical order of your choosing. If each class you write is organized randomly, it will make life harder.