Question: 3 - ( a ) Add the following methods to the SLL class: table [ [ public void clear ( ) , Empties the
a Add the following methods to the SLL class:
tablepublic void clearEmpties the listpublic T getFirstReturns the info in the first nodepublic T getLastReturns the info in the last nodepublic int lengthReturns the number of elements in the list.public String toStringReturns all the nodes as a string separated by space
b Update your TestStudentSLL class by adding options that test the additional methods above.
Note: to test the toString method, just print the list object instead of calling the printAll method.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
