Question: C+ Program Please use seekg to read values in separately in a line and store in a 2d array (it is a requirement and not

 C+ Program Please use seekg to read values in separately in
a line and store in a 2d array (it is a requirement

C+ Program Please use seekg to read values in separately in a line and store in a 2d array (it is a requirement and not an exception, please DO NOT ANSWER IF YOU CAN ONLY USE GETLINE ProductData.csv example Item Number,Name Cost,Oty 12735,Product 001,02.09,121 69703 Product 002,03.64,069 15964 Product 003,10.75,08 24286,Product 004,13.51,197 67671 Product 005,08.42,030 97041 Product 006,14.67,045 60290,Product 007,19.72.030 24600,Product 008,03.02,197 44023 Product 009,11.26,139 46045 Product 010,18.32,018 49814,Product 011,18.95,140 36883,Product 012,05.07,072 DO NOT READ IN THE produef IN NAME) Objective: Using what you have leamed on array search and file IO you will create a system that allows a user to shop for items, add them to a shopping cart, and process their order Details: At the start of your program the "ProductData csv" file. You must use seekg and seekp to read in the file contents. Do not read in the whole line and separate the data on commas, you will be counted off if you do this. * read in the product information from . The product data must be stored in a multidimensional array (Note: There is exactly 145 items in the product list. You can assume I will not add or remove any items to the product list. So, for this assignment the array size (4x 145) will be fixed to the total number of products). If you store in single dimensional arrays you will be counted off, Hint: Do not store redundant data * After storing the data in your arrays, you must ask the user what products they would like to buy. You will take as input item numbers (Note: The user should be allowed to select up to as many as the 145 items). Implement a search function to search your multidimensional array to find the product information You can use any search function you would like. If the item is not found in the array then you need to output and crror message. When the item is found you should output the item name and cost * asale 145 items).7:38 PM Implement a search function to search your multidimensional array to find the product information You can use any search function you would like. If the item to output and error message. When the item is found you should output the item name and cost. is not found in the array then you need Ask the user how many of the item the would like. Check their input against the available qty on hand. Inform the customer if there is not enough available and have them reenter a qty. If there is none available then tell the user we are currently out of stock of the item. After entering a qty that is allowed you must add the item to their shopping cart. . You must store all the items that the user inputs and keep collecting input from the user until they indicate they are done. . If the user enters a 0 when asked about entering a product then you know they are done. . Collect the following user information: Name Street Address City. State Zip code You will output to the screen and to a file name "invoice.txf" a formatted invoice that looks like the following. Customer Name: John Doe Customer Address: 123 Sesame Strect Fakeville, TX 12345 Item Number Cost Item Name Oty Unit Total Item Number I 1.99 Product Name 1.99 Item Number X ,00 Product Name X 10 10,00 Total: $11.99 C+ Program Please use seekg to read values in separately in a line and store in a 2d array (it is a requirement and not an exception, please DO NOT ANSWER IF YOU CAN ONLY USE GETLINE ProductData.csv example Item Number,Name Cost,Oty 12735,Product 001,02.09,121 69703 Product 002,03.64,069 15964 Product 003,10.75,08 24286,Product 004,13.51,197 67671 Product 005,08.42,030 97041 Product 006,14.67,045 60290,Product 007,19.72.030 24600,Product 008,03.02,197 44023 Product 009,11.26,139 46045 Product 010,18.32,018 49814,Product 011,18.95,140 36883,Product 012,05.07,072 DO NOT READ IN THE produef IN NAME) Objective: Using what you have leamed on array search and file IO you will create a system that allows a user to shop for items, add them to a shopping cart, and process their order Details: At the start of your program the "ProductData csv" file. You must use seekg and seekp to read in the file contents. Do not read in the whole line and separate the data on commas, you will be counted off if you do this. * read in the product information from . The product data must be stored in a multidimensional array (Note: There is exactly 145 items in the product list. You can assume I will not add or remove any items to the product list. So, for this assignment the array size (4x 145) will be fixed to the total number of products). If you store in single dimensional arrays you will be counted off, Hint: Do not store redundant data * After storing the data in your arrays, you must ask the user what products they would like to buy. You will take as input item numbers (Note: The user should be allowed to select up to as many as the 145 items). Implement a search function to search your multidimensional array to find the product information You can use any search function you would like. If the item is not found in the array then you need to output and crror message. When the item is found you should output the item name and cost * asale 145 items).7:38 PM Implement a search function to search your multidimensional array to find the product information You can use any search function you would like. If the item to output and error message. When the item is found you should output the item name and cost. is not found in the array then you need Ask the user how many of the item the would like. Check their input against the available qty on hand. Inform the customer if there is not enough available and have them reenter a qty. If there is none available then tell the user we are currently out of stock of the item. After entering a qty that is allowed you must add the item to their shopping cart. . You must store all the items that the user inputs and keep collecting input from the user until they indicate they are done. . If the user enters a 0 when asked about entering a product then you know they are done. . Collect the following user information: Name Street Address City. State Zip code You will output to the screen and to a file name "invoice.txf" a formatted invoice that looks like the following. Customer Name: John Doe Customer Address: 123 Sesame Strect Fakeville, TX 12345 Item Number Cost Item Name Oty Unit Total Item Number I 1.99 Product Name 1.99 Item Number X ,00 Product Name X 10 10,00 Total: $11.99

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!