Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Please Use C++ for the following code and PLEASE DO NOT USE GETLINE , only use SEEKG to do this.I have already posted this once

image text in transcribedPlease Use C++ for the following code and PLEASE DO NOT USE GETLINE , only use SEEKG to do this.I have already posted this once so please answer only if you can demonstrate it with seekg and proper comments.Thank You for your help

Objective: Using what you have learned on array search and file I/O 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 read in the product information from 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 .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 (4 x 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 dat:a 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 error message. When the item is found you should output the item name and cost. 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 *

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions