lundi 12 août 2019

Status of procedures(methods and operations) in objects in Design Patterns

I am reading the book Design Patterns written by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides.

Page 11, it is written : "An object packages both data and the procedures that operate on the data".

But I still have a question :

When you code in C++ : when an object is instantiated, does it really have in its own Assembly code of the methods generated by the compiler ? Or is the method common to all objects generated from the same class ?

That's a question that I have since a while.

Thank you in advance.

Aucun commentaire:

Enregistrer un commentaire