Apply your knowledge of modules and database file processing.
Part A. A pet store maintains an inventory database of all of the items in the shop. The shop manager wants a report that details the profit value of each inventory item on hand. The database contains the following fields:
File name: Inventory
Fields:
Stock Number
Description
Wholesale price
Retail Price
Here are a few sample records from the inventory database:
Fields --> Stock Number Description Wholesale price Retail Price
Record 1 --> 1234 "Dog Bone" $5 $10
Record 2 --> 3451 "Gold Fish" $2 $4
Record 3 --> 5643 "Fish Food" $2.50 $5
Write the pseudocode for a modularized program that will:
* Read each record from the inventory database
* Compute the profit for each record
* Print the record item's description, retail price and profit amount
Be sure to:
* Include a comment at the beginning of each module that describes the purpose of that module. A line containing a comment should begin with a single-quote (').
* Choose descriptive module and variable names
* Properly format your pseudocode (indentation)
* Use a structured loop to read the records
Edited by Rjog, 11 May 2008 - 10:22 AM.


Sign In
Create Account

Back to top









