Question: I am currently learning about LinkedList, and need help completing this lab to make sure I am doing it correct. Any help is appreciated, and

I am currently learning about LinkedList, and need help completing this lab to make sure I am doing it correct. Any help is appreciated, and I will leave a positive review!

I am currently learning about LinkedList, and need help completing this lab

JavaLinkedList:

import java.util.LinkedList; import static java.lang.System.*; public class JavaLinkedList { private LinkedList list; public JavaLinkedList() { list = new LinkedList(); } public JavaLinkedList(int[] nums) { list = new LinkedList(); for(int num : nums) { list.add(num); } } public double getSum( ) { double total=0; return total; } public double getAvg( ) { return 0; } public int getLargest() { int largest=Integer.MIN_VALUE; return largest; } public int getSmallest() { int smallest = smallest=Integer.MAX_VALUE; return smallest; } public String toString() { String output=""; return output; } }

JavaLinkedListRunner:

import java.util.LinkedList; import static java.lang.System.*; public class JavaLinkedListRunner { public static void main ( String[] args ) { JavaLinkedList test = new JavaLinkedList(new int[]{4,5,6,7,8,9,10,11,12,13}); out.println(test); test = new JavaLinkedList(new int[]{24,75,86,37,82,94,111,82,43}); out.println(test); test = new JavaLinkedList(new int[]{0,4,5,2,1,4,6}); out.println(test); } }

A+ Computer Science LINKED LIST BASICS Lab Goal : This lab was designed to teach you more about a linked list. Lab Description : Write a program that demonstrates that you understand how to use the Java Linked List class. Files Needed :: Sample Data : 4 5 6 7 8 9 10 11 12 13 24 75 86 37 82 94 111 82 43 0 4 5 2 1 4 6 JavaLinkedList.java JavaLinkedListRunner.java Sample Output : SUM:: 85.0 AVERAGE:: 8.5 SMALLEST :: 4 LARGEST :: 13 SUM:: 634.0 AVERAGE:: 70.44444444444444 SMALLEST:: 24 LARGEST :: 111 SUM:: 22.0 AVERAGE :: 3.142857142857143 SMALLEST :: 0 LARGEST:: 6

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!