Question: 4 . Write a C + + program to manage your WhatsApp groups. The information of every WhatsApp group will be stored in a linked

4. Write a C++ program to manage your WhatsApp groups. The information of every WhatsApp group will be stored in a linked list containing the phone numbers of each group member. The groups will be stored in an array (max. size 10) that stores the name of the group and the linked list of its members (such as family,05321112222,054433355555,...)
The program should first input the information of your WhatsApp groups from a text file. The first line of every group shows the group name and number of members, followed by the phone numbers of the members.
family 3
05321112222
05423334444
05556667777
friends 2
Then, the user can enter List to list the phone numbers of a group, Change to change the phone number of a person in all groups or Quit to quit the program as shown in the sample run below.
Note: The linked list header file is given on the next page.
Sample Run:
Change | List | Quit: List
Which group? family
05321112222
05423334444
05556667777
Change | List | Quit: Change
Old & new phone numbers:05556667777054411111111
Change | List | Quit: List
Which group? family
05321112222
05423334444
054411111111
1. Change | List | Quit: Quit
Node Header Prototype
template
struct node
{
T info;
node *link;
};
Linked List Header Prototype
template
class LL
{ protected:
node *head,* last;
int count;
public:
LL();
~LL();
bool isEmptyList();
int length();
T back();
T front();
void destroyList();
node* search(T&);
void insertFirst(T&);
void insertLast(T&);
void deleteNode(T&);
friend ostream& operator<<(ostream&, LinkedList&);
};
Doubly Linked List Node Header Prototype
template
struct node
{ T info;
node *right,*left;
};
Doubly Linked List Header Prototype
template
class DLL
{ protected:
node *first,* last;
int count;
public:
DLL();
~DLL();
bool isEmptyList();
int length();T back();T front();void destroyList();
node* search(T&);
void insertFirst(T&);
void insertLast(T&);
void deleteNode(T&);
friend ostream& operator<<(ostream&, DLinkedList&);
};

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!