Last active
January 10, 2020 14:56
-
-
Save katychuang/0ab8240132056316737b4ec730ae77a7 to your computer and use it in GitHub Desktop.
CISC 3130 Spring 2020 OER Code Snippets for https://libguides.brooklyn.cuny.edu/cisc3130/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Linked List (empty), shows structure of classes and initial members */ | |
class Node { | |
public int value; | |
public Node next; | |
// Constructor | |
public Node(int i) { /* blank for now */ } | |
// Method | |
public void displayLink() { /* blank for now */ } | |
} | |
class LinkedList { | |
// uses Node class | |
private Node first; // private link to the first element | |
public void LinkedList(){} // constructor sets first to null | |
public boolean isEmpty(){} // returns true if list is empty | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment