Menu

[solved]-Code Done C Need 1 Function Done Written Constructor Reads Data File Purchase Order Infor Q39090361

The code should be done in C++
I only need 1 function done, which is written below.

The constructor reads the data file of purchaseorder information (cell number, item, quantity, price, andprocessing plant) into the dynamic array of order records,
//INV. If the count become equal to the size the functiondouble_size is called and the memory allocated to INV isdoubled.

Data file is called”purchase_data.txt”

class order_record
{
public:
   string cell_number;
   string item_number;
   double quantity;
   double price;
   int processing_plant;
   double tax_rate;
   double order_tax;
   double net_cost;
   double total_cost;
};

class order_class
{
public:
   order_class();
   ~order_class();
   bool is_Empty();
   bool is_full();
   int search(const string key);
   void add();
   void remove(const string key);
   void double_size();
   void process();
   void print();
private:
   int count;
   int size;
   order_record *INV;
};

order_class::order_class()
{

    // Enter the code here
   cout << “The default constructor has beencalledn”;

}

Expert Answer


Answer to The code should be done in C++ I only need 1 function done, which is written below. The constructor reads the data file … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *