01-15-2012, 05:09 AM
|
#2 (permalink)
|
|
The Addict
Join Date: Aug 2008
Posts: 336
Thanks: 8
|
In this case I don't see a gain in making a class out of 1 function. You would gain more if for example you have a class for weeks and there are different actions that a developer can make that class have. For example a developer can make a week to be print out in different formats, to be added or substracted. Stuff like that.
I am not sure if I explained myself well, but there are various reasons to design classes and one of them is to encapsulate common actions (methods) applied to an object.
|
|
|
|