import java.util.*; public class BoundedBuffer implements Buffer { private static final int BUFFER_SIZE = 5; private int count; // number of items in the buffer private int in; // points to the next free position private int out; // points to the next full position private E[] buffer; public BoundedBuffer() { // buffer is initially empty count = 0; in = 0; out = 0; buffer = (E[]) new Object[BUFFER_SIZE]; } // producers calls this method public void insert(E item) { // TODO } // consumers calls this method public E remove() { // TODO return null; } }