Question
C++ Program Design an EmployeeInfo class that holds the following employee information: Employee ID Number: an integer Employee Name: a string Implement a binary tree
C++ Program
Design an EmployeeInfo class that holds the following employee information:
Employee ID Number: an integer
Employee Name: a string
Implement a binary tree whose nodes hold an instance of the EmployeeInfo class. The nodes should be sorted on the Employee ID number.
****Use employee.txt file to insert nodes to test your program. ****
The program should prompt the user for an employee ID number then search the tree for the number. If the number is found, it should display the employee's name. If the node is not found, it should display a message indicating so.
employee.txt:
1021 John Williams
1057 Bill Witherspoon
2487 Jennifer Twain
3769 Sophia Lancaster
1017 Debbie Reece
1275 George McMullen
1899 Ashley Smith
4218 Josh Plemmons
I think I have most of this project down, it works but I was wondering if there was any way I could program this to read the names and ID numbers from the file and store it in the tree.
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