Question: Implement class person with the following fields: - the name - a pointer to the persona best friend (a person*) - a popularity counter that
Each graded problem will be worth 50 points. Read instructions carefully! (1) Problem P7.1 . You can assume that all names in the list of people that the user provides are different . Also you can assume that a best friend of a Person is not necessarily on the ist. If it is the case, the pointer to a best friend must not be be initialized (see the sample of input-output) Submit the solution as hmw-6.1.cpp Sample input-output CAW Name John ont inue yn)? y ane: Mary ontinue (y)? y ane Lisa ontinue (y)? y ane: Alex ontinue (y)? n Enter the names of best friends: exe est friend of John: Mary est friend of Mary: Lisa est friend of Lisa: Mary Best friend of Alex: Kin Infornation: ohn Mary 0 Mary Lisa 2 Lisa Mary 1 Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
