Consider the BoundedQueue example from in-class exercise #7.
Complete the generic part of the exercise: The result should be fully generic, and there should not be any compiler warnings. To this end, you may well decide that the array implementation is both overly long and overly complex. Feel free to replace the array with a Java list. Doing so would eliminate the need for most of the other instance variables.
Keep the same functionality. That is,
you are re-implementing
not changing the behavior.
If you choose carefully about which code you rewrite,
your resulting rep-invariant should be much simpler than what
we discussed in class.
Define the method signatures carefully.
Use bounded wildcards as appropriate.
Supply a decent set of JUnit tests.