hi guys, I know how LinkedList works, but I've been given classes and methods headers to implement LinkedList, and I need a bit of help with this. Basically consist of three classes Students(which contains student attributes and methods... no help needed here), and the other two classes, which I'm showing below.
The Node class. I implemented the constructor; however, I don't see what's the point of having "public Student value" here, or am I missing something?
public class Node { //construct student object public Student value; public Node next; //constructor public Node(Student s) { this.next = new Node(s); } }
And here's the Class LinkedList. My main concern here is how to implement the constructor
public class LinkedList { private Node first; public LinkedList() { } //add students to the list public void add(Student s) { } //remove duplicate records (return true if duplicate found) public boolean remove(String fn, String ln) { } //display list of student public void display() { } }
Thanks