Question no.1: Implement the singly linked list of Employee with data members Name, id and salary. Add at least 5 nodes in the list. You will create a pointer named as head to keep the address of...


c++,CPP,C++ Language (Linked List)


Implement the singly linked list of Employee with data members Name, id and
salary. Add at least 5 nodes in the list. You will create a pointer named as head to
keep the address of first node of list. Create the following functions:


Question no.1:<br>Implement the singly linked list of Employee with data members Name, id and<br>salary. Add at least 5 nodes in the list. You will create a pointer named as head to<br>keep the address of first node of list. Create the following functions:<br>Name<br>Name<br>Name<br>Name<br>Name<br>ID<br>ID<br>ID<br>ID<br>Head<br>Salary<br>Salary<br>Salary<br>Salary<br>Salary<br>Next<br>Next<br>Next<br>Next<br>Next=NULL<br>Createlist() to create a list of certain length.<br>• CreateNode() to create the nodes dynamically.<br>• readAlINodes() to get data of all nodes from user.<br>• readeNode() to get data of single node from user.<br>displayAlINodes() to print out data of complete list.<br>• displayNode() to print out the data of single node in a list.<br>• InsertAtHead() to insert the new node at the start of list.<br>• InsertAtlast() to insert the new node at end of the list.<br>• findLast() to find the last node in the list.<br>insertAtTarget() to insert the new node at user specified location in the list.<br>• findTarget() to find the target node where new node is to be inserted.<br>• deleteAtHead() to delete the first node at the start of list.<br>• deleteAtlast() to delete the last node at end of the list.<br>• findSLast() to find the second last node in the list.<br>• deleteAtTarget() to delete the node at user specified location in the list.<br>Date: 21/3/2021<br>findPrevTarget() to find the node before the target node which is to be<br>delete from list.<br>• Create a function to find the highest paid employee in the list and then<br>display its details.<br>NOTE: You can take help form the code given in lecture. You must know how<br>every function is working because I might take individual viva as well.<br>

Extracted text: Question no.1: Implement the singly linked list of Employee with data members Name, id and salary. Add at least 5 nodes in the list. You will create a pointer named as head to keep the address of first node of list. Create the following functions: Name Name Name Name Name ID ID ID ID Head Salary Salary Salary Salary Salary Next Next Next Next Next=NULL Createlist() to create a list of certain length. • CreateNode() to create the nodes dynamically. • readAlINodes() to get data of all nodes from user. • readeNode() to get data of single node from user. displayAlINodes() to print out data of complete list. • displayNode() to print out the data of single node in a list. • InsertAtHead() to insert the new node at the start of list. • InsertAtlast() to insert the new node at end of the list. • findLast() to find the last node in the list. insertAtTarget() to insert the new node at user specified location in the list. • findTarget() to find the target node where new node is to be inserted. • deleteAtHead() to delete the first node at the start of list. • deleteAtlast() to delete the last node at end of the list. • findSLast() to find the second last node in the list. • deleteAtTarget() to delete the node at user specified location in the list. Date: 21/3/2021 findPrevTarget() to find the node before the target node which is to be delete from list. • Create a function to find the highest paid employee in the list and then display its details. NOTE: You can take help form the code given in lecture. You must know how every function is working because I might take individual viva as well.
Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here