34 lines
908 B
Java
34 lines
908 B
Java
package T01.Aufgabe05;
|
|
|
|
/**
|
|
* Teil 1 / Aufgabe 5
|
|
*
|
|
* @author Sebastian Brosch
|
|
*/
|
|
public class Aufgabe05 {
|
|
public static void main(String[] args) {
|
|
|
|
System.out.println("\nQueue with Array:");
|
|
|
|
ArrayQueue queueA = new ArrayQueue();
|
|
queueA.add(new Produkt(1, "Salz", 10.0, Regalnummer.Regal01));
|
|
queueA.add(new Produkt(2, "Zucker", 15.0, Regalnummer.Regal02));
|
|
queueA.add(new Produkt(3, "Mehl", 10.0, Regalnummer.Regal03));
|
|
|
|
queueA.take().print();
|
|
queueA.take().print();
|
|
queueA.take().print();
|
|
|
|
System.out.println("\nQueue with List:");
|
|
|
|
ListQueue queueB = new ListQueue();
|
|
queueB.add(new Produkt(1, "Salz", 10.0, Regalnummer.Regal01));
|
|
queueB.add(new Produkt(2, "Zucker", 15.0, Regalnummer.Regal02));
|
|
queueB.add(new Produkt(3, "Mehl", 10.0, Regalnummer.Regal03));
|
|
|
|
queueB.take().print();
|
|
queueB.take().print();
|
|
queueB.take().print();
|
|
}
|
|
}
|