This will get the job done, but it would be better to use Iterators. Let's create them now. One Iterator could be moving forward and backward. Associations have two data members, key and value . These values are set in the Constructors.
Associations have two constructors.
One that only takes in a key and other takes in both members. The functions for this class are simple. There is a Key function and a Value function. These return the key and the value values. Think of an Association as an array element.