80 likes | 144 Views
Program to manage employee data stored in input.txt based on salary ranges and divisions, segregating and storing in separate files.
E N D
Today’s Agenda Problem Solving
Problem statement • Consider an employee database. It stores the information of employees in some organization. It maintains idno, name, salary and division of each employee. This information is stored in a file input.txt. Also number of employees is mentioned in the file on the first line of the file. • Salary is divided into different ranges • Less than 10,000 • 10,000 to 25,000 • 25,000 to 40,000 • 40,000 to 55,000 • More that 55,000
Separate the employee details based on their salary into different lists. • Store the list of employees into different files.
input.txt 1 mnr 30000 1 2 aman 55000 2 3 radha 15000 2 4 sumit 10000 3 5 ritika 45000 4 6 deepak 8000 5 7 rishikesh 80000 1 8 ashish 8500 5 9 eshan 75000 6 10 abhishek 50000 7
Separate the employees based on their divisions into different lists. • Store these lists to different files.
divisionInfo.txt IPC 1 FD1 2 FD2 3 FD3 4 RCD 5 ARCD 6 ID 7 WSU 8
Problem IV (revisiting) • Declare two sequential lists using singly linked list. Populate data (numbers) in both the list by insert operation. • Perform merging of two list. Maintain increasing order of numbers in the resultant list. • Merge two list and create a new list. • Without creating a new list modify the links of the two lists and create a new list. Such merging is called in-place merging.