I'm trying to wrap my head around delegation. Put simply, my understanding is that one class delegates it's responsibilities to another class with a protocol definition handling the "contract" between the two. What is the point of this? Why not just have the delegating class handle it's own methods? Where can I read deeper about this concept?
Aucun commentaire:
Enregistrer un commentaire