By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,790 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

Single Class or Several Small Classes?

KodeKrazy
P: 32
I would like to get the opinions of the members of this forum on whether you think it is better to write a single class with all the functions, declarations, etc. or do you consider it better form to group similar functions/subs into smaller classes? Why? What are the advantages/disadvantages of both methods?
Apr 23 '08 #1
Share this Question
Share on Google+
1 Reply


kadghar
Expert 100+
P: 1,295
I would like to get the opinions of the members of this forum on whether you think it is better to write a single class with all the functions, declarations, etc. or do you consider it better form to group similar functions/subs into smaller classes? Why? What are the advantages/disadvantages of both methods?
I always work with different classes, they're not that small, but they group similar functions. i.e.

I usually have all the public declarations in only one, but the procedures are well grouped; If working on a calculator, i'd use a Calculus, Trigonometrics, Basics, etc.

Each one with 10 to 15 procs.

Its easier to find things and to keep it all organized. But i think it depends on how it works for each one.
Apr 23 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.