Abstract Data Types

For instance, let us look at a generic queue → A queue that can store object of any type. Sample Implementation:

public class Queue<E>{
	public void add(E element) { ... }
	public E remove() { ... }
	public int size() { ... }
	...
}

Solution : Multiple Implementations


Adding Indirection