Post date: Jan 09, 2019 5:43:56 AM
Chapter 3: Linked Lists
3.1 Singly Linked Lists
Lab 1:
1- Save the class TestIntegerSLL as TestDoubleSLL (copy and paste) and modify it so that it to manages Double values.
2- (a) Write a class Student consisting of data fields: id, name and gpa. The class should have three constructors: one that takes only id; one that takes id and name; and one that takes all the three fields. Finally, the class should have equals() and toString() methods. Note: The toString must return only the field-values separated by tab character, without field-names. Example: “1234567 Amr Yusuf 3.5”.
(b) Save TestItemSLL as TestStudentSLL and update it to manage Student objects.
3- (a) Add the following methods to the SLL class:
(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.