Question: You are given the following segment of code. All the following C++ questions are based on this code class Ownerf public int Phone, string sEmail;


You are given the following segment of code. All the following C++ questions are based on this code class Ownerf public int Phone, string sEmail; Owner(int phone, string email)f II constructor iPhone phone; sEmail email; class Pet public string sName; Owner "pOwner; Pet(string name, int phone, string email) f II constructor sName -name; pOwner new Owner(phone, email); class Cat public Pet public string cBreed; int iAge; Cat(string name, int phone, string email, string breed, int age)... I/ write the constructor class PetNode public PetNode pNext Pet PetNode() { pNode = NULL; pNext = NULL; }; pNode; )'head = NULL; // head is the global pointer to the PetNode linked list void insertPet); void insertCat) Il void main(void) Pet* p; Cat* c; PetNode* pn; // input the data here insertPet(...); insertCat(...)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
