Brian
Thu Apr 24 16:01:52 CDT 2008
On Apr 19, 5:27=A0pm, Jeff Louie <anonym...@devdex.com> wrote:
> If you must, here is some code:
>
>
http://www.geocities.com/jeff_louie/OOP/oop40.htm
>
> Regards,
> Jeff
>
> *** Sent via Developersdex
http://www.developersdex.com***
One disadvantage to this approach is that the implicit protocol for
subclasses can be circumvented. I could subclass OnlyMaleAnimal and
provide a public constructor making it possible to have many different
instances of OnlyMaleAnimal. If the class hierarchy represented some
kind of security data structure that could be a potential security
flaw. To be fair though, the GoF pattern doesn't address this either.