Hi,

We have a project which contains a number of 'Entity' classes - classes which hold data to be passed around. As we are dealing with C++, is it a rule that Get() and Set() methods are necessary for all the private data members ?

It sometimes seems to be an overheard having these methods but in the interests of OOAD, is it a rule that data should be private and hence accessed only using the Set()/Get() implementations ?

Ofcourse C++ texts would insist on the Set/Get() implementations, but in real life projects with a number of simple data types in a class (entity class), is it necessary for the accessor and mutators ?

I would personally do away with Set() and Get() because the entity classes by themselves are so simple that can be replicated in structures too.

Please let me know your thoughts.