Display a menu where you let the user pick an operation to


In this project you will be creating a linked list class to store integers. This class should be called LinkedList and should be in files LinkedList.cpp and LinkedList.h.

This should be a singly linked list with both a tail and a head pointer.

This class should implement the following methods:

A constructor to create an empty list

void reAppend(int) : that puts a new node at the start of the linked list

void appendNode(int) : puts a new node at the end of the linked list

void insertNodeInSortedOrder(int) : puts a node after the first node lower than it in the list [5 pts] void deleteNodeOfValue(int) : deletes the first node of a particular value in a list

void deleteNodeAtLocation(int) : deletes a particular element

int getNodeValueAtLocation(int) : returns the value at a particular node

void mergeTwoNodes(int a, int b) : takes elements in positions a and b in the linked list and adds their values together and puts the result in node a. It then deletes node b.

void swapNodes(int a, int b) : swaps the node values in positions a and b of the list
void removeAllDuplicates() : Go through the list and check for any duplicates. If a duplicate is found, remove the duplicates. After this function the list should have all singular values.

int numberOfNodes() : returns the number of nodes in the linked list
void displayList() const : that displays the entire list to the terminal
void deleteList() : delete the entire linked list, so remove all nodes

In your main.cpp implement a program that uses this linked list. Your program should first create an empty linked list and then go into a loop that starts by displaying the elements in the list (which will be of course empty to start).

Then display a menu where you let the user pick an operation to do on the linked list (one of the functions above). Do the operation, displaying any results that are appropriate so the tester can see that the operation was done. Include an option to quit when we are done.

To get the full points for an operation, your menu must work for that option and not simply have the function implemented in theory.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Display a menu where you let the user pick an operation to
Reference No:- TGS02902763

Expected delivery within 24 Hours