In a grocery store, in order to be able to always have the proper number of items available on shelves, an inventory system is needed to keep track of items available in the inventory and make sure the quantity of the items does not fall below a specific count.Your job for this project is to prepare an application that manages the inventory of items needed for a grocery store. The application should be able to keep track of the following information about an item:1- The SKU number2- The name (maximum of 20 chars)3- Quantity (On hand quantity currently available in the inventory)4- Minimum Quantity (if the quantity of the item falls less than or equal to this value, a warning should be generated)5- Price of the item6- Is the item TaxedThis application must be able to do the following tasks:1- Print a detailed list of all the items in the inventory2- Search and display an item by its SKU number3- Checkout an item to be delivered to the shelf for sale4- Add to stock items that are recently purchased for inventory (add to their quantity)5- Add a new item to the inventory or update an already existing itemPROJECT DEVELOPMENT PROCESSTo make the development of this application fun and easy, the tasks are broken down into several functions that are given to you from very easy ones to more complicated one by the end of the projectSince you act like a programmer in this project, you do not need to know the big picture. The professor is your system analyst and designs the system and all its functions to work together in harmony. Each milestone is divided into a few functions. For each function, firstly, understand the goal of the function. Secondly, write the code for it and test it with the tester. Once your code for the function passes the test, set it aside and pick up the next function. Continue until the milestone is complete.2The Development process of the project is divided into four milestones and therefore four deliverables. All four deliverables are mandatory and conclude full submission of the project. For each deliverable, a tester program (also called a unit test) will be provided to you to test your functions. If the tester works the way it is supposed to do, you can submit that milestone and start the next. The approximate schedule for deliverables is as follows The UI Tools and app interface Due July 4th The Item IO Due July 13th Item Storage and Retrieval in Array Due July 25nd File IO and final assembly Due Aug. 9thFILE STRUCTURE OF THE PROJECTFor each milestone, two source files are provided under the name 144_msX_tester.c and 144_msX.c. 144_msX_tester.c includes the main() tester program provided by your professor to test your implementation of the functions of the project. (Replace X with the milestone number from 1 to 5) This main program acts like a tester (a unit test) that simply makes different calls to the functions you have written to make sure they work properly.Code your functions in 144_msX.c test them one by one using the main function provided. You can comment out the parts of the main program for which functions are not developed yet. You are not allowed to change the code in tester. Make sure you do not make any modifications in the tester since at the time of submission the original copy of the tester will be used for compilation automatically by the submit command.MARKING:Please follow this link for marking details: https://scs.senecac.on.ca/~ipc144/dynamic/assignments/Marking_Rubric.pdfMILESTONE 1: THE USER INTERFACE TOOLS AND APP INTERFACEDownload or Clone milestone 1 (MS1) from https://github.com/Seneca-144100/IPC-ProjectIn 144_msX.c code the following functions:USER INTERFACE TOOLSvoid welcome(void);Prints the following line and goes to newline >=== Grocery Inventory System ===<3void printTitle(void);Prints the following two lines and goes to newline>Row |SKU| Name | Price |Taxed| Qty | Min | Total |Atn< >-+++++++|<void printFooter(double gTotal);Prints the following line and goes to newline >+-<Then if gTotal is greater than zero it will print this line: (assuming gTotal is 1234.57) and go to new line. > Grand Total: | 1234.57<Use this format specifier for printing gTotal : %12.2lfvoid flushKeyboard(void);clear Keyboard Makes sure the keyboard is clear by reading from keyboard character by character until it reads a new line character.Hint: In a loop, keep reading single characters from keyboard until newline character is read (
). Then, exit the loop.void pause(void);Pauses the execution of the application by printing a message and waiting for user to hit <ENTER>.Print the following line and DO NOT go to newline: >Press <ENTER> to continue< Then, call flushKeyboard function. Here the flushKeyboard function is used for a fool-proof <ENTER> key entry.int getInt(void);Gets a valid integer from the keyboard and returns it. If the integer is not valid it will print: Invalid integer, please try again: and try again. This function must be fool-proof; it should not let the user pass, unless a valid integer is entered.Hint: to do this, you can have two variables read back to back by scanf; an integer and then a character (%d%c) and make sure the second (the character) is new line. If the second character is new line, then this guaranties that first integer is successfully read and also after the integer <ENTER> is hit. If the character is anything but new line, then either the user did not enter an integer properly, or has some additional4characters after the integer, which is not good. In this case clear the keyboard, print an error message andscan the integer again. See the flowchart below.Loop whileNL !=
Scan Valueand NLNL !=
StartgetInt()Set character NL to xcreate integer ValuePrint errormessageReturn ValueTrueTrueFalseFalseCall clrKyb()int getIntLimited(int lowerLimit, int upperLimit);This function uses getInt() to receive a valid integer and returns it. This function makessure the integer entered is within the limits required (between lowerLimit andupperLimit inclusive). If the integer is not within the limits, it will print:> Invalid value, TheLowerLimmit < value < TheUpperLimit: <and try again. (Change the lower and upper limit with their values.)This function is fool-proof too; the function will not let the user pass until a valid integeris received based on the lower and upper limit values.CallflushKeyboard()5double getDouble(void);Works exactly like getInt() but scans a double instead of an integer with the following error message: Invalid number, please try again: double getDoubleLimited(double lowerLimit, double upperLimit); Works exactly like getIntLimited() but scans a double instead of an integer. OUTPUT SAMPLE: (UNDERLINED, ITALIC BOLD RED VALUES ARE USER ENTRIES)=== Grocery Inventory System ===listing header and footer with grand total:Row |SKU| Name | Price |Taxed| Qty | Min | Total |Atn-+++++++|+-Grand Total: | 1234.57listing header and footer without grand total:Row |SKU| Name | Price |Taxed| Qty | Min | Total |Atn-+++++++|+-Press <ENTER> to continue <ENTER>Enter an integer: abcInvalid integer, please try again: 10abcInvalid integer, please try again: 10You entered: 10Enter an integer between 10 and 20: 9Invalid value, 10 < value < 20: 21Invalid value, 10 < value < 20: 15Your entered 15Enter a floating point number: abcInvalid number, please try again: 2.3abcInvalid number, please try again: 2.3You entered: 2.30Enter a floating point number between 10.00 and 20.00: 9.99Invalid value, 10.000000< value < 20.000000: 20.1Invalid value, 10.000000< value < 20.000000: 15.05You entered: 15.05End of tester program for IO tools!THE APPLICATION USER INTERFACE SKELETON Now that the user interface tools are created and tested, we are going to build the main skeleton of our application. This application will be a menu driven program and will work as follows:1- When the program starts the title of the application is displayed.62- Then a menu is displayed.3- The user selects one of the options on the Menu.4- Depending on the selection, the corresponding action will take place.5- The Application will pause to attract the user s attention6- If the option selected is not Exit program, then the program will go back to option 27- If the option selected is Exit program, the program ends.The above is essentially the pseudo code for any program that uses a menu driven user interface.To accomplish the above create the following three functions:int yes(void)Receives a single character from the user and then clears the keyboard (flushKeyboard()). If the character read is anything other than Y, y, N or n, it will print an error message as follows: >Only (Y)es or (N)o are acceptable: < and goes back to read a character until one of the above four characters is received. Then, it will return 1 if the entered character is either y or Y, otherwise it will return 0.int menu(void)Menu prints the following options:>< >1- List all items<>2- Search by SKU<>3- Checkout an item<>4- Stock an item<>5- Add new item or update item<>6- Delete item<>7- Search by name<>0- Exit program< >> <Then, it receives an integer between 0 and 7 inclusive and returns it. Menu will not accept any number less than 0 or greater than 7 (Use the proper UI function written in the UI tools).void GroceryInventorySystem(void)This function is the heart of your application and will run the whole program.7GroceryInventorySystem, first, displays the welcome message and skips a line and then displays the menu and receives the user s selection.If user selects 1, it displays: >List Items under construction!< and goes to newlineIf user selects 2, it displays: >Search Items under construction!< and goes to newlineIf user selects 3, it displays: >Checkout Item under construction!< and goes to newlineIf user selects 4, it displays: >Stock Item under construction!< and goes to newlineIf user selects 5, it displays: >Add/Update Item under construction!< and goes to newlineIf user selects 6, it displays: >Delete Item under construction!< and goes to newlineIf user selects 7, it displays: >Search by name under construction!< and goes to newlineAfter receiving a number between 1 and 7, it will pause the application and goes back to display the menu.If user selects 0, it displays: >Exit the program? (Y)es/(N)o): < and waits for the user to enter Y, y, N or n for Yes or No. If the user replies Yes, it will end the program, otherwise it goes back to display the menu.The following is a general pseudo code for a menu driven user interface. Using this pseudo code is optional. You can use any other logic if you like.Application user interface pseudo code: while it is not donedisplay menuget selected option from usercheck selection:option one selectedact accordinglyend option oneoption two selectedact accordingly8end option two….Exit is selectedprogram is doneend exitend check end while9OUTPUT SAMPLE: (UNDERLINED, ITALIC BOLD RED VALUES ARE USER ENTRIES)=== Grocery Inventory System ===1- List all items2- Search by SKU3- Checkout an item4- Stock an item5- Add new item or update item6- Delete item7- Search by name0- Exit program> 8Invalid value, 0 < value < 7: 1List Items under construction!Press <ENTER> to continue1- List all items2- Search by SKU3- Checkout an item4- Stock an item5- Add new item or update item6- Delete item7- Search by name0- Exit program> 2Search Items under construction!Press <ENTER> to continue1- List all items2- Search by SKU3- Checkout an item4- Stock an item5- Add new item or update item6- Delete item7- Search by name0- Exit program> 3Checkout Item under construction!Press <ENTER> to continue1- List all items2- Search by SKU3- Checkout an item4- Stock an item5- Add new item or update item6- Delete item7- Search by name0- Exit program> 410Stock Item under construction!Press <ENTER> to continue1- List all items2- Search by SKU3- Checkout an item4- Stock an item5- Add new item or update item6- Delete item7- Search by name0- Exit program> 5Add/Update Item under construction!Press <ENTER> to continue1- List all items2- Search by SKU3- Checkout an item4- Stock an item5- Add new item or update item6- Delete item7- Search by name0- Exit program> 6Delete Item under construction!Press <ENTER> to continue1- List all items2- Search by SKU3- Checkout an item4- Stock an item5- Add new item or update item6- Delete item7- Search by name0- Exit program> 7Search by name under construction!Press <ENTER> to continue1- List all items2- Search by SKU3- Checkout an item4- Stock an item5- Add new item or update item6- Delete item7- Search by name0- Exit program> 0Exit the program? (Y)es/(N)o : xOnly (Y)es or (N)o are acceptable: n1- List all items2- Search by SKU3- Checkout an item4- Stock an item5- Add new item or update item116- Delete item7- Search by name0- Exit program> 0 Exit the program? (Y)es/(N)o: yMILESTONE 1 SUBMISSIONIf not on matrix already, upload your 144_ms1.c and professors 144_ms1_tester.c to your matrix account. Compile your code as follows: > gcc -Wall -o ms1 144_ms1.c 144_ms1_tester.c <ENTER>This command will compile your code and name your executable ms1Execute ms1 and make sure everything works properly.Finally run the following script from your account: (replace profname.proflastname with your professors Seneca userid)~profname.proflastname/submit 144_ms1 <ENTER>and follow the instructions.NoteUse the same inputs (shown in red) as shown in the sample outputs described previously in this document.Please note that a successful submission does not guarantee full credit for this workshop.If the professor is not satisfied with your implementation, your professor may ask you to resubmit. Resubmissions will attract a penalty.
Programming
[Solved] Grocery Store Inventory System Final Project Milestone 1 V1.0
$25
File Name: Grocery_Store_Inventory_System_Final_Project_Milestone_1_V1.0.zip
File Size: 574.62 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.