Question: Home Assignment 1 Linked Lists Instructions: 1. This is an individual assignment. You are not allowed to copy code from anybody to copy code from

Home Assignment 1 Linked Lists Instructions: 1. This is an individual assignment. You are not allowed to copy code from anybody to copy code from the Internet 2. Any late submission will reduce your grade, and no submissions will be accepted after 24 hours of the deadline. 3. Plagiarism means zero marks and administrative consequences from the college and university. 4. Name your Java file/project as (Example: Aysha_201820123_Assignment1) 5. Name your Java method as (Example: Aysha_201820123_Assignment1_Question1) 6. Submit your project/file through the Blackboard 7. Test runs: save your run screenshots as a jpg/jpeg/png/pdf file and submit. Note: your name and ID must be seen in the submitted screenshots. Design and implement Reverse Singly Linked List (RSLL) following the descriptions given below: Description: A Reverse Singly Linked List is a sequence (list) of nodes where each node in the list contains the two data fields, info for storing an actual data and previous for indicating the previous node in the list. RSLL Abstract Data Type consists of the following operations: Operation Description ReverseSinglyLinkedList () creates a reverse singly linked list that is initially empty cleaner() initializes the list to the empty state. isEmpty() determines if the list is empty and returns the appropriate Boolean value. isFull() determines if the list is empty and returns the appropriate Boolean value.

size() returns the number of items stored in the bag. contains(item) determines if the given target item is stored in the list and returns the appropriate Boolean value. insertFirst(item) adds a given item to the beginning of the list. insertLast(item) adds a given item to the end of the list. deleteFirst() removes the first node from the list; an exception is raised if the list is empty. deleteLast() removes the last node from the list; an exception is raised if the list is empty. delete(item) removes and returns an occurrence of item from the list; an exception is raised if the element is not in the list. copy(SinglyLinkedList list) copies all elements of a given singly linked list to the list initializing it to the empty state first. Test all the operations of Reverse Singly Linked List ADT in the main method.

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!