/* * Homework 2, CSE 142 TVI, Winter 2001 * Ordering Muggle Goods * * Name : * Student ID : * Quiz Section: * * * This is a simple program to create order forms based on a request * for a few (6) greatly needed items from 3 different suppliers. * Order forms are created for the suppliers based on the user's order. * */ #include #include /* ---------------------------------------------------------------- * constant definitions go here */ /* ----------------- functions definitions follow --------------*/ /* ---------------------------------------------------------------- * PerItemCost -- * Parameters: takes an item number * Prints: nothing * Returns: the unit cost of that item * ----------------------------------------------------------------*/ double PerItemCost(int item_no) { } /* ---------------------------------------------------------------- * printItemName * Parameters: takes an item number * Prints: the name of that item * Returns: nothing * ----------------------------------------------------------------*/ void printItemName(int item_no) { } /* ---------------------------------------------------------------- * printSupplierName * Parameters: takes a supplier number * Prints: the NAME of that supplier * Returns: nothing * ----------------------------------------------------------------*/ void printSupplierName(int supplier_no) { } /* ---------------------------------------------------------------- * MakeOrder * Parameters: takes a supplier number, an item number, the quantity desired * for that item number, another item number, the quantity * desired for the second item * * the item numbers should correspond to the items sold by that * supplier * * Prints: the NAME of the supplier * * if the quantity of the first item is greater than zero, it * prints the QUANTITY of the first item, the NAME of the first * item, and the COST of purchasing that many of the first item * * it does the same thing for the second item * * Returns: the TOTAL COST of the order * ----------------------------------------------------------------*/ double MakeOrder(int supplier_no, int item_no1, int quantity1, int item_no2, int quantity2) { } /* ------------------------- end of function definitions -----------*/ /* THE MAIN BODY OF THE PROGRAM ITSELF */ int main(void) { /* variable definitions go here */ char dummy_char; /* used to pause program before exiting */ /* input the quantity of each item desired */ /* order requests should be generated here -- (i.e. calls to MakeOrder) */ /* total cost of the all orders should be printed */ /* pause before exiting */ printf("press enter to continue\n"); scanf("%c%c",&dummy_char,&dummy_char); return 0; }