Exemple #1
0
 public void AddDoctor(BaseDoctor doctor)
 {
     if (doctor is Dentist)
     {
         dentist = (Dentist)doctor;
     }
     if (doctor is ENT)
     {
         ent = (ENT)doctor;
     }
     if (doctor is Podiatrist)
     {
         podiatrist = (Podiatrist)doctor;
     }
 }
Exemple #2
0
        public void SetUp()
        {
            patient1 = new Patient("John Doe1", "Podiatristcomplaint3");
            patient2 = new Patient("John Doe2", "Dentistcomplaint2");
            patient3 = new Patient("John Doe3", "ENTcomplaint1");
            patient4 = new Patient("John Doe4", "Pain simulation");

            dentist = new Dentist("Brian Smith");
            ent = new ENT("Colin Johnson");
            podiatrist = new Podiatrist("Dominic Taylor");
            List<BaseDoctor> doctors = new List<BaseDoctor> { dentist, ent, podiatrist };

            hospital = new Hospital();
            hospital.AddRangeDoctors(doctors);

            insuranceCompany = new InsuranceCompany();
            List<Person> clients = new List<Person> { patient1, patient2, patient3, patient4 };
            insuranceCompany.AddRangeClients(clients);
        }