Develop an inventory management system for an electronics store. The inventory system should
have the following functionalities .BuildInventory: reada text file containing electronics products
information and store them in an array of pointers .Shownventory display all inventory items
.ShowDefectInventory: display inventory items that are defective Terminate: to save cument
inventory to a text file This lab assignment illustrates the following concepts: -Text file readings
and writings .Arrays of pointers and dynamic memory allocations with new and delete
Inheritance .C++ type casting: static cast Class Design You need at least three classes class
Inventory System: (minimum implementation specified below). This class stores Inyentoryltem
objects (which are in fact Inventory item base class pointers to derived Product objects and
member functions to manipulate those Product objects as shown below. .Private data members
Store Name Store ID ltem List (array of pointers to Inventory Item objects, max of 512) ltem
Count (tracking how many items are currently stored in the array) .Constructors (initialize all
pointers in the array to NULL in addition to what\'s described below .Default constructor: set
data members to 0 (for integers), 0.0 (for float/double), or NULL (for pointers) as appropriate.
Also invoke this function to initialize a seed for the random generator srand (time (NULL), (to
be used later by Product class to genearte random values for Product ID. See Code Helper
section at the end of the lab specs.) .Non-default constructor: taking a string for store name, an
integer for store ID. Call srand as shown above Destructor: de-allocate dynamic memory in the
amay off pointers (up to Item Count elements) .Public member functions: BuildInventory: read a
text file containing Product records (one Product per line), dynamically allocate Product objects
and store the objects in the array ItemList (an array of Inventoryltem pointers). It should also
update Item Count as needed Shownventory: display all Products in the inventory. Output must
be properly formatted and aligned (usingfield with and floating data with 2 digits after decimal
point). Note that if you invoke the Display function using the pointers from the array only Invent
tem (base objec) information will be displayed. Extra work is needed to properly display
Products (derived objects) information ntory: display only defective Products Terminate: iterate
thru the array of pointers to write Product objects in the array to a text file in the same format as
they were read in. You may use a different file name for wniting .mutator cessors for store name,
store id, and item count
Solution
/*
import com.incors.plaf.*;
import com.incors.plaf.kunststoff.*;
import com.incors.plaf.kunststoff.themes.*;
*/
public class MainForm extends JFrame implements WindowListener{
/************************ Variable declaration start **********************/
//The form container variable
JPanel Panel1;
JDeskto.
Develop an inventory management system for an electronics store. The .pdf
1. Develop an inventory management system for an electronics store. The inventory system should
have the following functionalities .BuildInventory: reada text file containing electronics products
information and store them in an array of pointers .Shownventory display all inventory items
.ShowDefectInventory: display inventory items that are defective Terminate: to save cument
inventory to a text file This lab assignment illustrates the following concepts: -Text file readings
and writings .Arrays of pointers and dynamic memory allocations with new and delete
Inheritance .C++ type casting: static cast Class Design You need at least three classes class
Inventory System: (minimum implementation specified below). This class stores Inyentoryltem
objects (which are in fact Inventory item base class pointers to derived Product objects and
member functions to manipulate those Product objects as shown below. .Private data members
Store Name Store ID ltem List (array of pointers to Inventory Item objects, max of 512) ltem
Count (tracking how many items are currently stored in the array) .Constructors (initialize all
pointers in the array to NULL in addition to what's described below .Default constructor: set
data members to 0 (for integers), 0.0 (for float/double), or NULL (for pointers) as appropriate.
Also invoke this function to initialize a seed for the random generator srand (time (NULL), (to
be used later by Product class to genearte random values for Product ID. See Code Helper
section at the end of the lab specs.) .Non-default constructor: taking a string for store name, an
integer for store ID. Call srand as shown above Destructor: de-allocate dynamic memory in the
amay off pointers (up to Item Count elements) .Public member functions: BuildInventory: read a
text file containing Product records (one Product per line), dynamically allocate Product objects
and store the objects in the array ItemList (an array of Inventoryltem pointers). It should also
update Item Count as needed Shownventory: display all Products in the inventory. Output must
be properly formatted and aligned (usingfield with and floating data with 2 digits after decimal
point). Note that if you invoke the Display function using the pointers from the array only Invent
tem (base objec) information will be displayed. Extra work is needed to properly display
Products (derived objects) information ntory: display only defective Products Terminate: iterate
thru the array of pointers to write Product objects in the array to a text file in the same format as
they were read in. You may use a different file name for wniting .mutator cessors for store name,
store id, and item count
Solution
/*
import com.incors.plaf.*;
import com.incors.plaf.kunststoff.*;