Thread: Modules Help!!
View Single Post
  #1 (permalink)  
Old 05-11-2008, 01:19 PM
Rjog Rjog is offline
Newbie
 
Join Date: May 2008
Posts: 1
Credits: 0
Rep Power: 0
Rjog is on a distinguished road
Default Modules Help!!

hey so im in a introduction to scripting class and im totally lost any help would be great just to show me an example of what this would look like and any tricks heres the problem




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

Last edited by Rjog; 05-11-2008 at 01:22 PM.
Reply With Quote

Sponsored Links