LinkedList class cant access other classes
<p>I have a LinkedList class that cannot access my Student class methods for some reason. I dont understand why this would be happening due to my linkedlist class is of type Student. I keep receiving the error cannot find symbol symbol: method getName() Location: variable data of type Student where Student is a type-variable: Student extends Object declared in class node. The method below is from my linked list class</p>

<pre><code>public double findGpa(String name){
    Node&lt;Student&gt; temp = head;
    double foundData = 0.0;
    for(int i = 1 ; (i &lt; size); i++){
        if(temp.data.getName().equals(name)){
            foundData = temp.data.getGpa();
        }
        temp = getNode(i);
    }

    return foundData;
}
</code></pre>

<p>getGpa is a method in my Student class because the Node is of type student and data is also of type student I dont understand why it cant access the Student methods
My student class is listed below </p>

<pre><code>package lab3;


public class Student {

    private String fullName;
    private double gpa;

    public Student(String name, double gpa){
        fullName = name;
        this.gpa = gpa;
    }

    public void setGpa(double grade){
        gpa = grade;
    }

    public void setName(String name){
        fullName = name;
    }

    public double getGpa(){
        return gpa;
    }

    public String getName(){
        return fullName;
    }

}
</code></pre>

<p>Here is the Whole LinkedList class that has the Node Class as an inner class </p>

<pre><code>package lab3;

/**
 *
 * @author Chris
 */
/**
 * SingleLinkedList is a class that provides some of the
 * capabilities required by the List interface using
 * a single linked list data structure.
 * Only the following methods are provided:
 * get, set, add, remove, size, toString
 * @author Koffman and Wolfgang 
 * @param &lt;Student&gt; 
 */
public class StudentSingleLinkedList&lt;Student&gt; {

    private static class Node&lt;Student&gt; {

        /** The data value. */
        private Node&lt;Student&gt; next;
        /** The link */
        private Student data;

        /**
         * Construct a node with the given data value and link
         * @param data - The data value
         * @param next - The link
         */
        public Node(Student d, Node&lt;Student&gt; next) {
            this.next = next;
            data = d;
        }

        /**
         * Construct a node with the given data value
         * @param data - The data value
         */
        public Node(Student d) {
            data = d;
            next = null;
        }
    }

    // Data fields
    /** A reference to the head of the list */
    private Node&lt;Student&gt; head = null;
    /** The size of the list */
    private int size = 0;


    // Helper Methods
    /** Insert an item as the first item of the list.
     *  @param item The item to be inserted
     */
    private void addLast(Student item){

        Node&lt;Student&gt; newNode = getNode(size);
        newNode.next = new Node&lt;Student&gt;(item, newNode.next);
        size++;

    }

    private void addFirst(Student item) {
        head = new Node&lt;Student&gt;(item, head);
        size++;
    }

    /**
     * Add a node after a given node
     * @param node The node which the new item is inserted after
     * @param item The item to insert
     */
    private void addAfter(Node&lt;Student&gt; node, Student item) {
        node.next = new Node&lt;Student&gt;(item, node.next);
        size++;
    }

    /**
     * Remove the first node from the list
     * @returns The removed node's data or null if the list is empty
     */
    private Student removeFirst() {
        Node&lt;Student&gt; temp = head;
        if (head != null) {
            head = head.next;
        }
        if (temp != null) {
            size--;
            return temp.data;
        } else {
            return null;
        }
    }

    /*
    public double findGpa(String name){
        Node&lt;Student
    }
    */


    private double findGpa(String name){
        Node&lt;Student&gt; temp = head;
        double foundData = 0.0;
        for(int i = 1 ; (i &lt; size); i++){
            if(temp.data.getName().equals(name)){
                foundData = temp.data.getGpa();
            }
            temp = getNode(i);
        }

        return foundData;
    }


    public Student updateGpa(String name){
        Node&lt;Student&gt; temp = head;
        if(temp.next.equals(name)){
            temp.data =
        }
    }
    /**
     * Remove the node after a given node
     * @param node The node before the one to be removed
     * @returns The data from the removed node, or null
     *          if there is no node to remove
     */
    private Student removeAfter(Node&lt;Student&gt; node) {
        Node&lt;Student&gt; temp = node.next;
        if (temp != null) {
            node.next = temp.next;
            size--;
            return temp.data;
        } else {
            return null;
        }
    }

