You are on page 1of 1

HOME WORK 07

Example for multiple inheritance

Define the next hierarchy of classes:

Name -> |
Date -> | -> Person
Address -> |

The classes will contain, at a minimum, the following member data:

 class name: firstName, lastName


 class date: day, month, year
 class address: city, street, number, zipcode

Class person is derived from the tree.

Each class will have defined methods for keyboard data entry, data display, equality operator.

A list of people will be created, assigned dynamically, for whom data is read and displayed; it checks to
see if there are people with the same name, same date of birth or same address with a person entered
from keyboard.

You might also like