The Source for Java Technology Collaboration
User: Password:



Start New Message Post a Reply

Subject:  superfluous getters and setters
Date:  2007-01-16 12:13:20
From:  xodox
Response to: superfluous getters and setters


if the bank clerk blindly does what the customers want, she's superfluous and the customer might as well take money from the safe himself.

Say that some time in the future all transaction to/from the safe had to be reported. Then the clerk had to tell all customers how to report and maybe even check that they did. Of course, if he always had bben the one to take the money from the safe, only the clerk would need to know how to report. In general, I think direct access to an attribute is bad design. You never know if some demand in the future needs something done when an attribute is changed og retrieved.


 Feed java.net RSS Feeds