Hi,
Maybe I misunderstand, I often start an email like this.
SubjectOfInvestigationGPIC has in its core two classes which are, in my opinion is one redundant and gives programmers extrawork to do.
There is IdentifiedLivingSubject, which contains the name of the subject, and the ID
And there is SubjectOfCare, which is a generalisation of SubjectOfCarePerson which is a generalisation of PatientExtendedInformation
But SubjectOfCarePerson is also a generalisation of IdentifiedLivingSubject
It would be easy to do when SubjectOfCarePerson would contain attributes which are simular in its specialisations
For me, that is the only reason why you ever create constructions like this.
What is the case,
SubjectOfCare has no attributes at all
SubjectOfCarePerson has no attributes at all
but e.g., the specialisation:
IdentifiedLivingSubject has a name- and id-attribute
PatientExtendedInformation has a name- and id-attribute
PatientStandardInformation has a name- and id-attribute
That leaves the job tot the programmer to write redundant code, which is dangerous, the same code has to be maintained on more locations, which is errorprone and inefficient.
Is there a good reason for inheritance here, if so, please explain it to me.
If (abstract) classes have no attributes at all, what is their reason for existance?
Thanks very much in advance
Kind regards
Bert Verhees