[solved]-Need Help Making C Skeleton Code Needs Finish Instructions Pictures Include Include Includ Q39080234
ineed help making this in c++the skeleton of the code is below just needs to be finish from theinstructions of the pictures:*******************/#include <iostream>#include <string>#include <fstream>using namespace std;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(); //de-allocates all memory allocate to INV by operator new. bool is_Empty(); //inline implementation bool is_full();//inline implementation int search(const string key);//returns location if item in INV; otherwise return -1 void add( ); //adds a order record to INV void remove(const string key); //removes all items in INV with a cell number that matches key. void double_size(); void process(); void print(); //prints all the elements in INV to the screenprivate: int count; int size; order_record *INV;};/************************************************************************************************************************************///Name: default constructor//Precondition: //Postcondition: //Decription: Reads the data file of purchase order information (cell number, item, quantity, price, and processing plant) into the dynamic array of order records, //INV. If the count become equal to the size the function double_size is called and the memory allocated to INV is doubled./************************************************************************************************************************************/order_class::order_class(){ cout << “The default constructor has been calledn”;}/***********************************************************************************************************************************///Name: is_Empty//Precondition: //Postcondition: //Decription: returns true if INV is empty/**********************************************************************************************************************************/bool order_class::is_Empty(){ return count == 0;}/**********************************************************************************************************************************///Name: is_full //Precondition: //Postcondition: //Decription: returns true if INV is full/*********************************************************************************************************************************/bool order_class::is_full(){ return count == size;}/**********************************************************************************************************************************///Name: search//Precondition: //Postcondition: //Decription: locates key in INV if it is there; otherwise -1 is returned/*********************************************************************************************************************************/int order_class::search(const string key){ return -1;}/*********************************************************************************************************************************///Name: add//Precondition: //Postcondition: //Decription: adds a call_record to INV; if INV is full, double_size is called to increase the size of INV. The user // is prompted to enter the cell number, item, quantity, price, and processing plant./********************************************************************************************************************************/void order_class::add( ){}/********************************************************************************************************************************///Name: remove//Precondition: //Postcondition: //Decription: removes all order records in INV with a cell number field that matches key, if it is there./*******************************************************************************************************************************/void order_class::remove(const string key){}/******************************************************************************************************************************///Name: double_size//Precondition: //Postcondition: //Decription: doubles the size (capacity) of INV/******************************************************************************************************************************/void order_class::double_size( ){ size *=2; order_record *temp = new order_record[size]; for(int i=0; i<count; i++) { temp[i] = INV[i]; } delete [ ] INV; INV = temp;}/******************************************************************************************************************************///Name: process//Precondition: //Postcondition: //Decription: calculate the tax rate, order tax, net cost, total order cost for every call record in INV./*****************************************************************************************************************************/void order_class::process(){}/****************************************************************************************************************************///Name: print//Precondition: //Postcondition: //Decription: prints every field of every call_record in INV formatted to the screen./***************************************************************************************************************************/void order_class::print(){ for(int i=0; i<count; i++) { // you add code here }}/****************************************************************************************************************************///Name: destructor//Precondition: //Postcondition: //Decription: de-allocates all memory allocated to INV. This will be the last function to be called (automatically by the compiler)//before the program is exited./***************************************************************************************************************************/order_class::~order_class(){ cout << “The destructor has been calledn”;}//Here is your driver to test the programint main(){ order_class myOrders;//declaring order_class object myOrders; the default constructor is called automically. cout << “**********************************************************************n”; //Test 1: cout << “Test 1: Testing default construcor, double_size, process, is_full and print ” << endl; myOrders.process( ); myOrders.print( ); cout << “End of Test 1” << endl; cout << “**********************************************************************n”; cout << “**********************************************************************n”; //Test 2: //void add(); cout << “Test 2: Testing add, double_size, process, is_full, and print ” << endl; myOrders.add( ); myOrders.print( ); cout << “End of Test 2” << endl; cout << “**********************************************************************n”; cout << “**********************************************************************n”; //Test 3: //void remove(string key); cout << “Test 3: Testing remove, is_Empty, search and print ” << endl; cout << “Removing 9546321555n”; myOrders.remove(“9546321555”); myOrders.print( ); cout << “Removing 787716590n”; myOrders.remove(“7877176590”); myOrders.print( ); cout << “Removing 3051234567n”; myOrders.remove(“3051234567”); myOrders.print( ); cout << “Removing 9546321555 —AGAIN— SHOULD GET MESSAGEn”; myOrders.remove(“9546321555”); myOrders.print( ); cout << “End of Test 3” << endl; cout << “**********************************************************************n”; cout << “**********************************************************************n”; //Test 4: //destructor will be invoked when object myOrders goes out of scope cout << “Test 4: Destructor called” << endl; cout << “End of Test 4” << endl; cout << “**********************************************************************n”; cout << “**********************************************************************n”; return 0;}




