Question: 1) Add a new class that models a Student to be stored in the Node as the data field. 2) Student class should have this
1) Add a new class that models a Student to be stored in the Node as the data field. 2) Student class should have this content: a. Data members: id, first name, last name, gender, department, credits & gpa. b. Methods: default constructor, rand, toString and list. These methods are explained as follows: - default constructor: sets all data members to values of your choice but need to be justified. - rand: randomly generates an instance of Student by setting all data members to random values. - toString: returns a string containing all data fields in one line. - equals: test if two Students have identical object content. - list: creates and returns a ArrayList of Student objects. 3) Add a new method to HTLinkedList print that prints all objects contained in the list. 4) Add a Driver/Demo/Test class to test the methods of HTLinkedList.
public interface ListInterface
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
