I am reading about the Abstract Factory Pattern. As far as I understand, the client code is going to have references to the constructed objects via the abstract interface. This means that if you extend the abstract factory to make objects that have new methods, you can't call them. This seems like a tight restriction. Why have all these subclasses when the client won't even be able to access any new methods or variables?
Aucun commentaire:
Enregistrer un commentaire