Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The model is implemented in the same way as the Hashtable class in Chapter 7. Code fragments follow, but the entire source code is given in Section 15.18 and in the software bundle accompanying this book.
The first decision is for an appropriate product record. In C and C++, a record can be defined as a struct with the appropriate fields. In Java, we shall use a class Product with the three attributes code, name and instock.