mardi 21 mars 2017

Which type of methods is preferred in OOP?

In case of encapsulated flag, which is the preferred set of methods, for e.g.

class CFlag {
  void setFlag(void);
  void clrFlag(void);
};

v.s.

class CFlag {
  void writeFlag(_Bool x);
};

And is it the same if the flag is a physical signal, for e.g. a LED?

Aucun commentaire:

Enregistrer un commentaire