D
Darren
I have a Person object and from that I'm inheriting other objects
including Client, Carer, Doctor (and others). The Person object has a
large number of properties and methods that I want available in
Client, Carer and Doctor.
Person <- Client
Person <- Carer
Person <- Doctor
My problem however is an individual can be a Client and a Carer so in
this situation I want multiple inheritance.
Person <- Client
<- Carer
Another time an individual might be a Carer and a Doctor.
Person <- Carer
<- Doctor
Obviously I can't do this. I need some design that allows me to test
whether a Person is a Carer, Client or Docotor and then get the object
for it.
Any ideas?
Thanks,
Darren.
including Client, Carer, Doctor (and others). The Person object has a
large number of properties and methods that I want available in
Client, Carer and Doctor.
Person <- Client
Person <- Carer
Person <- Doctor
My problem however is an individual can be a Client and a Carer so in
this situation I want multiple inheritance.
Person <- Client
<- Carer
Another time an individual might be a Carer and a Doctor.
Person <- Carer
<- Doctor
Obviously I can't do this. I need some design that allows me to test
whether a Person is a Carer, Client or Docotor and then get the object
for it.
Any ideas?
Thanks,
Darren.