CS 2114 Chapter Notes - Chapter 3: Local Variable
Document Summary
3 a bag implementation that links data. Nodes are objects that are linked together to form a data structure. the data portion of the node. The data type will be represented by the generic type, t. A node does not reference the data in another node, but rather. The field data contains a reference to an object in the bag often called. The node class can be hidden from the bag"s client is by defining it references the entire other node. The field next is sometimes called the link portion of the node (linked notes can reference different objects in a bag). within a package that also contains the class implementation for a bag. Also, a node can be defined within an outer class that implements the bag (so, due to its placement within another class, node is an example of an inner class, so it is declared to be private.