Objectives: 1. Develop and use an ADT’s to define a class to manage a dynamic array: 2. Use a default constructor to initialize the state of your class: 3. Use a destructor te de-allocate memory allocated using the new operator This assignment is an extension of Programming A m at Modules Programming As You will implement can called “order “. The class will manage a dynamic array of purchase de recorde Called the program for this ” perde .cpp”. I have provided a skeleton driver of sporden.cpp” to help you implement this program Your input data will be in the file “purchase_data “. The descriptions of the functions you imple 1. the default constructor to initialize the state of your class. The default constructor will read the data from the file “purchase data.txt” into the dynamic array INV. INV becomes full, the function should call the function double size to double the size (capacity of INV. Remember count and INV are private members of your class and do not need to be pared to a member function of your class 2. Is Empty is a Boolcan public member function of the class. It has to Lonal parameter b u t is a member of the state of the class private member and does not need to be passed to it because the state of the class is known to all member functions of the class. If count then true is turned otherwise false is returned 3. is full is a Boolean public member function of the class. It has no formal parameters because count and size are members of the state of the class (private members and they do not need to be passed to it because the state of the class is known to all member functions of the class. If count size then true is reum: otherwise false. The size is the capacity which is the total number of cells allocated to INV 4. search is an integer public member function that has only one formal parameter, the key key is the cell phone number for the record you are Searching for. The array of records, INV and count remembers of the state of the class and do not need to be used to a member function of the claws The function will return the location of key in INV ir it is there; otherwel tumad S. add is a void public member function that inserts information fra onder record into INV. Duplicates cell numbers are ok, add will perompt the user for the cell number, item number, quantity, price and processing plant. You may call process record -prece INV when you add a new record add has no formal parameters 6, remove is avoid publis h er function that deletes will records with the cell member the matches the value stored in key. If duplicate records with the Samoellamber they must all be deleted remove has only one formal parameter, the key. 7. double size is a veid public member function that doubles the capacity of INV, double size has no formal parameters because size, count and INV are all members of the state of the class, ceder class. First size is multipled by two second memory is allocated using the statement order record temp new call record size): thind the records in INV are copied into temp with the statement templ-INVIO sing a floop. Forth, the old memory for INV is de allocated using “delete INV Finally, INV is set to point to the new LINE 13 Dashboard Calendar To Do Notifications Inbox is the total number of cells allocated to INV 4. search is an integer public member function that has only one formal parameter, the key key is the cell phone number for the recond you are scarching for. The array of records, INV r emembers of the state of the class and do not need to be passed to a member function of the class. The function will return the location of key in INV if it is the otherwise -lis returned add is avoid public member function that inserts information for a onder record into INV. Duplicates collaborare ckadd will promptthew the cell number, item mumber, quantity, price and processing plan. You may cal process record to re-process INV when you add a new record, addha formal parameters 6. remove is a voi public member function that delete all records with the cell number the matches the value stored in key. Ir duplicate records is the same cell number they must all be deleted remove has only one formal parameter, the key 7. double size is a voi publice member function that doubles the capacity of INV, double size has no formal parameters because size,count and INV are all members of the state of the class oder class. First, size is multiplied by two second, memory is allocated using the statement order record lamp new call record in thind the records in INV me copied into temp with the statement templi-INV i nga for loop Forth the old memory for INV is de-allocated using “delete [ JINY”. Finally, INV is to point to the memory pointed to by temp using “INV-temp & process has two input parameters: INV and count. The functice will calculate the order tax rate tax rate netcost of an ceder net cast the tax on an onder (order tax) and the total cost of an onder al cl ing the quantity of an itemprice and processing plant identificate user (processing plant for a purchase order rocoed onder rood Reciw are using an array of records. Please consider the following: a) The tax rate an order tax rate) is simply based on the processing plast identification number (Processing plant which is where the order was processed processing plantsothontas -6° C processing plant 110 then tax rate processing plan 200 then tax re p ocessing pleso then tax rate prog ant 500 then the 119) b) The tax on an onder onder tax) is calculated by the following for ondertus (quantity) (price) C ate) 100 Hint INVorder_tax=(INV quantity NV price Dashboard Calendar To Do Notifications Inbox new call records ) third the reconds in INV are copied into smp with the statement templ-INVIO using a f loop. Forth, the old memory for INV is de-allocated using “delete INV. Finally, INV is set to the memy pointed to by temp using “INV-temp process as we put parameter: INV a c t. The function will calculate the order tax rate tax rate), cotofan er nel cost the taxe an ander oder tax) and the tal cost of an ander lossing the quantity.co of an item price and processing plant identification number (processing plants for a purchase order record onder record Remember we are using an array of records. Please consider the following a) The tax rate on an onder (tax rate is simply based on the processing plant identification number processing plant which is where the one was processed processing pass then take s processing plant 110 then tax rate7 111 processing plant 200 then tax rate – 201 procenglam500 then tax rate 99 processing plant 500 then re-119) b) The tax on an order order tax) is calculated by the following form onder tax (quantity price tax rate/100 Hint INVO order tax-(INV quantity NVO price is calculated c) The net cost of ander netcost, which does not include by the following: net cost quantity) x price d) The total cost of an order (rounded to the nearest w i th) is calculated by the following formula Total cost cost order tax All tax and cost calcuation should be rounded to the neared hundredths 9. print is avaid public member function that has no formal parameters because countdINV me members of the state of the class. The function will prin every field of every onder condi INV to the screen 10 the destructor te de aloxate all memory allocated INV. This function has no formal parameters because INV is amber of the state of the class, it will be called matically by the compiler Use the driver amazon_porders9.cpp” to help you implement this program Output Format for the Function “print”. Consider the sample puble whe and implemente The output should be in the f inger ell e r om. . tamate, onder las neces. Banderol. Use the information in the file produce the output Your push con , but the u s . plant che d o e in the proper 11 6 9546321555 9546321555 5612971340 3051234567 452 XLY 742-623 924-YUT 903-11T 2 20.82 300 10:34 23.00 47 50.12 03 7 $ 1 200 7 8 15.58 3454 25722 182523042.00 392452 12:53 154.00 296.58 1845 2355.64 2549 Dashboard Calendar To Do Notifications Inbox 11:36 1 silLTE < COP3014_Assignment9… a Objectives: L Develop and use an ADT’in define acestea a dynamic 2. Use a default contractor to initial the water of your class 3. Use a destructor to delete m ary cated using the wa r TAMP AwY w a tches called “The will go podpowde d .com Verigata wale in the purchased . The des te 1 the default cost to in t he wake of your class. The conductor will read the data from the file purchased the dynamic ray INV. I INV becomes full,the function should all the function double site double the capacity of INV. Rome count and INV a private members of your class and do not need to be posed to a member function of your class 2. is Emptyisa Boolean public member function of the class. It has forma parter because out is a member of the state of the class (private member and does not need to be passed because these the class is a t all member functions of the class. If the true is returned otherwise false is returned 3. is full is a Boolean public member function of the class. It has s ome parameters becau s e of the state of the class prate members and they do not need to be passed to the use the state of the class is known to all member function of the class o – then we is return otherwise. These is the capacity which is the lumber of cells allocated to INV search is par public member function that has only one formal parameter, the key key is the cell phone where the y we Searching for. The way of records, INV and court remembers of these the class md do not need to be passed to a member face of the class. The function will return the location of key INV is here there disa veid public menber function that inserts information for ander record in INV. Dapate celle will prom the were the cell number, em number, quantity, price and processing plant. You may call process record process INV when you add a new record addha formal parameters 6. rere is a voi public we foto deles all with the cell number the matches the value word in key dupce s same cell number they mustall be deleted remove holy o 7. double wire is avaid public member function that dobles the capacity of INV. double has no formal parametersbe d INV are albers of the state of the class oder First s e d by twood, memy is allocated in the statement ander red new call records thind the records in INV are copied into temp with the statement templi)-INVising a forkop. Forth, the old memory INV is de-allocated using “delete INV Fally INV is to point to the memory pointed to by top using “INV mp el Dashboard Calendar To Do Notifications We were unable to transcribe this image11:36 1 LTE COP 3014_Assignment9… a y by the taxes and da andera price INV ander -INV N V The cond u ce The last dended to the newest by the following form Tal cost order tax Alt wanded o puncte INV we m en of these of the class. The functie will print every Sidid of every moodi INVS 10 the director de allocate all my lewe INV. This function has neformal parameters because INV member of the state of the class it will be called m ically by the epiler Use the driver mas poder po to buy this program Output Format for the Function “print: 5610 VUT 1034 23.00 13 Dashboard Calendar To Do Notifications inbox Show transcribed image text Objectives: 1. Develop and use an ADT’s to define a class to manage a dynamic array: 2. Use a default constructor to initialize the state of your class: 3. Use a destructor te de-allocate memory allocated using the new operator This assignment is an extension of Programming A m at Modules Programming As You will implement can called “order “. The class will manage a dynamic array of purchase de recorde Called the program for this ” perde .cpp”. I have provided a skeleton driver of sporden.cpp” to help you implement this program Your input data will be in the file “purchase_data “. The descriptions of the functions you imple 1. the default constructor to initialize the state of your class. The default constructor will read the data from the file “purchase data.txt” into the dynamic array INV. INV becomes full, the function should call the function double size to double the size (capacity of INV. Remember count and INV are private members of your class and do not need to be pared to a member function of your class 2. Is Empty is a Boolcan public member function of the class. It has to Lonal parameter b u t is a member of the state of the class private member and does not need to be passed to it because the state of the class is known to all member functions of the class. If count then true is turned otherwise false is returned 3. is full is a Boolean public member function of the class. It has no formal parameters because count and size are members of the state of the class (private members and they do not need to be passed to it because the state of the class is known to all member functions of the class. If count size then true is reum: otherwise false. The size is the capacity which is the total number of cells allocated to INV 4. search is an integer public member function that has only one formal parameter, the key key is the cell phone number for the record you are Searching for. The array of records, INV and count remembers of the state of the class and do not need to be used to a member function of the claws The function will return the location of key in INV ir it is there; otherwel tumad S. add is a void public member function that inserts information fra onder record into INV. Duplicates cell numbers are ok, add will perompt the user for the cell number, item number, quantity, price and processing plant. You may call process record -prece INV when you add a new record add has no formal parameters 6, remove is avoid publis h er function that deletes will records with the cell member the matches the value stored in key. If duplicate records with the Samoellamber they must all be deleted remove has only one formal parameter, the key. 7. double size is a veid public member function that doubles the capacity of INV, double size has no formal parameters because size, count and INV are all members of the state of the class, ceder class. First size is multipled by two second memory is allocated using the statement order record temp new call record size): thind the records in INV are copied into temp with the statement templ-INVIO sing a floop. Forth, the old memory for INV is de allocated using “delete INV Finally, INV is set to point to the new LINE 13 Dashboard Calendar To Do Notifications Inbox
is the total number of cells allocated to INV 4. search is an integer public member function that has only one formal parameter, the key key is the cell phone number for the recond you are scarching for. The array of records, INV r emembers of the state of the class and do not need to be passed to a member function of the class. The function will return the location of key in INV if it is the otherwise -lis returned add is avoid public member function that inserts information for a onder record into INV. Duplicates collaborare ckadd will promptthew the cell number, item mumber, quantity, price and processing plan. You may cal process record to re-process INV when you add a new record, addha formal parameters 6. remove is a voi public member function that delete all records with the cell number the matches the value stored in key. Ir duplicate records is the same cell number they must all be deleted remove has only one formal parameter, the key 7. double size is a voi publice member function that doubles the capacity of INV, double size has no formal parameters because size,count and INV are all members of the state of the class oder class. First, size is multiplied by two second, memory is allocated using the statement order record lamp new call record in thind the records in INV me copied into temp with the statement templi-INV i nga for loop Forth the old memory for INV is de-allocated using “delete [ JINY”. Finally, INV is to point to the memory pointed to by temp using “INV-temp & process has two input parameters: INV and count. The functice will calculate the order tax rate tax rate netcost of an ceder net cast the tax on an onder (order tax) and the total cost of an onder al cl ing the quantity of an itemprice and processing plant identificate user (processing plant for a purchase order rocoed onder rood Reciw are using an array of records. Please consider the following: a) The tax rate an order tax rate) is simply based on the processing plast identification number (Processing plant which is where the order was processed processing plantsothontas -6° C processing plant 110 then tax rate processing plan 200 then tax re p ocessing pleso then tax rate prog ant 500 then the 119) b) The tax on an onder onder tax) is calculated by the following for ondertus (quantity) (price) C ate) 100 Hint INVorder_tax=(INV quantity NV price Dashboard Calendar To Do Notifications Inbox
new call records ) third the reconds in INV are copied into smp with the statement templ-INVIO using a f loop. Forth, the old memory for INV is de-allocated using “delete INV. Finally, INV is set to the memy pointed to by temp using “INV-temp process as we put parameter: INV a c t. The function will calculate the order tax rate tax rate), cotofan er nel cost the taxe an ander oder tax) and the tal cost of an ander lossing the quantity.co of an item price and processing plant identification number (processing plants for a purchase order record onder record Remember we are using an array of records. Please consider the following a) The tax rate on an onder (tax rate is simply based on the processing plant identification number processing plant which is where the one was processed processing pass then take s processing plant 110 then tax rate7 111 processing plant 200 then tax rate – 201 procenglam500 then tax rate 99 processing plant 500 then re-119) b) The tax on an order order tax) is calculated by the following form onder tax (quantity price tax rate/100 Hint INVO order tax-(INV quantity NVO price is calculated c) The net cost of ander netcost, which does not include by the following: net cost quantity) x price d) The total cost of an order (rounded to the nearest w i th) is calculated by the following formula Total cost cost order tax All tax and cost calcuation should be rounded to the neared hundredths 9. print is avaid public member function that has no formal parameters because countdINV me members of the state of the class. The function will prin every field of every onder condi INV to the screen 10 the destructor te de aloxate all memory allocated INV. This function has no formal parameters because INV is amber of the state of the class, it will be called matically by the compiler Use the driver amazon_porders9.cpp” to help you implement this program Output Format for the Function “print”. Consider the sample puble whe and implemente The output should be in the f inger ell e r om. . tamate, onder las neces. Banderol. Use the information in the file produce the output Your push con , but the u s . plant che d o e in the proper 11 6 9546321555 9546321555 5612971340 3051234567 452 XLY 742-623 924-YUT 903-11T 2 20.82 300 10:34 23.00 47 50.12 03 7 $ 1 200 7 8 15.58 3454 25722 182523042.00 392452 12:53 154.00 296.58 1845 2355.64 2549 Dashboard Calendar To Do Notifications Inbox
11:36 1 silLTE
Expert Answer
Answer to i need help making this in c++the skeleton of the code is below just needs to be finish from the instructions of the pic… . . .
OR

