Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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.
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
e
e
e
e
e
e
e
e
E
e
e
e
e
e
e
e
E
testfile.txt:
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
testCorrectOutput:
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started