1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
class Driver: virtual public Person{
protected:
string idNum, address, licenceDate,licenceType;
float kilomiters;
bool booked;
public:
void changeStatus(){booked = true;};
Driver() {};
Driver (string nam, string ph, string id, string add, string licenceD, string licenceT, float kil, bool b){name = nam; phoneNo = ph; idNum = id;
address = add; licenceDate = licenceD; licenceType = licenceT; kilomiters = kil; booked = b;};
}driver[6];
int main(){
Driver driver[0]("Tom Daly", "087-6543210", "1234567A", "14 Green St., Cork", "12/08/2008", "B", 23231, false);
Driver driver[1]("Anne O'Brien", "086-5432109", "2345678B", "\"Beach View\", Kinsale", "09/12/2011", "D", 11980, false);
Driver driver[2]("James Twomey", "085-4321098", "3456789B", "14, French St., Cork", "14/11/2010", "D1", 18414, false);
Driver driver[3]("Mary O'Neill", "089-8765432", "4567890C", "23 Castle Road, Youghal", "11/02/2014", "B", 12669, false);
Driver driver[4]("Brendan Brown", "083-2109876", "5678901D", "98 Nuns Walk, Cork", "01/04/2007", "D", 23864, false);
Driver driver[5]("Vincent Coy", "087-8901234", "6789012E", "\"Green Valley\", Cobh", "03/04/1998", "D1", 3416, false);
return 0;
}
|