Question: [ 1 0 pts ] ( Chapter 1 5 : Polymorphism ) You are running a pet clinic and need a program to manage the
ptsChapter : Polymorphism You are running a pet clinic and need a program to
manage the pets. Create a base class Pet. We need to store the following information,
with the type in parenthesis, in the base class Pet: name string age int dates of visits
string pointer Since the dates of visits can grow, we need to use a string pointer to a
dyamic array of strings and each date is recorded in a string object in the following
formatmmddyyyy In addition, we need a class Dog that is a derived class of Pet.
The derived class Dog contains the following member variables: breed string and dates
of vaccination shots string pointer The type of dates of vaccination shots is the same
as dates of visits and we should use a string pointer to a dynamic array of strings. You
need to define the following member and friend functions for Pet:
Constructor
Virtual Destructor
Accessors and mutators
Virtual function print to print the name, age, and dates of visits
Copy constructor
Overloaded assignment operator
Also define the following member functions for Dog:
Constructor
Virtual destructor
Accessors and mutators
Virtual function print to print name, age, dates of visits, breed, and dates of
shots
Copy constructor
Overloaded assignment operator
Test your program. Write a function PrintBill that takes an argument of a reference to
Pet and print out the pets information. Decalre a Dog object, fill in the necessary
information, and call PrintBill.
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
