Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PART A First, implement a DoublyLinkedList.java and test it. I would like to see your approach to testing your data structure. A minimum requirement for
PART A First, implement a DoublyLinkedList.java and test it. I would like to see your approach to testing your data structure. A minimum requirement for testing, is that you have your main method run every line of code in your class implementation at least once. This means that your main method should have code that runs each function of your class, each print statement, exception handling, etc. A doubly linked list is an advanced linked list. The list contains two references first and last that point towards the beginning and end of list respectively. In addition, each node has two node references next and previous, which point towards the next and previous nodes respectively. As a minimum requirement for a doubly linked list, your class should include the following methods: addFirst, addLast, removeFirst, removeLast, size, empty, toString Note: You should be able to know the in(s) and out(s) of these methods by now. Meaning, you should be able to identify the returns, the number of arguments and their types For simplicity let's assume that the data stored are of type Object. PART B Second, implement ArrayLinkedList.java and test it. Your implementation should doubly linked list, not the traditional array implementation. You can use the same implementation of Part A in addition to the methods written below
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