Question: c++ Question 1 12+2+2+2+2=0 marks Declare a struct named GeneralStore which contains properties as product id, product name, quantity, price and discount. Create a C++

 c++ Question 1 12+2+2+2+2=0 marks Declare a struct named "GeneralStore" which

c++

Question 1 12+2+2+2+2=0 marks Declare a struct named "GeneralStore" which contains properties as product id, product name, quantity, price and discount. Create a C++ program to handle the following file operations in a file store.txt. a) insert(): Insert 10 products record into the file in each line. b) display(): Read and display only the names starting from letter f otherwise display "product is not found. c) discount Products(): show products from the file which are on 50% discount. d) sumOfPrice(): Sum of all prices of all products in that file. e) Write the definition of a function main that tests each of these functions in the form of menu such as: I: insert D: display S: sumOfPrice P: discount Products(): Note: Every part should be done in the form of function. Each function must have appropriate parameters/return type to access the required functionality, . Don't use Global Variable. GOOD LUCK J

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!