CSE205- Fall 2008 Linked List ProblemsLast Name _________________First________________________Date____________For each of these problems, assume you have a linked list of integer values and access to the beginning of the list. Each node has value and next instance variables. You may use any of the LinkedList methods from LinkedList.java, posted under “Code Examples” on the course web site.1.Write a method sumAll that computes and returns the sum of all values in the list. For example, if the original list is: 1 2 3 4 5 this method would return 15.
2.Write a method sumAlternate that computes and returns the sum of every other value in the list starting with the first one. For example, if the original list is: 1 2 3 4 5 this method