Using the code below: Part 1: Write a static method called LinkedListToStack that takes a Node reference as a parameter (which represents a linked list). Add every element in the linked list to a stack and return the stack. Part 2: Write a static method called avgOfNumbersInStack that takes a stack of Integer as a parameter. It will return a double value which is the average of all the numbers in the stack. package activity9; import java.util.Scanner; import java.util.*; public class StackPractice { public static Node listGenerator(int input) { int n; int count = 0; Random rand = new Random(); n = rand.nextInt(100); Node head = null; head = new Node(n); count++; while(count < input) { Node t1 = new Node(n = rand.nextInt(100), head); head = t1; count++; } return head; } public static void printLinkedList(Node input) { Node curr = input; while(curr != null) { System.out.println(curr.item); curr = curr.next; } } public static void main(String[] args) { Scanner kbd = new Scanner(System.in); int input = 0; System.out.print("Please enter the starting integer: "); input = Integer.parseInt(kbd.nextLine()); listGenerator(input); printLinkedList(listGenerator(input)); } }.