Ron Wheeler wrote:
Not addressing properties is a requirement of OOP otherwise you break
encapsulation.
Allow me to politely disagree.
99% of the time, you are right. I just wrote a retirement calculator for
ING, entirely OOP, and there's not a public var to be found. Anywhere.
Let me back
I wouldn't even go so far as to say he's 99% right. More like 33.3%.
Private properties with Public getters and setters is used for one of
three reasons.
1) You need to do adjust the value of the property when set or get, such
as applying limits (max value is 100 so if you pass 150, set it to
Steven Sacks wrote:
I wouldn't even go so far as to say he's 99% right. More like 33.3%.
Private properties with Public getters and setters is used for one of
three reasons.
1) You need to do adjust the value of the property when set or get, such
as applying limits (max value is 100 so if
Don't forget that this started out as a discussion about teach newbies.
Not converting old farts.
LOL! Well played.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
4 matches
Mail list logo