This flashcard is just one of a free flashcard set. See all flashcards!
18
Queue/ Implementierung
public class Queue{
private Liste queue;
public Queue(){
queue = new Liste();
}
public int front(){
return queue.getLast();
}
public void enter(int zahl){
queue.addFirst(zahl);
}
public void leave(){
queue.removeLast();
}
public boolean isEmpty(){
if (queue.isEmpty()){
return true;
}else false;
private Liste queue;
public Queue(){
queue = new Liste();
}
public int front(){
return queue.getLast();
}
public void enter(int zahl){
queue.addFirst(zahl);
}
public void leave(){
queue.removeLast();
}
public boolean isEmpty(){
if (queue.isEmpty()){
return true;
}else false;
Flashcard info:
Author: hristiana86
Main topic: Informatik
School / Univ.: HS
City: Mannheim
Published: 14.06.2010