// CoMP1006 W13 // Abstract Node type (with generics) public abstract class Node{ protected T data; protected Node next; // need to add getter and setter for both data and next public abstract T getData(); public abstract void setData(T newData); public abstract Node getNext(); public abstract void setNext(Node newNext); // do not include the in the constructor definitions public Node(){ data = null; next = null; } public Node(T data){ this.data = data; this.next = null; } }