coders-school / desktop-business-app

0 stars 4 forks source link

Add pure virtual function to Person class #31

Open BaqWin opened 7 months ago

BaqWin commented 7 months ago
          I think we want Person to be an abstract class.

One way to achieve this is to make one of the functions pure virtual (adding = 0). The problem is, that we don't have a candidate for a virtual function yet (all setters so far can be inherited without virtuality). And chances are, there won't be any.

Still we don't want Person object class to be created except when inherited. So please make constructor protected until a good function candidate arises

_Originally posted by @mBialczak in https://github.com/coders-school/desktop-business-app/pull/28#discussion_r1523931425_

mBialczak commented 7 months ago

Optionally and the fastest way for now is making the constructor protected I think.