ࡱ> 8:7` 0 bjbjss 8$$$$ 0 "fHHHHH###$"&"&"&"&"&"&"$ $hs&J"#####J"HH_"#HH$"#$" l H< ൎ$AF8 $"u"0"@ ,&&l &l #######J"J" ###"####d$$ In Class Assignment: Collections A Linked List of Integers File IntList.java contains definitions for a linked list of integers. The class contains an inner class IntNode that holds information for a single node in the list (a node has a value and a reference to the next node) and the following IntList methods: public IntList()constructor; creates an empty list of integers public void addToFront(int val)takes an integer and puts it on the front of the list public void addToEnd(int val)takes an integer and puts it on the end of the list public void removeFirst()removes the first value from the list public void print()prints the elements in the list from first to last File IntListTest.java contains a driver that allows you to experiment with these methods. Save both of these files to your directory, compile and run IntListTest, and play around with it to see how it works. Then add the following methods to the IntList class. For each, add an option to the driver to test it. 1. public int length()returns the number of elements in the list 2. public String toString()returns a String containing the print value of the list. 3. public void removeLast()removes the last element of the list. If the list is empty, does nothing. 4. public void replace(int oldVal, int newVal)replaces all occurrences of oldVal in the list with newVal. Note that you can still use the old nodes; just replace the values stored in those nodes. ;<BN* 1 hHRh;96B*CJOJQJphh;9B*CJOJQJphh;9B*CJ$OJQJphh;95B*CJ$OJQJph !"<=< = ~ ( i .  h^h`gd;9 & Fgd;9gd;9 6&P1h:p$2/ =!"#$% H`H ;9Normal CJOJPJQJ_HmH sH tH DAD Default Paragraph FontRiR  Table Normal4 l4a (k(No List!"<=<=~(i.000000 0 0 0 0 000000000   8@0(  B S  ?BN*1DK4?HS?G 6<NT!"173333!"7, hh^h`OJQJo( ^`OJQJo(o pp^p`OJQJo( @ @ ^@ `OJQJo( ^`OJQJo(o ^`OJQJo( ^`OJQJo( ^`OJQJo(o PP^P`OJQJo(7,19)sGI,$&%;FPbwr $%dEg~eA M'N!|$t@|u HI &Y5VAIQ'lq   j, 89 N S n{ {* J? ? O gd  ~B B r  " BC R T Y k n  F P W _s  B"%,7\HICyf [%+c1Z5N;?u@OHRW]nu(GH 4WfWv}!8+=KBrxw'MDdhkI,%88E ee4loo7rF=!E K(MO\/\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"'=Sy2} I?L~PI7V*[bgr{|g:^Afv K*M37F=Tm"+np=p+.;QXk  (pFI VmF&X`f~~+6S?[w'-0O}j{eg2Emr 9=<`x x+G^:cMk_{U8<CDH?UYevgAn w"z} a*9as41MR>^Ekn~9)p~%o)T?CVWbfhwX_9+{3K^ghUp:qrye?FXZ2l+M\_Bay#.9{<G>O`hlr!% =QUhYEZP_z#z FrT{LSyXj\bc9&GUf'OuZH{h1J<JHNY9Zb;j|w*Y^ 9SU>VIm0"4VzM:#TPW $# JZP` n}, hs:Ui9l< ! 4wCWjpJ,=BFnI7:Tj @MffsF::GRP $%E{Q~WV(DDiJm )+ORZO&'tbclo!{@!!!!`@UnknownGz Times New Roman5Symbol3& z Arial3: Times?5 z Courier New;Wingdings"qhd&e&  !x24d 2qHX)?;92 In Class Assignment: Collectionsricanekkricanekk Oh+'0  , L X dpx$In Class Assignment: Collections ricanekkNormal ricanekk1Microsoft Office Word@F#@ cT@f&x՜.+,0 hp|    !In Class Assignment: Collections Title  !"#$%&()*+,-.01234569Root Entry Fp;Data  1Table 'WordDocument8SummaryInformation('DocumentSummaryInformation8/CompObjq  FMicrosoft Office Word Document MSWordDocWord.Document.89q