官术网_书友最值得收藏!

The inventory control system

Imagine that you have been asked to write a program that allows the user to keep track of the company's inventory—that is, the various items the company has available for sale. For each inventory item, you have been asked to keep track of the product code and the item's current location. New items will be added as they are received, and existing items will be removed once they have been sold. Your program will also need to generate two types of reports: a report listing the company's current inventory, including how many of each type of item there are in each location, and a report that is used to re-order inventory items once they have been sold.

Looking at these requirements, it is clear that there are three different types of information that we will need to store:

  1. A list of the different types of products that the company has for sale. For each product type, we will need to know the product code (sometimes called an SKU number), a description, and the desired number of items that the company should have in its inventory for that type of product.
  2. A list of the locations where inventory items can be held. These locations might be individual shops, warehouses, or storerooms. Alternatively, a location might identify a particular shelf or aisle within a shop. For each location, we need to have a location code and a description identifying that location.
  3. Finally, a list of the inventory items that the company currently holds. Each inventory item has a product code and a location code; these identify the type of product and where the item is currently held.

When running the program, the end user should be able to perform the following actions:

  • Add a new item to the inventory
  • Remove an item from the inventory
  • Generate a report of the current inventory items
  • Generate a report of the inventory items that need to be re-ordered
  • Quit the program

While this program is not too complicated, there are enough features here to benefit from a modular design, while still keeping our discussion relatively brief. Now that we have taken a look at what our program needs to do and the information we need to store, let's start applying modular programming techniques to the design of our system.

主站蜘蛛池模板: 含山县| 泰和县| 台州市| 宜兰市| 琼海市| 商城县| 咸阳市| 义马市| 丰台区| 北辰区| 新巴尔虎左旗| 卢氏县| 大石桥市| 罗江县| 永和县| 曲周县| 兰溪市| 安阳市| 华蓥市| 盈江县| 宁远县| 呼玛县| 二手房| 枣阳市| 逊克县| 神池县| 武平县| 民丰县| 双辽市| 南陵县| 白河县| 聊城市| 南宫市| 靖远县| 乳源| 武安市| 安塞县| 正蓝旗| 阿拉善左旗| 于都县| 永济市|