package csci102_linked_list; public class TestLinkedList { public static void main ( String[] args ) { //change this to LinkedList2 in order to run this basic test //program with the second implementation. LinkedList2 myList = new LinkedList2(); for (int i = 1; i <= 10; i++ ) { myList.insertAtEnd( i * 0.1); //myList.insertAtEnd( Math.random() * 10 ); } System.out.println ("size of my list is " + myList.size() ); System.out.println (myList); if( !myList.find(0.6) ) System.out.println("0.6 was not found"); else System.out.println("0.6 is on my list"); if( !myList.find(0.2) ) System.out.println("0.2 was not found"); else System.out.println("0.2 is on my list"); if( !myList.find( 1 ) ) System.out.println("1 was not found"); else System.out.println("1 is on my list"); if ( !myList.remove(0.2)) System.out.println("0.2 was not found, cannot remove"); else System.out.println("0.2 was removed"); if ( !myList.remove(1)) System.out.println("1 was not found, cannot remove"); else System.out.println("1 was removed"); System.out.println (myList); } }