Jordan University of Science and Technology
Computer Science Department
CS 211 – Data Structures I
Project I - Lists
Employee system must contain data about them in order to retrive and manupliate them easily and quickly.
Create a structure for employee that contains employee name, employee id, hiring date, salary, department id, and department name.
Create a class linked List so that each node has an object from employee type with the following methods:
Empty: check if the list is empty or not.
Search: take an employee object, search for it; if found return its department name.
Insert Sorted: takes an object from employee type, search for if it found return without insertion else search for its correct position – to keep the list ordered always- then add it.
Insert At Mid: takes an object from employee type, and insert it at the middle of the employee list.
Remove: takes an employee object, search for at the list if it found delete it.
Remove mid: that delete the employee object found at the middle of the list.
Sort: that sorts the employee list according to employee id.
Change Department: takes a department id and name and an employee object, replace the information for this employee by the information passed at the object parameter.
Print All Nodes: that prints all employee information.
Note: the Linked List class must contain the constructor, copy constructor, operator assignment, getFirst methods.
You have to create the following friend functions:
Split: takes list object and split it according to department id.
Ex:
1 for computer
2 for engineering
3 for medicine
Search within date: takes a List of Employees and a number of years of experience, and returns a list of all employees who satisfy the condition.
SumSalary: will receive a List of Employees and will return the sum of their salaries.
Good Luck
[BIMG]http://sphotos.ak.fbcdn.net/photos-ak-sf2p/v298/74/32/596929947/n596929947_1187974_3848.jpg[/BIMG]
أَخْبِرِيْ الْكَوْنَ أَكْثِرْ ..
فَبَيْنَ شُمْسٍ عَلَىَ شَكْلِ ابْتِسَامَة..
وَ شَفَقْ الْعَيْنَيْنِ الْأَخْضَرْ ..
عَدَدٌ لَا نِهَائِيٌّ مِنْ الْنِّسَاء ..
[BIMG]http://sphotos.ak.fbcdn.net/photos-ak-sf2p/v298/74/32/596929947/n596929947_1187974_3848.jpg[/BIMG]
أَخْبِرِيْ الْكَوْنَ أَكْثِرْ ..
فَبَيْنَ شُمْسٍ عَلَىَ شَكْلِ ابْتِسَامَة..
وَ شَفَقْ الْعَيْنَيْنِ الْأَخْضَرْ ..
عَدَدٌ لَا نِهَائِيٌّ مِنْ الْنِّسَاء ..
[BIMG]http://sphotos.ak.fbcdn.net/photos-ak-sf2p/v298/74/32/596929947/n596929947_1187974_3848.jpg[/BIMG]
أَخْبِرِيْ الْكَوْنَ أَكْثِرْ ..
فَبَيْنَ شُمْسٍ عَلَىَ شَكْلِ ابْتِسَامَة..
وَ شَفَقْ الْعَيْنَيْنِ الْأَخْضَرْ ..
عَدَدٌ لَا نِهَائِيٌّ مِنْ الْنِّسَاء ..
الذين يشاهدون الموضوع الآن: 69 (0 من الأعضاء و 69 زائر)
مواقع النشر (المفضلة)