Assignment #3:
using system;
public class Person {
private string name;
private string dob;
public Person (string aName, string aDob){
name = aName;
dob = aDob;
}
}
public class DoctorPerson : Person {
private string dateEmployed;
private string specialty;
public DoctorPerson (string aName, string aDob, string adateEmp,
string aspec) : base(aName, aDob){
dateEmployed = adateEmp;
specialty = aspec;
}
}
public class PatientPerson : Person {
private string employer;
private string insuranceCo;
private Treatment[] treatments;
public PatientPerson (string aName, string aDob, string empl,
string insure) : base(aName, aDob){
employer = empl;
insuranceCo = insure;
treatments = new Treatment[100];
}
public void getAllTreatments (int index, string* tDate, string* sttTime,
string* eTime){
tDate = treatments[index].getTreatmentDate();
stTime = treatments[index].getStartTime();
eTime = treatments[index].getEndTime();
}
}
public class Treatment {
private string date;
private string startTime;
private string endTime;
public Treatment (string aDate, string astartTime,
string aendTime){
date = aDate;
startTime = astartTime;
endTime = aendTime;
}
public void setDate(string aDate){
date = aDate;
}
public string getDate(){
return date;
}
public void setStartTime(string aTime) {
startTime = aTime;
}
public string getStartTime(){
return startTime;
}
public void setEndTime(string aTime) {
endTime = aTime;
}
public string getEndTime(){
return endTime;
}
}