using circular link list by using class
Class Employee
{
Eid integer ;
Ename string;
Esalary real ;
Edesignation string ;
}
how we can do following operation:
Create a link list
Insert a node after a specific node with a given Eid
Insert a node before a specific node with a given Eid
Edit any field of a specific node with a given Eid
Delete a specific node with the given Eid
Delete the complete link list
Reverse the link list
Swapping of specific nodes with given Eid’s
Searching a specific node with the given Eid in the link list
Display the link list
Display only those employees whose salary is more than 15,000
Display only those employees whose id is odd numbered
Display only manager records.

the class declaration is almost like the struct...

typedef int ListItemType; // This is not a template class!

class SortedList
{
public:
// constructor:
   SortedList();

// SortedList operations:
   bool isEmpty() const


private:
   int size;

   //linked list class for storing list
   class Node{
   public:
       ListItemType info;
       Node* next;
   };
   typedef Node* nodePtr;
   nodePtr Head, Tail;
};

this is all I will give you, the rest is up to you

Edited 3 Years Ago by Dani: Formatting fixed

well ur asking for ALOT when you arn't doing any of your own work or atleast giving it a try. start by learning how to make the struct Node{ Node*next...and all that} then once you do that change it into a class. google up some stuff or use ur book

This article has been dead for over six months. Start a new discussion instead.