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 pet_patients. 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 V1(Dr. Sarah Thomas, 123 address, 123-456-7890)
Create V2(Dr. Dalia Jack, 223 address, 222-333-4444)
Display V1
Display V2
Create P1(111, fluffy, 2, dog, M, Thomas, 111 address, 111-222-3333)
Create P2(222, wonders, 1, cat, M, Sandra, 234 address, 111-234-3333)
Create P3(333, fancy, 2, rabbit, F, Laila, 112 address, 111-222-3432)
Create P4(444, button, 3, dog, F, Jack, 634 address, 111-222-4567)
Create P5(555, sparkles ,2, dog, F, Tom, 889 address, 111-222-1254)
Create P6(666, Lola ,2, dog, F, William, 345 address, 111-222-8876)
Add pets 1,3,4,5 to V1
Add pets 2,6 to V2
Display P5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!