Question: USE The UnixTM operating system in C programming language Task Suppose your company is establishing a new engineering organization, and you are asked to implement

USE The UnixTM operating system in C programming language
Task
Suppose your company is establishing a new engineering organization, and you are asked to implement a tree data structure to store and retrieve the organization chart information, as well as write code for testing your implementation.
1) Tree operations:
a. Add employees identified along an employee ID path to the organization chart, see below for elaboration and examples.
b. Find an employee in the organization chart based on an employee ID path. c. Count number of employees in the organization chart starting from an employee ID path.
2) Test code (see program execution and required output below):
a. Read an org chart file that has the information of levels and employee ID paths to build an org chart.
b. Read another file containing employee ID paths, and for each employee ID path read, count, and print the number of employees starting from it in the org chart.
THESE ARE THE FOLLOWING TEST FILES:
orgchart.txt:
managerlevels=5
86957
e_0_0_6_4
e_8_5_6
e_7_0_0
e_2_7_1_3
e_1
e_0_8_5_8
e_0_2_1_0_2_1_3
e_0
E_1_2_6
e_2
e_0_5_1_1
e_2_3
e_6_8_5_1_5
e_6_2_3_6_9
e_6_7_8
e_0
E_2_6_5_1_0_0_7
testfile.txt:
e_0_0_6_4
e_8_5_6
e_7_0_0
e_2_7_1_3
e_1
e_0_8_5_8
e_7_4_3_0_3_0
e_0
e_1_2_6
e_2
e_0_5_1_1
e_2_3
e_6_8_5_1_8
e_6_2_3_6_9
e_6_7_8
e_0
e_2_6_5_1_0_0_7
testCorrectOutput:
e_0_0_6_41
e_8_5_60
e_7_0_01
e_2_7_1_30
e_13
e_0_8_5_80
e_7_4_3_0_3_00
e_011
e_1_2_61
e_22
e_0_5_1_11
e_2_31
e_6_8_5_1_80
e_6_2_3_6_90
e_6_7_80
e_011
e_2_6_5_1_0_0_70

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!