// Oefening ListTest, D&D 5, blz 1056,..

import be.hogent.h20.H20_List;
import be.hogent.h20.H20_EmptyListException;

public class H20_ListTest {
	
	public static void main (String args[]) {
		H20_List list = new H20_List();
		
		Boolean bool = Boolean.TRUE;
		Character karakter = new Character('€');
		Integer integer = new Integer(21184);
		String string = "Psst";
		
		list.insertAtFront(bool);
		list.print();
		list.insertAtFront(karakter);
		list.print();
		list.insertAtBack(integer);
		list.print();
		list.insertAtBack(string);
		list.print();
	
		try {
			Object removedObject = list.removeFromFront();
			System.out.println(removedObject.toString() + " verwijderd");
			list.print();
			
			removedObject = list.removeFromFront();
			System.out.println(removedObject.toString() + " verwijderd");
			list.print();
			
			removedObject = list.removeFromBack();
			System.out.println(removedObject.toString() + " verwijderd");
			list.print();
			
			removedObject = list.removeFromBack();
			System.out.println(removedObject.toString() + " verwijderd");
			list.print();
		}
		catch (H20_EmptyListException x) {
			x.printStackTrace();		
		}
	}
}
