Hi :)

Is it better to have a one file program (ex. MyProgram.class) or a multiple file one (ex. Main.class and Gui.class and Draw.class)?

thx

Recommended Answers

All 4 Replies

Hi :)

Is it better to have a one file program (ex. MyProgram.class) or a multiple file one (ex. Main.class and Gui.class and Draw.class)?

thx

Well i think that it may be a matter of opinion. Some people find working with one big class easier than working with numerous smaller classes. As regards to your particular classes I think that you should keep them all in different classes.
I had a similar program to yours but I had two classes: One that created the GUI window, the other that drew the shapes to be used on the GUI window.
Good Luck

it's no matter of opinion at all. The God Class (which having one massive class is called) is known to be a very bad thing.
It's a well documented anti-pattern.

it's no matter of opinion at all. The God Class (which having one massive class is called) is known to be a very bad thing.
It's a well documented anti-pattern.

I thought as much, but while googl'ing I couldn't find a definitive answer. Thank you for all the help :)

Fuck You Ilon You Fucking CockSucker
I Will Fucking break into your computer If you have one
And Destroyyyyyy It!!!!

commented: Time to delete this post, and the poster -3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.