I have been struggling with the abstraction that lies between two classes when it comes to the issue of Inheritance
or Composition
...the IS-A vs HAS-A relationship between classes like LoginManager
and AuthenticateManager
.
The way I see it LoginManager can be either and can sit comfortably in a IS-A place with AuthenticateManager, inheriting it as a superclass (ie Class LoginManager extends AuthenticateManager
) OR just declare AuthenticateManager's objects as members of its own class which would imply Composition, so i guess it just comes down to a thing of experience and the proper knowledge of the OOP paradigm. So please, can anyone help explain what a proper relationship would be between these classes?
PS: Please moderator don't close this topic as being inconsistent with the sites question asking principles.
Thanks.