Refactor di tutto lo stack. Manca l'esercizio sulle operazioni matematiche via stack. Sulla coda bisogna implementare da zero FixedArrayQueue e poi la relativa versione senza fullexception in ArrayQueue. Esercizi!

This commit is contained in:
2014-03-17 12:11:39 +01:00
parent d60e74a09c
commit 08069c6b46
17 changed files with 318 additions and 95 deletions

21
stack/Stack.java Normal file
View File

@@ -0,0 +1,21 @@
package stack;
import exceptions.EmptyStackException;
import exceptions.FullStackException;
/**
* Created with MONSTER.
* User: xgiovio
* Date: 05/03/14
* Time: 0.06
*/
public interface Stack<E> {
public void push (E element) throws FullStackException;
public E top () throws EmptyStackException;
public E pop () throws EmptyStackException;
public boolean isEmpty();
public boolean isFull();
public int size();
}