input data should be checked for correct category range 1 7 sold by we
Start by allowing the entry of the current stock in the store, which it will save and update during the day. Switch to sales mode where it will act like a cash register and allow customers to purchase things. It will update the inventory as items are sold and will produce an itemized receipt for the customer. At the end of the day, print a summary of the sales, the inventory remaining and the top sellers in each category. Products for sale are identified by name, and are placed in a category and the category is entered by its number: 1. produce 2. bakery 3. meat 4. dairy 5. baking 7. miscellaneous Each item has a price and an indication of whether it is sold per unit or by weight which is entered as 0 if sold by the number purchased or 1 if sold by weight. It also indicates how much we have of this item either in units or by weight rounded down to the nearest kilogram. When we sell items, they are sold by weight in fractional Kg or by integral unit counts. When the final amounts in inventory are calculated, they are rounded down to the nearest Kg for items sold by weight. If a customer tries to purchase more of something than we have in stock, we sell only the amount we have in stock. Most groceries are tax free except items in the house wares and miscellaneous categories which are taxed at 13%. The list of items being purchased is terminated by an item with the ID of 0. A sale with no items added to it marks the end of sales which should be followed by the summary of the day's sales. Input data should be checked for correct category range (1-7), sold by weight range(0-1). As the stock is entered, each item is assigned a numeric identifier from 1upwards in the order the items are entered. For stock entry, you can assume that each item is only entered once. When purchasing, the customer will identify the product to purchase by the identifier assigned to it when it was entered in the stock and listed in the initial stock report in the ID column. These product ID number should be checked to ensure that they are valid. main.c which is the main for the program. You must use this main.c for your program without changes. This means that you will need to implement the data structures it uses and the functions it uses in the files stock.h and stock.c. You SHOULD create additional functions, other than the ones called from main, to create a highly modular, well-designed program. Your code will be tested against this main.c and your code must work and produce the expected output. A sample execution of the program to which your program's output should look very similar. Sample data which can be cut and pasted into the program for final testing.This is the data which generated the sample output. In a group of 1, 2 or 3 people create the missing code and have 1 group member submit the files stock.h and stock.c as a zip file. (Groups attempting the bonus question must also include main.c if they modified it) Submission from groups of more than 3 people will not be accepted and all members of these groups will receive 0 for this portion of the final assessment. Place a comment at the top of both stock.h and stock.c listing the names of
*The amount will be in form of wallet points that you can redeem to pay upto 10% of the price for any assignment. **Use of solution provided by us for unfair practice like cheating will result in action from our end which may include permanent termination of the defaulter’s account.Disclaimer:The website contains certain images which are not owned by the company/ website. Such images are used for indicative purposes only and is a third-party content. All credits go to its rightful owner including its copyright owner. It is also clarified that the use of any photograph on the website including the use of any photograph of any educational institute/ university is not intended to suggest any association, relationship, or sponsorship whatsoever between the company and the said educational institute/ university. Any such use is for representative purposes only and all intellectual property rights belong to the respective owners.