Getters and Setters are bad OO design?
Posted
by Dan
on Stack Overflow
See other posts from Stack Overflow
or by Dan
Published on 2010-04-30T21:10:24Z
Indexed on
2010/04/30
21:17 UTC
Read the original article
Hit count: 453
Briefly reading over the above article I find that getters and setters are bad OO design and should be avoided as they go against Encapsulation and Data Hiding. As this is the case how can it be avoided when creating objects and how can one model objects to take this into account.
In cases where a getter or setter is required what other alternatives can be used?
Thanks.
© Stack Overflow or respective owner