Question: Data Structure Implement the above problem in Java using a Singly Linked List. Remember that the linked list will represent the file stack and must

Data Structure
Data Structure Implement the above problem in Java using a Singly Linked

Implement the above problem in Java using a Singly Linked List. Remember that the linked list will represent the file stack and must have at most 5 nodes. You may use either the built-in Java LinkedList class to implement the problem or your own Singly Linked List class.

Sample input/ output: (User's input is shown in bold) Please enter the file you want to use (enter 0 to terminate): 3 File stack: 30000 Please enter the file you want to use (enter 0 to terminate): 9 File stack: 93000 Please enter the file you want to use (enter 0 to terminate): 2 File stack: 29300 Please enter the file you want to use (enter 0 to terminate): 3 File stack: 32900 Please enter the file you want to use (enter 0 to terminate): 4 File stack: 43290 Please enter the file you want to use (enter 0 to terminate): 4 File stack: 43290 Please enter the file you want to use (enter 0 to terminate): 8 File stack: 84329 Please enter the file you want to use (enter 0 to terminate): 6 File stack: 68432 File 9 has been returned to the rack. Please enter the file you want to use (enter 0 to terminate): 0 Thank you

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!