Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
Problem 1 Building your own linked list. Create a new Java Application to manage Linked Lists: (Note: Do not use java.util.LinkedList) a) Create Node class
Problem 1 Building your own linked list. Create a new Java Application to manage Linked Lists: (Note: Do not use java.util.LinkedList) a) Create Node class 1. Add methods to get and set, Data and Link. Data should be any Comparable object. b) Create MyLinkedList class and write methods to do the following 1. Insert a node at the end of the list 2. Insert a node at the front of the list 3. Display all nodes in the list 4. Method to check of the list is empty isEmpty) (returns a Boolean) 5. Method to return the size of the list 6. Delete all nodes in the list 7. Search List for a node with a certain value (returns the node if found, null if not found) 8. Delete a node with a specific value in the list if found 9. Method to find the node with the largest value in the list-getargest() 10. Method to return all the elements less than a certain value as a linked list of type MyLinkedList Problem 2: Use MyLinkedList in previous problem to create a Testintegers method. Testintegers method is to be called it in the main method to do the following Create a new List (call it integerList) of type MyLinkedList 2. 1. Insert five integer numbers to the end of the list (not ordered). Wrap the numbers in the class "Integer 3. Display all the items in the List 4. Insert elements at the front of the List and display it S. Display the size of the list 6. Display the largest element in the list 7. Search for a particular element in the List by printing true if found or false 8. Get and display all elements less than the Integer 20 9. Delete a specific node in the List and display the list (in the beginning, middle and at the end) 10. Delete the entire List and display if the list is empty or not
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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