Question: Given the following class definition: class Entry Private: string name; int phoneNumber; string address; public: Entry; void setvals(string, int, string); void display () const; int

 Given the following class definition: class Entry Private: string name; int

Given the following class definition: class Entry Private: string name; int phoneNumber; string address; public: Entry; void setvals(string, int, string); void display () const; int getPhone Number(); -Entry; a) Modify the class according to the following: 1. Add a private static integer data member named NumEntries that must be: Incremented whenever a new entry object is created. Decremented whenever an entry object is destroyed. 2. Add a public static getter function for NumEntries. 3. Write the code for the display function using this pointer. 4. Implement a friend functions that compares two entries: int computeDistance(SoccerPlayer & pl, Soccer Player & p2)

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!