Question: using c++ Problem 1: Write a program to track the products sold in a company. Your program must contain three vectors, 1- Vector of strings

using c++
Problem 1: Write a program to track the products sold in a company. Your program must contain three vectors, 1- Vector of strings to store the product names. 2- Vector of doubles to store the price per item for each product. 3- Vector of integers to store the number of sold items from each product. The product information (name, price and number of sold products) are found on the same index in all vectors. You program must define the following functions: - Input: Your program at first prompts the user to enter the needed data. Note that the user will enter the product name, followed by the item price, followed by the number of sold items, you have to store the data in the suitable vector. To end input the user will enter character ' z ' to stop. - Replace: takes two strings, the first one is the old product name, and the second one is the new product name. You must replace the old product with the new one, also the function must prompt the user for the price and the number of sold items for the new product and replace the old information in the other vectors. - Remove: takes the product name as input and removes it from the vector of products, note that you must remove the price and number of items that correspond to the removed product also. - Max: returns the product name with the max gross sales, i.e. total sales for the sold items. Inside the main start by calling input function and then call all other functions in any proper way you want. Note that all functions are working on the same three vectors (that store the names, price, and number of items)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
