logo

Inventory Management System : Assignment

5 Pages2171 Words260 Views
   

Added on  2019-10-16

Inventory Management System : Assignment

   Added on 2019-10-16

ShareRelated Documents
Galaxy of Geckos Inventory Management SystemSummaryThe Galaxy of Geckos Inventory Management System displays data from a sequential file to the screen, and then displays a menu. The user can choose to add a new item, change an existing item, delete an item, create a report or exit the program. When the program exits, the same sequential data file will be written with the current data stored in the arrays.There are extra credit opportunities available for this project listed at the end of the instructions.General Requirements1.Sequential data file as input – You must use a sequential data file as input to the program. You may use the one provided, or create your own. If you create your own, it must follow the same format as the example file. This data file stores three pieces of data: the name of the inventory item stored as a string, the amount of the item in inventory stored as a number, and the cost of the item stored as a number. Note that this data file DOES NOT have a data terminating value like “END” or 00. Therefore, you must use the EOF function asthe condition of your loop when getting the data from it. Important! Close this file as soon as you are done reading it. See #5 below for why.2.Parallel arrays for storage while the program is running – You must use three parallel arrays to store the data input from the file: a string array for the item names, an integer array for the amounts of each item, and single-precision array for the item costs. Use a size of 10 for the arrays.3.Displaying the array data – After the arrays are loaded, print headings to the screen, and then print the data in the arrays to the screen. To print the data to the screen, loop through the names array, and if an item name is not equal to the empty string, then calculate the total value (amount of the item * cost per item). Print each item’s subscript, name, amount,cost per item and total value to the screen.4.Menu – You must display the style of menu as displayed below, which uses letters for the menu choices. After the user’s choice has been handled, redisplay the headings, array data, and the menu (except for when the user chooses to exit the program, as noted below.)5.Add, change or delete items in inventory – The program must be able to add a new item to inventory, change an existing item, or delete an item. See below for more details on these requirements.6.Sequential file as a report – If the user chooses to print an inventory report, print the output to a nicely-formatted sequential output file. Use a different file than the one you usefor input.7.Sequential data file as output – When the program exits, write the current contents of the array to the same file that you used for input. Remember that you will have to open this file
Inventory Management System : Assignment_1
for output this time, so be sure it is closed after you read its contents into the arrays as noted in requirement #1 above.8.Subroutines are mandatory! – You must use subroutines in your program for full credit. Believe me, it will be much easier if you do. Remember the purpose of subroutines is to be able to repeat a set of statements without having to copy and paste or retype.Menu Options1)Menu Choice “A” – If the user chooses to Add Item to Inventory, perform the following actions:a)Clear the screen.b)Determine if the arrays are already full. See the section Finding an Empty Position in the Arrays.c)If there isn’t enough room to add another item, print an error message.d)If it’s ok to add another item, then prompt the user for the new item’s name, amount and cost. Input these values directly into the open position in the arrays.2)Menu Choice “C” – If the user chooses to Change an Existing Item, perform the following actions:a)Clear the screen.b)Prompt the user for the item number that they wish to change.c)If the item number entered by the user is not a valid item number (it is less than 1, or greater than 10), print an error message.d)If the item number is a valid subscript to the arrays, then prompt the user for the item’s new name, new amount and new cost. Input these values directly into the appropriate positions in the arrays.3)Menu Choice “D” – If the user chooses to Delete an Item from Inventory, perform the following actions:a)Clear the screen.b)Prompt the user for the item number that they wish to delete.c)If the item number entered by the user is not a valid item number (it is less than 1, or greater than 10), print an error message.d)If the item number is a valid subscript to the arrays, then change the data in the appropriate positions in the arrays. In the item names array, set the appropriate element to "" (an empty string). In the numeric arrays, set the appropriate element to 0.4)Menu Choice “P” – If the user chooses to print the inventory report to a file, perform the following actions:a)Clear the screen.b)Open a sequential file as output. Note – do not use the same file as you use to store the data. This should be a completely different file. Also note that you must use PRINT statements to write this report to a file.c)Print the appropriate headings to the file.d)Loop through the arrays:
Inventory Management System : Assignment_2

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Sales Commission Calculator
|11
|610
|80

Temperature Recording Program: Java Implementation for Daily and Weekly Temperature Tracking
|7
|1100
|494

Important Lessons Learned in Developing a Vehicle Inventory System
|3
|539
|339

Designing with Python Assignment
|13
|3085
|564

Lookup Password for Websites Assignment
|5
|1446
|497

Assignment | Console-based Program in Python 3
|7
|3311
|459