    /**
     * Find the node at a specified index
     * @param index The index of the node sought
     * @returns The node at index or null if it does not exist
     * 
     * 
     */
    private Node&lt;Student&gt; getNode(int index){
        Node&lt;Student&gt; temp = head;
        if(temp == null){
            return null;
        }
        else{
            for(int i = 0; i &lt; index - 1; i++){
                temp = temp.next;
            }         
        }
        return temp;
    }

    // Public Methods
    /**
     * Get the data value at index
     * @param index The index of the element to return
     * @returns The data at index
     * @throws IndexOutOfBoundsException if the index is out of range
     * 
     * 
     * Uses getNode() to access the nodes index then calls the .data to get 
     * whatever data is being stored inside that node.
     */
    public Student get(int index) {
       Node&lt;Student&gt; temp = getNode(index);
       if(temp== null){
           throw new IndexOutOfBoundsException();
       }

       return temp.data;

    }

    /**
     * Set the data value at index
     * @param index The index of the item to change
     * @param newValue The new value
     * @returns The data value previously at index
     * @throws IndexOutOfBoundsException if the index is out of           
     *  range
     * 
     * 
     * Uses the getNode method to get the index of the node and replace it with
     * the data that temp holds
     */
    public Student set(int index, Student newValue) {
        if(head == null){
            return null;
        }
        if(index &gt; size){
            throw new IndexOutOfBoundsException();
        }
        Node&lt;Student&gt; temp = getNode(index);
        Student temp2 = temp.data;
        temp.data = newValue;
        return temp2;

    }

    /**
     * Insert the specified item at the specified position in the list.
     * Shifts the element currently at that position (if any) and any
     * subsequent elements to the right (adds one to their indicies)
     * @param index Index at which the specified item is to be inserted
     * @param item The item to be inserted
     * @throws IndexOutOfBoundsException if the index is out of range
     * 
     * 
     * 
     * If index is less than 0 and greater than the size throw an exception
     * If index is equal to 0 then item will be the first node
    /**
     * Insert the specified item at the specified position in the list.
     * Shifts the element currently at that position (if any) and any
     * subsequent elements to the right (adds one to their indicies)
     * @param index Index at which the specified item is to be inserted
     * @param item The item to be inserted
     * @throws IndexOutOfBoundsException if the index is out of range
     * 
     * 
     * 
     * If index is less than 0 and greater than the size throw an exception
     * If index is equal to 0 then item will be the first node
     */


    public void add(int index, Student item) {
        if(index &lt; 0 || index &gt; size){
            throw new IndexOutOfBoundsException();
        }
        if(index ==0){
            addFirst(item);
        }
        Node&lt;Student&gt; temp = head;
        for(int i= 0; i &lt; index-1; i++){
            temp = temp.next;
        }
        temp.next = new Node&lt;Student&gt;(item,temp.next);
        size++;


    }

    /**
     * Append the specified item to the end of the list
     * @param item The item to be appended
     * @returns true (as specified by the Collection interface)
     */
    /**
     * if head is null then temp which holds item will be the first node.
     * While temp next node is not equal to null temp is equal to the next node
     * When it is equal to null the while loop will stop and a new node is created 
     * and added to the end of the list
     * @param item
     * @return 
     */
    public boolean add(Student item) {
        Student temp = item;
        if(head == null){
            addFirst(temp);
            return true;
        }
        Node&lt;Student&gt; temp2 = head;
        while(temp2.next != null){
            temp2 = temp2.next;
        }
        temp2.next = new Node&lt;Student&gt;(temp);
        size++;
        return true;


    }
        int size() {
        return size;
    }

    /**
     * Obtain a string representation of the list
     * @return A String representation of the list 
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("[");
        Node p = head;
        if (p != null) {
            while (p.next != null) {
                sb.append(p.data.toString());
                sb.append(" ==&gt; ");
                p = p.next;
            }
            sb.append(p.data.toString());
        }
        sb.append("]");
        return sb.toString();
    }

    /**
     * Remove the first occurence of element item.
     * @param item The item to be removed
     * @return true if item is found and removed; otherwise, return false.
     */
    public boolean remove(Student item) {
        if (head == null) {
            return false;
        }
        Node&lt;Student&gt; current = head;
        if (item.equals(current.data)) {
            removeFirst();
            return true;
        }
        while (current.next != null) {
            if (item.equals(current.next.data)) {
                removeAfter(current);
                return true;
            }
            current = current.next;
        }
        return false;
    }

    // Nested Class
    /** A Node is the building block for the SingleLinkedList */

}
</code></pre>