Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hello, I need the code written in C++ for the question posted below. I am not allowed to use global variables, so please don't do
Hello, I need the code written in C++ for the question posted below. I am not allowed to use global variables, so please don't do so.
This problem involves classes, so please try to use them within the coding. I believe the program is supposed to ask the user when ran for the names of the people and their friends. Any help for this is appreciated, I am having pretty big difficulties trying to write the code for this. Thank you for your help.
A Person has a name (just a first name for simplicity) and friends. Store thenames of the friends in a string, separated by spaces. Provide a constructor that constructs a person with a given name and no friends. Provide member functions -P9.2 void befriend (Person p) void unfriend(Person p) string get friend names)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started