O'Reilly logo

Introducing Data Structures with Java by David Cousins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required