Course Solutions Uncategorized (Solved) : Coding Language C Implement Class Person Following Fields Name Pointer Person S Best Frien Q27364717 . . . .

(Solved) : Coding Language C Implement Class Person Following Fields Name Pointer Person S Best Frien Q27364717 . . . .

 

The coding language is C++

Implement a class Person with the following fields:

– the name

– a pointer to the person’s best friend (a Person*)

– a popularity counter that indicates how many other people havethis person as their best friend

Write a program that reads in a list of names, allocates a newPerson for each of them, and stores them in avector<Person*>. Then ask the name of the bestfriend for each of the Person objects. Locate the object matchingthe friend’s name and call a set_best_friend memberfunction to update the pointer and counter. Finally, print out allPerson objects, listing the name, besr friend, and

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post