mardi 30 décembre 2014

Object Oriented Programming with PHP [on hold]

I have task in OOP PHP,and here is one part which i don`t understand:



Characteristics of the health institution are:
1.Doktor (name, specialty) has more than one patient (name, ID number,
health records).
2.Pacient can have only one doctor.


I understand that i need to create two classes,Doctor and Patient,but i don`t understand how to make restrictions that doctor can have more than one patient,and patient can have only one doctor.Is there any design pattern for that?And task is to do this without creating MySQL database,focus is on OOP programming and way of thinking.


Aucun commentaire:

Enregistrer un commentaire