#Sales Offer!| Get upto 25% Off:

TODO: Build an Linked List Data Structure with the following operations: data fields: The fields to declare have private You will keep track of the size of the list with the variable size and the start of the list with the reference variable data. ? first is a reference variable for the first Node in the list. ? last is a reference variable for the last Node in the list. ? size keeps track of the number of nodes in the list of type int. This will allow you to know the current size of the list without having to traversing the list. constructors: The overloaded constructors will initialize the data fields size and data. ? The first constructor is a default constructor initializes the starting node location “first” and size to a zero equivalent, that is, constructs an empty list. public LinkedList() ? The second constructor copies the contents of another list into the current list. public LinkedList(List other) methods: methods that manages the behavior of the linked nodes. ? add: appends elements to the end of the list. This method returns true, if the data was added successfully. public boolean add(E item) ? add: inserts elements at a given location in the list, shifting subsequent elements to the right. public void add(int index, E item) ? checkIndex: checks if the given index is valid. Throws an IndexOutOfBoundsException, if invalid. This is a private helper method. private void checkIndex(int index) ? clear: clears list of all elements, returns size back to zero. public void clear() ? contains: searches for a specific item within the linked structure and returns true, if the item is in the list. public boolean contains(E item) ? detach: detaches the node at the specified index from list.

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!