Question: Can you help me with this code. I'm supposed to use while and for loops to solve it. public class LinkedBookList { private BookNode head;

Can you help me with this code. I'm supposed to use while and for loops to solve it.Can you help me with this code. I'm supposed to use whileand for loops to solve it. public class LinkedBookList { private BookNode

public class LinkedBookList { private BookNode head; private int size; public LinkedBookList()5 head = null; size-e; //returns size of the list public int size(){ return size; //IMPLEMENT -- adds a book to the end of the linked list public void add(Book b)( BookNode anew BookNode(b); head ; BookNode current if ( headnull ) 1 head a; return ; while (current . getNext ( ) != null ) { currentcurrent.getNext() ; current.setNext(a); //current-last element return; //IMPLEMENT -- adds a book at the specific index, // or at the end if index is greater than size public void add (Book b, int index) return; //IMPLEMENT -- removes a book and returns it, or // returns null if book is not present public Book remove (Book b){ return null

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!