An example person file is:
Bob 1001 18 155
Sue 1002 25 120
Tom 1003 35 160
Mary 1004 23 135
John 1005 25 195
Where the first field is the name, second is an id, the third is an age, and the last is a weight.
And example pet file is:
cat Fluffy 1001 5
cat Stimpy 1005 15
dog Marmaduke 1002 9
dog Snoopy 1002 12
cat Nermal 1002 1
Where for both cats and dogs the first field specifies the pet is a cat or a dog, the second is the name of the pet, the third is the id number of it's owner, the last is the age of the pet.
Your program should be composed of the following classes: Person, Cat, Dog, Driver. The Driver class will have the main() function and it will read the two files. First it will read in the people.txt file and create a List of Person objects. Then it will read the pets.txt file and for each pet create a Dog or Cat object and add it to the correct Person object in the people list. You should use an iterator over the people list to find the right Person object, based on the owner id of the pet, and then add the pet to the person object. Obviously the Person class will need addCat() and addDog() methods. Your Person class should have a list of dogs and a list of cats so that a Person can own many cats and dogs. After loading the files your program should print out the following: