Consider an ADT Map
that maps strings to integers. Maps
allow an existing mapping to be looked up. Maps are mutable; new
pairs can be added to a map and existing pairs can be deleted.
Give a constructive specification for Map
using an
appropriate formalism. That is, give the sets, signatures, and
constructive semantics for the ADT.
Define a Java interface
for Map
, documented
in an appropriate manner.
Design and code two different Java classes that implement the interface and the corresponding ADT in distinctively different ways.
Construct an appropriate testing program for the classes to make sure the classes work properly. Test each class thoroughly.
Turn in a paper docuemnt with your designs and code. Also submit an electronic copy of your files.