August 2002
Beginner
1122 pages
22h 1m
English
Now let's examine the details of the part of this inventory control program that calculates how much of each item has to be ordered to refill the stock. As I mentioned previously, I've chosen the imaginative name ReorderItems for the member function in the Inventory class that will perform this operation. The ReorderItems function is pretty simple. Its behavior can be described as follows:
'For each element in the StockItem Vec in the Inventory object, call its member function Reorder to generate an order if that StockItem object needs to be reordered.'
Of course, this algorithm is much simpler than we would need in the real world; however, it's realistic enough to be useful in illustrating important ...
Read now
Unlock full access