15

Case Study 2—An Inventory Table

15.1 INTRODUCTION

Chapter 7 introduced the ‘hash table’ for direct access to an array without using sequential or binary searches. This case study will apply the processes involved.

15.2 THE APPLICATION

Ace Office Products needs to store the inventory of its products in a table whose contents may be accessed directly.

The data consists of a product code, which is a unique key, the name of the item and the number of each item in stock. Other data such as unit cost could be included, but we will restrict the data stored to the first three, although you might wish to extend the program to include such additional information.

The operations to be carried out are

  1. the addition of new items;
  2. the deletion of items ...

Get Introducing Data Structures with Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.