Home > C/C++ > Grocery Store Program

Grocery Store Program

July 16th, 2009

Write a menu-driven, interactive program that tracks inventory for a grocery store. The program uses a structure whose members represent the following: the current month, an item’s name, unique identification code, actual quantity in stock for the current month, desired quantity in stock for the current month, cost, price, supplier, shelf life, average monthly volume, and sales total in dollars for the current month. The store carries at least 20 items. The program prompts the user to make one of five choices:

0. Exit
1. Item Sale
2. Daily Report
3. Weekly Check
4. Monthly Update

If the user picks 1, the program prompts for an item’s unique identification number and the quantity sold. The program then updates the associated structure members(e.g. the program decrements the actual quantity in stock and increments monthly sales total). If the user picks 2, the program generates a report that prints each item’s unique identification number, name, and current sales total. If the user picks 3, the program determines whether any item is in low supply and issues a warning message for every such item. An item is in low supply if its actual quantity in stock falls below its desired quantity in stock. If the user picks 4, the program prompts for the current month( a character string), the actual quantity in stock, and the desired quantity in stock. The program then updates the appropriate structure variables(e.g., it sets monthly sales total to zero. Finally, if the user picks 0, the program terminates.


Grocery Store Program

Comments are closed.
Bear