Write a program that reads in a list of names allocates a


Implement a class person with the following fields:

The name

A pointer to the persons best friend

A popularity counter that indicates how many people have this person as their best friend

  • Write a program that reads in a list of names, allocates a new Peron for every one of them, and places them in a vector. Next, request the name of each best friend for every Person objects. Find the object matching the friendâs name, and call a set_best_friend member function to update the pointer and counter. Lastly, print out every Person objects. Labeling the name, best friend, and popularity counter for all
  • PLEASE USE THE NAME DANTE

Please provide a text file of the code and a screenshot (JPEG) of the outcome.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a program that reads in a list of names allocates a
Reference No:- TGS02276213

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)