Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions

Question

4. Who would lead the group?

Answered: 1 week ago