Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How to write the Big 3 and resize function for this class //The functions known

ID: 3873117 • Letter: H

Question

How to write the Big 3 and resize function for this class

//The functions known as the Big 3 FBFriends ); FBFriends (const FBFriends& other); void operator = (const FBFriends& other); // Functions for the internal iterator void start); void advance); bool is_item); Friend currentO; void remove current) void insert(const Friend& f) void attach (const Friend& f) void show all(std::ostream& outs)const; void bday sortO; Friend find_friend (const std::string& name)const; bool is_friend (const Friend& f) const void load(std::istream& ins); void save(std::ostream& outs); private: void resize); // increases the capacity of the container by 5 Friend *data; int used int capacity int current index;

Explanation / Answer

/*The Big 3 functionsare given below*/

/*This is destructor function*/

~FBFriends()

{

/*this function would free the memory used by the pointer variable*/

delete data;

}

/*This is copy constructor function*/

FBFriends(const FBFriends& other)

{

/*This would copy all values from object other to this current object*/

data=other.data;

used=other.used;

capacity=other.capacity;

current_index=other.current_index;

}

/*This is assignment operator(=) overloading function*/

void operator = (const FBFriends& other)

{

/*This would assign all values from object other to this current object*/

data=other.data;

used=other.used;

capacity=other.capacity;

current_index=other.current_index;

}

/*resize function is given below*/

/*it increases capacity of container by 5*/

void resize()

{

capacity = capacity + 5;

}

/*If this helps you, please let me know by giving a positive thumbs up. In case you have any queries, do let me know. I will revert back to you. Thank you!!*/

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote