Proper programming procedure?

Posted by Rob on Stack Overflow See other posts from Stack Overflow or by Rob
Published on 2011-06-24T23:58:46Z Indexed on 2011/06/25 0:22 UTC
Read the original article Hit count: 159

Filed under:
|

I am creating a scoring application which is dependent upon what a user selects at the beginning menu.

Example:

If a user clicks 18, I want it to base itself off 18 holes of golf.

If a user clicks 9, I want it to base itself off 9 holes of golf.

Is it better to create a separate class for the code for 9 holes, and then another for 18 holes and then launch whichever depending on what the user selects? Or should I keep everything in 1 file and use a global variable to define different parameters?

Still very new to android programming (or programming in general) so not sure of the proper "etiquette" if you will...

Also what would be the pro's and con's of doing it either way? (If any)

Thanks in advance!

© Stack Overflow or respective owner

Related posts about android

Related posts about etiquette