Question: ReWrite above program using a class with array ReWrite above program using a class using pointers... #include using namespace std; class LISTofIntVarsi private: int vi,

 ReWrite above program using a class with array ReWrite above programusing a class using pointers... #include using namespace std; class LISTofIntVarsi private:int vi, v2, v3, v4, v5, v6, v7, v, v9, vid, vil;

ReWrite above program using a class with array

ReWrite above program using a class using pointers...

#include using namespace std; class LISTofIntVarsi private: int vi, v2, v3, v4, v5, v6, v7, v, v9, vid, vil; int count public: // constructor - Initialize ( set first value) for the variables. LISTOfIntVars() { vi = v2 = v3 = v4 = v5 = v6 = v7 = v8 = v9 = vid = vil = -1; count = 0; // check if space left to use bool isrull() if (count -11) { return true; else return false; } 1 1 called individually and also by the add method bool addi(int invar) if (!isrull()) count++; // add 1 count if (v1 == -1) { vi = invari ) else if (v2 == -1) { v2 = invar; return true; } else if (3-1) v3 = invar, return true; else if (4 == -1) { v4 = invar; return true; } else if (v5 == -1) { v5 = invar; return true; } else if (v6 == -1) { v6 = invar; return true; } else if (v7 = -1) v7 = invar; return true; else if (-1) vinVar return true; } else if (v9 == -1) { v9 = invar; return true; } else if (v10 == -1) ( v10 = invar; return true; } else if (vil - -1) ( vil invar, return true; } else return false; return false; // check it any data in storage bool isEmpty() if (count == 0) { return true; else return false; } } // called individually and also by the add method // check if item in list bool found(int inval) { // called individually and also by the delete method if (!i simpty()) if (vi u inval) (return true; } else if (v2 == inval) { return true;) else if (v3 inval) { return true;) else if (inval) return true; else if (v5 inval) { return true;) else if (V6 = inval) return true;) else if (v7 = inval) return true;) else if (ve == inval) { return true;) else if (v9 == inval) { return true;) else if (v10 == inval) { return true; } else if (v11 == inval) { return true; } else return false; 1 return false; 1 bool deletel (int inval ) { if (v1 == inval) { vi = -1; return true; } else if (v2 == inval) { v2 = -1; return true; } else if (v3 == inval) { v3 = -1; return true; } else if (v4 == inval) { v4 = -1; return true; } else if (v5 == inval) { v5 = -1; return true; } else if (v6 == inval) { v6 = -1; return true; } else if (v7 == inval) { v7 = -1; return true; } else if (v8 == inval) ( v = -1; return true; } else if (v9 == inval) { v9 = -1; return true; } else if (v10 == inval) ( v10 = -1; return true;) else if (v1l == inval) { vil = -1; return true; else { return false;} return false; 1 void listAll() { if (vi != -1) cout // others in min int main() cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!