For this assignment, 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.
Test the binary tree by inserting nodes with the following information.
Employee ID Number
Name
1021
John Williams
1057
Bill Witherspoon
2487
Jennifer Twain
3769
Sophia Lancaster
1017
Debbie Reece
1275
George McMullen
1899
Ashley Smith
4218
Josh Plemmons
Your program should allow the user to enter an 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.
can someone give me some tips on what i should be doing next ? this is all i have and i'm stuck
You make a half-arsed initial post.
We pretend we're interested, by giving you some helping hand.
You then "find" some code, and try and palm it off as your own work.
We find that you've found the code, but carry on denying it anyway.
You keep tinkering with it in futility, making random changes.
Someone eventually caves and gives you your spoon-fed answer.
With luck, we'll all be done before it spans multiple pages.
Dude how can you say this little bit of code is "someone elses" code or that I am palming it off as my own ????? IT IS MY OWN ! All I did was create a class. Is creating a simple class taking someone elses code ????????????????????????????????? Get real.
Hmm, I don't think Vlad has anything to do with you making 0 effort then copying random code from the internet.
1 2
//destrcutor
EmployeeInfo(int, string);
That's not a destrcutor, by the way.
Although, to be fair, a lot of jobs involve copying random code from SO these days, so maybe this counts as job experience.
_________________________________
Okay, because I can't help myself, I will say: The code you have shown has NOTHING to do with a binary tree. All it is is the shell of a simple wrapper of an int + a string.
Show us actual attempt at making a binary tree first.
*dragging a lounge chair, a cooler of adult beverage and a LOT of popcorn into position*
This is looking to be quite a show.
As Ganado so pointedly mentioned, what little source code you posted has very little to do with what your assignment allegedly is. Labeling a constructor overload as a "destrcutor" is especially revealing of a lack of any real effort being done to learn.
If that offends, tough. Maybe programming is not your "thing." No shame in admitting that.
So write some code yourself. Show you have a grasp on the requirements of the assignment other than to just vomit up the bare minimum, hoping someone takes pity and does the work for you. Some code to implement a binary tree might show that. Even if just in pseudocode or a bare code framework.
I an not an expert either, but I write code and write code and write code to help me understand parts of the language I am not familiar with.
Something real simple, yet until I worked on writing the code it would have been baffling and difficult; dealing with two std::unique_ptr arrays and swapping the contents.
I am not expecting others to do my homework. If so, All i would of done was posted the assignment instrutions. However, I do neep helps and tips though