Question: solve all questions please. Question 1: Write a method called printList(). This method is used to print out the element in the node before the

solve all questions please.

solve all questions please. Question 1: Write a method called printList(). This

Question 1: Write a method called printList(). This method is used to print out the element in the node before the last node of the linked list. (37) head 12 99 37 45 Question 2 Give an implementation of the method numListElements() for the DoublyLinkedList class, that returns the number of elements(size) in the doubly ked Assume that we did not maintain size as an instance variable. Assume that (head is the first node). Question 3: Write a java method called sumListElement() which extends the Doubly Linked List Class of integers. sumListElement computes and returns the sum of the elements(in the first node and last node only) in doubly linked list. If the list is empty, then sumListElement() should return zero. Assume no size data member is maintained in the doubly linked list class. 3

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!