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:
21
stack/Stack.java
Normal file
21
stack/Stack.java
Normal 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();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user