Question: Write a program to model simple interaction between veterinarian objects, and pet objects. A Vet has a name, address, phone number and integer array for
Write a program to model simple interaction between veterinarian objects, and pet objects.
A Vet has a name, address, phone number and integer array for petpatients. Has set and get methods for attributes and addPet which assigns them ID numbers of pets. removePet which removes the pet from their care. displayInfo which displays vet information.
A Pet has an ID name, age, breed, sex, owner name, owner address, and owner phone. Has set and get methods for attributes. displayInfo prints the information of the pet.
Writes a test program that
Create VDr Sarah Thomas, address,
Create VDr Dalia Jack, address,
Display V
Display V
Create P fluffy, dog, M Thomas, address,
Create P wonders, cat, M Sandra, address,
Create P fancy, rabbit, F Laila, address,
Create P button, dog, F Jack, address,
Create P sparkles dog, F Tom, address,
Create P Lola dog, F William, address,
Add pets to V
Add pets to V
Display P
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
