Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions