Question
Class LinkedEmployee has methods getPtr() and setPtr() . The class also has a standard enterEmployee() method. Fred has written code that sets up 3 LinkedEmployee
Class LinkedEmployee has methods getPtr() and setPtr(). The class also has a standard enterEmployee() method. Fred has written code that sets up 3 LinkedEmployee objects using the code below. Add code that links them into a linked list. Be sure to set up head so that the linked list can be accessed. You can hardwire the linking; you dont need to use a loop to construct the linked list.
LinkedEmployee first = LinkedEmployee.enterEmployee();
LinkedEmployee second = LinkedEmployee.enterEmployee();
LinkedEmployee third = LinkedEmployee.enterEmployee();
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