I need some assistance with this lab, any help will be appreciated. I will attach a .txt file, with my programming so far.
Thanks, I appreciate all those who take time out of their day to help.
Description
Modify the Inventory program from Lab 5 to add file I/O to the Inventory class. Perform the following.
Inventory Class
Add class level attributes and methods to maintain the list of loans. The array of inventory items should be kept in the Inventory class using a class level array (static).
Add the class level data member to store the number of inventory items.
The sortInventory and searchInventory functions will be part of the Inventory class instead of separate functions. They will be class level functions.
A new class level member function called getNumberOfItems will be added to return the number of inventory items in the file (array).
A new class level member function called initialize that will open the Inventory file, read the inventory records and add inventory objects to the array.
A new class level member function called terminate that will write the records back to the file and close the file.
A new class level member function call addInventory will be added to add an inventory item to the array.
A new class level member function called deleteInventory will be added to delete an inventory item from the array.
A new class level member function called updateInventory will be added to update an inventory item .
A new class level member function called getInventory will be added to return the nth inventory item.
main.cpp – Source File
The options in main will remain the same. It will need to be modified to use the new class level functions.
Inventory.txt – Data File
The file is a Sequential Access file with fixed length records containing the inventory ID, type, description, quantity, and unit cost for each inventory item.