浏览代码

Update Java code

george 7 月之前
父节点
当前提交
00bdedcf9b

二进制
unidad3/c++/queue/cmake-build-debug/queue


+ 0 - 1
unidad3/c++/queue/main.cpp

@@ -17,7 +17,6 @@ int main()
     queueInt.Enqueue(78);
     queueInt.Enqueue(44);
     queueInt.Enqueue(12);
-1º
     // list the element of queue
     while(!queueInt.IsEmpty())
     {

二进制
unidad3/c++/stack/cmake-build-debug/CMakeFiles/stack.dir/main.cpp.o


二进制
unidad3/c++/stack/cmake-build-debug/stack


+ 108 - 0
unidad3/java/ListaCircular/DoublyCircularLinkedList.java

@@ -0,0 +1,108 @@
+public class DoublyCircularLinkedList<T> {
+    private static class Node<T> {
+        T data;
+        Node<T> next;
+        Node<T> prev;
+
+        Node(T data) {
+            this.data = data;
+            this.next = null;
+            this.prev = null;
+        }
+    }
+
+    private Node<T> head;
+    private int size;
+
+    public DoublyCircularLinkedList() {
+        head = null;
+        size = 0;
+    }
+
+    // Método para agregar un elemento al final de la lista
+    public void add(T item) {
+        Node<T> newNode = new Node<>(item);
+        if (head == null) {
+            head = newNode;
+            head.next = head;
+            head.prev = head;
+        } else {
+            Node<T> last = head.prev;
+            last.next = newNode;
+            newNode.prev = last;
+            newNode.next = head;
+            head.prev = newNode;
+        }
+        size++;
+    }
+
+    // Método para eliminar un elemento por su valor
+    public boolean remove(T item) {
+        if (head == null) {
+            return false;
+        }
+
+        Node<T> current = head;
+        do {
+            if (current.data.equals(item)) {
+                if (size == 1) {
+                    head = null;
+                } else {
+                    Node<T> prevNode = current.prev;
+                    Node<T> nextNode = current.next;
+                    prevNode.next = nextNode;
+                    nextNode.prev = prevNode;
+                    if (current == head) {
+                        head = nextNode;
+                    }
+                }
+                size--;
+                return true;
+            }
+            current = current.next;
+        } while (current != head);
+
+        return false;
+    }
+
+    // Método para verificar si la lista está vacía
+    public boolean isEmpty() {
+        return head == null;
+    }
+
+    // Método para obtener el tamaño de la lista
+    public int size() {
+        return size;
+    }
+
+    // Método para imprimir los elementos de la lista
+    public void printList() {
+        if (head == null) {
+            System.out.println("La lista está vacía.");
+            return;
+        }
+
+        Node<T> current = head;
+        do {
+            System.out.print(current.data + " ");
+            current = current.next;
+        } while (current != head);
+        System.out.println();
+    }
+
+    public static void main(String[] args) {
+        DoublyCircularLinkedList<Integer> list = new DoublyCircularLinkedList<>();
+        list.add(1);
+        list.add(2);
+        list.add(3);
+
+        System.out.print("Elementos en la lista: ");
+        list.printList();
+
+        System.out.println("Eliminando el elemento 2: " + list.remove(2));
+        System.out.print("Elementos en la lista después de eliminar: ");
+        list.printList();
+
+        System.out.println("Tamaño de la lista: " + list.size());
+    }
+}

+ 49 - 0
unidad3/java/ListaCircular/DoublyCircularLinkedList.jgrasp_canvas_xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Canvas xmlns="http://www.jgrasp.org">
+  <Language>Java</Language>
+  <ShowTypes>false</ShowTypes>
+  <Version>2</Version>
+  <Grid>
+    <Snap>true</Snap>
+    <Show>false</Show>
+  </Grid>
+  <Scope id="0">
+    <Name>main</Name>
+    <Signature>([Ljava/lang/String;)V</Signature>
+    <DeclaringType>DoublyCircularLinkedList</DeclaringType>
+    <Depth>0</Depth>
+  </Scope>
+  <Frame>
+    <Bounds>
+      <AutoSize>false</AutoSize>
+      <X>70</X>
+      <Y>40</Y>
+      <W>758</W>
+      <H>688</H>
+    </Bounds>
+    <PanelSize>
+      <Key>jgrasp_viewers.java__lang__Object_LinkedView0</Key>
+      <Order>4</Order>
+      <W>764</W>
+      <H>732</H>
+    </PanelSize>
+    <Viewer>
+      <ScopeID>0</ScopeID>
+      <Expression>`local DoublyCircularLinkedList` list</Expression>
+      <ViewerClass>jgrasp_viewers.java__lang__Object_LinkedView</ViewerClass>
+      <ViewerData>
+        <ViewData>
+          <Round>false</Round>
+        </ViewData>
+      </ViewerData>
+    </Viewer>
+  </Frame>
+  <Size>
+    <W>960</W>
+    <H>1039</H>
+  </Size>
+  <ESize>
+    <W>960</W>
+    <H>1039</H>
+  </ESize>
+</Canvas>

+ 102 - 0
unidad3/java/ListaDoble/DoublyLinkedList.java

@@ -0,0 +1,102 @@
+public class DoublyLinkedList {
+    private Node head; // Referencia al primer nodo
+    private Node tail; // Referencia al último nodo
+
+    // Clase interna para los nodos de la lista
+    private static class Node {
+        int data;
+        Node next;
+        Node prev;
+
+        Node(int data) {
+            this.data = data;
+            this.next = null;
+            this.prev = null;
+        }
+    }
+
+    // Método para agregar un nodo al final de la lista
+    public void addLast(int data) {
+        Node newNode = new Node(data);
+        if (tail == null) {
+            head = newNode;
+            tail = newNode;
+        } else {
+            tail.next = newNode;
+            newNode.prev = tail;
+            tail = newNode;
+        }
+    }
+
+    // Método para agregar un nodo al principio de la lista
+    public void addFirst(int data) {
+        Node newNode = new Node(data);
+        if (head == null) {
+            head = newNode;
+            tail = newNode;
+        } else {
+            newNode.next = head;
+            head.prev = newNode;
+            head = newNode;
+        }
+    }
+
+    // Método para eliminar un nodo al final de la lista
+    public void removeLast() {
+        if (tail == null) {
+            return;
+        }
+        if (head == tail) {
+            head = null;
+            tail = null;
+        } else {
+            tail = tail.prev;
+            tail.next = null;
+        }
+    }
+
+    // Método para eliminar un nodo al principio de la lista
+    public void removeFirst() {
+        if (head == null) {
+            return;
+        }
+        if (head == tail) {
+            head = null;
+            tail = null;
+        } else {
+            head = head.next;
+            head.prev = null;
+        }
+    }
+
+    // Método para imprimir la lista desde el principio
+    public void printList() {
+        Node current = head;
+        while (current != null) {
+            System.out.print(current.data + " <-> ");
+            current = current.next;
+        }
+        System.out.println("null");
+    }
+
+    public static void main(String[] args) {
+        DoublyLinkedList dll = new DoublyLinkedList();
+        dll.addLast(1);
+        dll.addLast(2);
+        dll.addLast(3);
+        System.out.println("Lista después de agregar elementos:");
+        dll.printList();
+
+        dll.addFirst(0);
+        System.out.println("Lista después de agregar un elemento al principio:");
+        dll.printList();
+
+        dll.removeLast();
+        System.out.println("Lista después de eliminar el último elemento:");
+        dll.printList();
+
+        dll.removeFirst();
+        System.out.println("Lista después de eliminar el primer elemento:");
+        dll.printList();
+    }
+}

+ 49 - 0
unidad3/java/ListaDoble/DoublyLinkedList.jgrasp_canvas_xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Canvas xmlns="http://www.jgrasp.org">
+  <Language>Java</Language>
+  <ShowTypes>false</ShowTypes>
+  <Version>2</Version>
+  <Grid>
+    <Snap>true</Snap>
+    <Show>false</Show>
+  </Grid>
+  <Scope id="0">
+    <Name>main</Name>
+    <Signature>([Ljava/lang/String;)V</Signature>
+    <DeclaringType>DoublyLinkedList</DeclaringType>
+    <Depth>0</Depth>
+  </Scope>
+  <Frame>
+    <Bounds>
+      <AutoSize>false</AutoSize>
+      <X>60</X>
+      <Y>70</Y>
+      <W>818</W>
+      <H>288</H>
+    </Bounds>
+    <PanelSize>
+      <Key>jgrasp_viewers.java__lang__Object_LinkedView0</Key>
+      <Order>4</Order>
+      <W>824</W>
+      <H>332</H>
+    </PanelSize>
+    <Viewer>
+      <ScopeID>0</ScopeID>
+      <Expression>`local DoublyLinkedList` dll</Expression>
+      <ViewerClass>jgrasp_viewers.java__lang__Object_LinkedView</ViewerClass>
+      <ViewerData>
+        <ViewData>
+          <Round>false</Round>
+        </ViewData>
+      </ViewerData>
+    </Viewer>
+  </Frame>
+  <Size>
+    <W>960</W>
+    <H>464</H>
+  </Size>
+  <ESize>
+    <W>960</W>
+    <H>464</H>
+  </ESize>
+</Canvas>

+ 80 - 0
unidad3/java/ListaSimple/Lista.java

@@ -0,0 +1,80 @@
+// Definición de la clase Nodo para representar cada elemento de la lista
+class Nodo {
+    int valor;
+    Nodo siguiente;
+
+    public Nodo(int valor) {
+        this.valor = valor;
+        this.siguiente = null;
+    }
+}
+
+// Definición de la clase ListaSimple para manejar la lista
+class ListaSimple {
+    private Nodo cabeza;
+
+    public ListaSimple() {
+        this.cabeza = null;
+    }
+
+    // Método para agregar un elemento al final de la lista
+    public void agregar(int valor) {
+        Nodo nuevoNodo = new Nodo(valor);
+        if (cabeza == null) {
+            cabeza = nuevoNodo;
+        } else {
+            Nodo actual = cabeza;
+            while (actual.siguiente != null) {
+                actual = actual.siguiente;
+            }
+            actual.siguiente = nuevoNodo;
+        }
+    }
+
+    // Método para mostrar la lista
+    public void mostrar() {
+        Nodo actual = cabeza;
+        while (actual != null) {
+            System.out.print(actual.valor + " -> ");
+            actual = actual.siguiente;
+        }
+        System.out.println("null");
+    }
+
+    // Método para buscar un elemento en la lista
+    public boolean buscar(int valor) {
+        Nodo actual = cabeza;
+        while (actual != null) {
+            if (actual.valor == valor) {
+                return true;
+            }
+            actual = actual.siguiente;
+        }
+        return false;
+    }
+}
+
+// Clase principal para probar la lista simple
+public class Lista {
+    public static void main(String[] args) {
+        ListaSimple lista = new ListaSimple();
+
+        // Agregar elementos a la lista
+        lista.agregar(1);
+        lista.agregar(2);
+        lista.agregar(3);
+        lista.agregar(4);
+
+        // Mostrar la lista
+        System.out.println("Lista simple:");
+        lista.mostrar();
+
+        // Buscar un elemento en la lista
+        int valorBuscado = 3;
+        if (lista.buscar(valorBuscado)) {
+            System.out.println("Elemento " + valorBuscado + " encontrado en la lista.");
+        } else {
+            System.out.println("Elemento " + valorBuscado + " no encontrado en la lista.");
+        }
+    }
+}

+ 89 - 0
unidad3/java/ListaSimple/Lista.jgrasp_canvas_xml

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Canvas xmlns="http://www.jgrasp.org">
+  <Language>Java</Language>
+  <ShowTypes>false</ShowTypes>
+  <Version>2</Version>
+  <Grid>
+    <Snap>true</Snap>
+    <Show>false</Show>
+  </Grid>
+  <Scope id="1">
+    <Name>buscar</Name>
+    <Signature>(I)Z</Signature>
+    <DeclaringType>ListaSimple</DeclaringType>
+    <Depth>1</Depth>
+  </Scope>
+  <Scope id="0">
+    <Name>main</Name>
+    <Signature>([Ljava/lang/String;)V</Signature>
+    <DeclaringType>Lista</DeclaringType>
+    <Depth>0</Depth>
+  </Scope>
+  <Frame>
+    <Bounds>
+      <AutoSize>false</AutoSize>
+      <X>10</X>
+      <Y>70</Y>
+      <W>728</W>
+      <H>328</H>
+    </Bounds>
+    <PanelSize>
+      <Key>jgrasp_viewers.java__lang__Object_LinkedView0</Key>
+      <Order>4</Order>
+      <W>734</W>
+      <H>366</H>
+    </PanelSize>
+    <Viewer>
+      <ScopeID>0</ScopeID>
+      <Expression>`local ListaSimple` lista</Expression>
+      <ViewerClass>jgrasp_viewers.java__lang__Object_LinkedView</ViewerClass>
+      <ViewerData>
+        <ViewData>
+          <Round>false</Round>
+        </ViewData>
+      </ViewerData>
+    </Viewer>
+  </Frame>
+  <Frame>
+    <Bounds>
+      <AutoSize>true</AutoSize>
+      <X>170</X>
+      <Y>360</Y>
+      <W>110</W>
+      <H>54</H>
+    </Bounds>
+    <LabelLoc>
+      <WO>false</WO>
+    </LabelLoc>
+    <Viewer>
+      <ScopeID>1</ScopeID>
+      <Expression>`local int` valor</Expression>
+      <ViewerClass>jgrasp_viewers._X_ElementView</ViewerClass>
+    </Viewer>
+  </Frame>
+  <Frame>
+    <Bounds>
+      <AutoSize>true</AutoSize>
+      <X>50</X>
+      <Y>360</Y>
+      <W>110</W>
+      <H>54</H>
+    </Bounds>
+    <LabelLoc>
+      <WO>false</WO>
+    </LabelLoc>
+    <Viewer>
+      <ScopeID>1</ScopeID>
+      <Expression>`local Nodo` actual.valor</Expression>
+      <ViewerClass>jgrasp_viewers._X_ElementView</ViewerClass>
+    </Viewer>
+  </Frame>
+  <Size>
+    <W>778</W>
+    <H>615</H>
+  </Size>
+  <ESize>
+    <W>778</W>
+    <H>615</H>
+  </ESize>
+</Canvas>

+ 83 - 82
unidad3/java/queue/Queue.java

@@ -1,83 +1,84 @@
-public class Queue<T> {
-    private Node<T> front; // Puntero al frente de la cola
-    private Node<T> rear;  // Puntero al final de la cola
-    private int size;     // Tamaño de la cola
-
-    // Clase interna para el nodo
-    private static class Node<T> {
-        T data;
-        Node<T> next;
-
-        Node(T data) {
-            this.data = data;
-            this.next = null;
-        }
-    }
-
-    // Constructor para la cola
-    public Queue() {
-        front = rear = null;
-        size = 0;
-    }
-
-    // Método para agregar un elemento a la cola
-    public void enqueue(T data) {
-        Node<T> newNode = new Node<>(data);
-        if (isEmpty()) {
-            front = rear = newNode;
-        } else {
-            rear.next = newNode;
-            rear = newNode;
-        }
-        size++;
-    }
-
-    // Método para eliminar un elemento de la cola
-    public T dequeue() {
-        if (isEmpty()) {
-            throw new IllegalStateException("La cola está vacía");
-        }
-        T data = front.data;
-        if (front == rear) {
-            front = rear = null;
-        } else {
-            front = front.next;
-        }
-        size--;
-        return data;
-    }
-
-    // Método para verificar si la cola está vacía
-    public boolean isEmpty() {
-        return front == null;
-    }
-
-    // Método para obtener el tamaño de la cola
-    public int size() {
-        return size;
-    }
-
-    // Método para imprimir los elementos de la cola
-    public void printQueue() {
-        Node<T> current = front;
-        while (current != null) {
-            System.out.print(current.data + " ");
-            current = current.next;
-        }
-        System.out.println();
-    }
-
-    // Método main para probar la implementación de la cola
-    public static void main(String[] args) {
-        Queue<Integer> queue = new Queue<>();
-        queue.enqueue(1);
-        queue.enqueue(2);
-        queue.enqueue(3);
-        System.out.println("Tamaño de la cola: " + queue.size());
-        queue.printQueue();
-        System.out.println("Desencolando: " + queue.dequeue());
-        System.out.println("Desencolando: " + queue.dequeue());
-        System.out.println("Tamaño de la cola después de desencolar dos elementos: " + queue.size());
-        queue.printQueue();
-    }
+public class Queue<T> {
+    private static class Node<T> {
+        T data;
+        Node<T> next;
+
+        Node(T data) {
+            this.data = data;
+            this.next = null;
+        }
+    }
+
+    private Node<T> front; // Frente de la cola
+    private Node<T> rear;  // Final de la cola
+    private int size;      // Tamaño de la cola
+
+    public Queue() {
+        front = null;
+        rear = null;
+        size = 0;
+    }
+
+    // Método para agregar un elemento a la cola
+    public void enqueue(T item) {
+        Node<T> newNode = new Node<>(item);
+        if (isEmpty()) {
+            front = newNode;
+            rear = newNode;
+        } else {
+            rear.next = newNode;
+            rear = newNode;
+        }
+        size++;
+    }
+
+    // Método para eliminar y devolver el elemento en el frente de la cola
+    public T dequeue() {
+        if (isEmpty()) {
+            throw new IllegalStateException("La cola está vacía");
+        }
+        T data = front.data;
+        front = front.next;
+        if (front == null) {
+            rear = null;
+        }
+        size--;
+        return data;
+    }
+
+    // Método para verificar si la cola está vacía
+    public boolean isEmpty() {
+        return front == null;
+    }
+
+    // Método para obtener el tamaño de la cola
+    public int size() {
+        return size;
+    }
+
+    // Método para imprimir los elementos de la cola
+    public void printQueue() {
+        Node<T> current = front;
+        while (current != null) {
+            System.out.print(current.data + " ");
+            current = current.next;
+        }
+        System.out.println();
+    }
+
+    public static void main(String[] args) {
+        Queue<Integer> queue = new Queue<>();
+        queue.enqueue(1);
+        queue.enqueue(2);
+        queue.enqueue(3);
+
+        System.out.print("Elementos en la cola: ");
+        queue.printQueue();
+
+        System.out.println("Desencolando: " + queue.dequeue());
+        System.out.print("Elementos en la cola después de desencolar: ");
+        queue.printQueue();
+
+        System.out.println("Tamaño de la cola: " + queue.size());
+    }
 }

+ 49 - 0
unidad3/java/queue/Queue.jgrasp_canvas_xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Canvas xmlns="http://www.jgrasp.org">
+  <Language>Java</Language>
+  <ShowTypes>false</ShowTypes>
+  <Version>2</Version>
+  <Grid>
+    <Snap>true</Snap>
+    <Show>false</Show>
+  </Grid>
+  <Scope id="0">
+    <Name>enqueue</Name>
+    <Signature>(Ljava/lang/Object;)V</Signature>
+    <DeclaringType>Queue</DeclaringType>
+    <Depth>1</Depth>
+  </Scope>
+  <Frame>
+    <Bounds>
+      <AutoSize>false</AutoSize>
+      <X>20</X>
+      <Y>60</Y>
+      <W>598</W>
+      <H>398</H>
+    </Bounds>
+    <PanelSize>
+      <Key>jgrasp_viewers.java__lang__Object_LinkedView0</Key>
+      <Order>4</Order>
+      <W>604</W>
+      <H>436</H>
+    </PanelSize>
+    <Viewer>
+      <ScopeID>0</ScopeID>
+      <Expression>this</Expression>
+      <ViewerClass>jgrasp_viewers.java__lang__Object_LinkedView</ViewerClass>
+      <ViewerData>
+        <ViewData>
+          <Round>false</Round>
+        </ViewData>
+      </ViewerData>
+    </Viewer>
+  </Frame>
+  <Size>
+    <W>660</W>
+    <H>653</H>
+  </Size>
+  <ESize>
+    <W>660</W>
+    <H>653</H>
+  </ESize>
+</Canvas>

+ 70 - 78
unidad3/java/stack/Stack.java

@@ -1,78 +1,70 @@
-public class Stack<T> {
-    private Node<T> top; // Puntero al tope de la pila
-    private int size;    // Tamaño de la pila
-
-    // Clase interna para el nodo
-    private static class Node<T> {
-        T data;
-        Node<T> next;
-
-        Node(T data) {
-            this.data = data;
-            this.next = null;
-        }
-    }
-
-    // Constructor para la pila
-    public Stack() {
-        top = null;
-        size = 0;
-    }
-
-    // Método para agregar un elemento a la pila
-    public void push(T data) {
-        Node<T> newNode = new Node<>(data);
-        if (isEmpty()) {
-            top = newNode;
-        } else {
-            newNode.next = top;
-            top = newNode;
-        }
-        size++;
-    }
-
-    // Método para eliminar un elemento de la pila
-    public T pop() {
-        if (isEmpty()) {
-            throw new IllegalStateException("La pila está vacía");
-        }
-        T data = top.data;
-        top = top.next;
-        size--;
-        return data;
-    }
-
-    // Método para verificar si la pila está vacía
-    public boolean isEmpty() {
-        return top == null;
-    }
-
-    // Método para obtener el tamaño de la pila
-    public int size() {
-        return size;
-    }
-
-    // Método para imprimir los elementos de la pila
-    public void printStack() {
-        Node<T> current = top;
-        while (current != null) {
-            System.out.print(current.data + " ");
-            current = current.next;
-        }
-        System.out.println();
-    }
-
-    // Método main para probar la implementación de la pila
-    public static void main(String[] args) {
-        Stack<Integer> stack = new Stack<>();
-        stack.push(1);
-        stack.push(2);
-        stack.push(3);
-        System.out.println("Tamaño de la pila: " + stack.size());
-        stack.printStack();
-        System.out.println("Desapilando: " + stack.pop());
-        System.out.println("Desapilando: " + stack.pop());
-        System.out.println("Tamaño de la pila después de desapilar dos elementos: " + stack.size());
-        stack.printStack();
-    }
-}
+class Node {
+    long data; // El dato que se almacenará en el nodo
+    Node next; // Referencia al siguiente nodo en la lista
+
+    public Node(long data) {
+        this.data = data;
+        this.next = null;
+    }
+}
+
+public class Stack {
+    private Node top; // Referencia al nodo superior (cima) del stack
+
+    // Constructor para inicializar un stack vacío
+    public Stack() {
+        top = null;
+    }
+
+    // Método para añadir un elemento al stack
+    public void push(long j) {
+        Node newNode = new Node(j);
+        if (top == null) {
+            top = newNode; // Si el stack está vacío, el nuevo nodo será la cima
+        } else {
+            newNode.next = top; // El siguiente del nuevo nodo apunta al actual nodo superior
+            top = newNode; // El nuevo nodo se convierte en la nueva cima
+        }
+    }
+
+    // Método para eliminar un elemento del stack
+    public long pop() {
+        if (top == null) {
+            System.out.println("El stack está vacío.");
+            return -1; // Valor especial para indicar error (stack vacío)
+        } else {
+            long temp = top.data; // Guarda el dato de la cima en una variable temporal
+            top = top.next; // Mueve la cima al siguiente nodo
+            return temp; // Devuelve el dato eliminado
+        }
+    }
+
+    // Método para verificar si el stack está vacío
+    public boolean isEmpty() {
+        return (top == null);
+    }
+
+    // Método para obtener el elemento en la cima del stack sin eliminarlo
+    public long peek() {
+        if (top == null) {
+            System.out.println("El stack está vacío.");
+            return -1; // Valor especial para indicar error (stack vacío)
+        } else {
+            return top.data;
+        }
+    }
+
+    public static void main(String[] args) {
+        Stack stack = new Stack(); // Crear un stack vacío
+
+        stack.push(10);
+        stack.push(20);
+        stack.push(30);
+        stack.push(40);
+        stack.push(50);
+
+        while (!stack.isEmpty()) {
+            System.out.print(stack.pop() + " "); // Debería imprimir 50 40 30 20 10
+        }
+    }
+}

+ 49 - 0
unidad3/java/stack/Stack.jgrasp_canvas_xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Canvas xmlns="http://www.jgrasp.org">
+  <Language>Java</Language>
+  <ShowTypes>false</ShowTypes>
+  <Version>2</Version>
+  <Grid>
+    <Snap>true</Snap>
+    <Show>false</Show>
+  </Grid>
+  <Scope id="0">
+    <Name>main</Name>
+    <Signature>([Ljava/lang/String;)V</Signature>
+    <DeclaringType>Stack</DeclaringType>
+    <Depth>0</Depth>
+  </Scope>
+  <Frame>
+    <Bounds>
+      <AutoSize>false</AutoSize>
+      <X>30</X>
+      <Y>70</Y>
+      <W>728</W>
+      <H>304</H>
+    </Bounds>
+    <PanelSize>
+      <Key>jgrasp_viewers.java__lang__Object_LinkedView0</Key>
+      <Order>4</Order>
+      <W>734</W>
+      <H>342</H>
+    </PanelSize>
+    <Viewer>
+      <ScopeID>0</ScopeID>
+      <Expression>`local Stack` stack</Expression>
+      <ViewerClass>jgrasp_viewers.java__lang__Object_LinkedView</ViewerClass>
+      <ViewerData>
+        <ViewData>
+          <Round>false</Round>
+        </ViewData>
+      </ViewerData>
+    </Viewer>
+  </Frame>
+  <Size>
+    <W>661</W>
+    <H>540</H>
+  </Size>
+  <ESize>
+    <W>661</W>
+    <H>540</H>
+  </ESize>
+</Canvas>