Goal:
Generics.
Consider a flyweight version of the ImmutableStack.java.
Your assignment is to:
ImmutableStack
generic.
public void putAll (Collection c) throws ...This method might throw various exceptions. You should think through - and document, with Javadoc or postconditions - all of the possibilities.
equals()
or hashcode()
.
This is both correct and desirable. Explain why on both counts.
Grading Criteria:
putAll
method (both code and documentation).
equals()
and hashcode()
.