Question: C++, , No pointers, using namespcase std, read all directions please. Question3 Let's consider an input file that contains: product id (string), product name (string),

 C++, , No pointers, using namespcase std, read all directions please.

C++, , No pointers, using namespcase std, read all directions please.

Question3 Let's consider an input file that contains: product id (string), product name (string), product amount (int), and product unit price (float). We assume that the file contains between 1 and 100 elements Write a program that: . Declare a structure named 'product' composed of product id (string), product name (string), product amount (int), and product unit price (float) . Asks the user for the name of the input file . Reads the product details and populates an array of products named storage . Design a menu where the user has the following options: Buy, Stock, Check and Quit Buy - the user will select which product to buy (one at a time, in any quantity) . all products should be displayed to the user before the choice is made. After the product is bought the total amount of products should be updated accordingly Stock - the user will insert a new product with all data the struct has Check - This option should display and print a file containing a recepit with the purchases of the day (this should show products ids, names, quantity bought, unitary price, subtotal for the product and total spent in the purchase) . Quit - terminates the progranm . The main idea is to explore the benefits of using structs. So, every task should bie done after the whole array is filled up . The files must contain at least 5 records Input file B42 Banana K07 Kiwi 822 CT2 Chicken CKO Cake 300 0.15 250 1.00 103 0.11 187 1.05 800 2.42 Strawberry For the screenshots: one showing a product being bought, inserted in the program and the result of options check (for this last 3 products should be purchased) Question3 Let's consider an input file that contains: product id (string), product name (string), product amount (int), and product unit price (float). We assume that the file contains between 1 and 100 elements Write a program that: . Declare a structure named 'product' composed of product id (string), product name (string), product amount (int), and product unit price (float) . Asks the user for the name of the input file . Reads the product details and populates an array of products named storage . Design a menu where the user has the following options: Buy, Stock, Check and Quit Buy - the user will select which product to buy (one at a time, in any quantity) . all products should be displayed to the user before the choice is made. After the product is bought the total amount of products should be updated accordingly Stock - the user will insert a new product with all data the struct has Check - This option should display and print a file containing a recepit with the purchases of the day (this should show products ids, names, quantity bought, unitary price, subtotal for the product and total spent in the purchase) . Quit - terminates the progranm . The main idea is to explore the benefits of using structs. So, every task should bie done after the whole array is filled up . The files must contain at least 5 records Input file B42 Banana K07 Kiwi 822 CT2 Chicken CKO Cake 300 0.15 250 1.00 103 0.11 187 1.05 800 2.42 Strawberry For the screenshots: one showing a product being bought, inserted in the program and the result of options check (for this last 3 products should be purchased)

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!