<?php
require_once('Doctor.php');
require_once('Surgeon.php');
require_once('Dermatologist.php');
require_once('Cardiologist.php');
require_once('Neurosurgeon.php');
echo '***** Doctor *****<br/>';
$aDoctor = new Doctor();
$aDoctor->setName("Larry");
$aDoctor->drawBlood();
echo '<br/>***** Surgeon *****<br/>';
$aSurgeon = new Surgeon();
$aSurgeon->setName("Homer");
$aSurgeon->drawBlood(); // inherited from the base class Doctor
$aSurgeon->cutPeopleOpen();
echo '<br/>***** Dermatologist *****<br/>';
$aDermatologist = new Dermatologist();
$aDermatologist->setName("Sinefeld");
$aDermatologist->drawBlood(); // inherited from the base class Doctor
$aDermatologist->popPimples();
echo '<br/>***** Cardiologist *****<br/>';
$aCardiologist = new Cardiologist();
$aCardiologist->setName('Kevorkian');
$aCardiologist->drawBlood(); // overridden from the base class Doctor
$aCardiologist->cutPeopleOpen(); // inherited from the base class Surgeon
$aCardiologist->harvestHearts();
echo '<br/>***** Neurosurgeon *****<br/>';
$aNeurosurgeon = new Neurosurgeon();
$aNeurosurgeon->setName('Frankenstein');
$aNeurosurgeon->drawBlood(); // inherited from the base class Doctor
$aNeurosurgeon->cutPeopleOpen(); // inherited from the base class Surgeon
$aNeurosurgeon->removeSkull();
echo '<br/>***** All Doctors to Draw Blood Stat!<br/>';
$doctors = array($aDoctor, $aSurgeon, $aDermatologist,
$aCardiologist, $aNeurosurgeon);
foreach ($doctors as $doctor)
{
$doctor->drawBlood();
}