Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
A solution, though it may be a bit idealistic, is to follow the "uniform access" priciple. I.e. not to have any public fields and access to all fields through "get" functions. In the coffie cup example, we would be replacing "if (cup.getSize() == CoffeeCup.TALL)" by something like "if (cup.isTall())". How does that sound? Replies: |
Sponsored Links
|