Create an inventoryitem class that contains fields for a


Complete the following tasks:

a. Create an InventoryItem class that contains fields for a product number, quantity in stock, and price each. Include a default constructor that initializes all fields to 0. Include any other functions that you need to process records in the programs described in the following steps.

b. Write a program that creates an empty file of 100 InventoryItem objects that later can be used to store records for random access. Save the file as InventorySystemCreate.cpp.

c. Write a program that allows the user to enter data for as many InventoryItems as he or she wants. All InventoryItem product numbers should be between 1 and 99. If the user attempts to enter a product number greater than 99, force the user to reenter the number. Store each record at a disk location for which the value equals the product number times the size of an InventoryItem object. Save the file as InventorySystemDataEntry.cpp.

d. Write a program that allows a user to enter an InventoryItem product number and display the quantity and price as stored in the file created in part c. Allow the user to enter and get output for as many items as he or she wants. If a requested item does not exist, issue an appropriate message. Save the file as InventorySystemRequestItem.cpp.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Create an inventoryitem class that contains fields for a
Reference No:- TGS02192544

Expected delivery within 24 Hours