1. We are going to finish the Mvector class, and begin todevelop and implement the template class Ml

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadlines.


Order a Similar Paper Order a Different Paper

1. We are going to finish the Mvector class, and begin todevelop and implement the template class Mlist developed in class.FOLLOW THE STEPS BELOW. -First add iterators to the class Mvector. Write the functionsand test them with a main program. (THE ITERFACE IS BELOW) templateclass Mvector{ public: typedef T* iterator; Mvector(); Mvector(unsigned int n); void pushback(T x); void popback(); void clear(); void insert(int i, T x); void erase(int i); T operator[] (unsigned int i); void operator– (int); int size(); iterator begin() {return v;} iterator end() {return v+vsize;} void insert(iterator ix, T x); void erase(iterator ix); private: int vsize; int vcap; T *v; void reserve(unsigned int n);}; -Next create the interface for the class along with functionstubs. (THE ITERFACE IS BELOW) #includeusing namespace std;template class Lnode{ public : T data; Lnode *lptr; Lnode *rptr;};template class Mlist{ public : Mlist(); void add(T x); void del(T x); T getfront(); private : Lnode *first; Lnode *last; int lsize;}; -Add stubs for each member function and test the compilation(c++ -c). -Write the functions and test the compilation. -Write a main program that tests the class functions. (Use thepseudo-random number generator to create a list and add and removeelements from the list. . . .

"Is this question part of your assignment? We can help"

ORDER NOW
Writerbay.net

Do you need help with this or a different assignment? We offer CONFIDENTIAL, ORIGINAL (Turnitin/LopesWrite/SafeAssign checks), and PRIVATE services using latest (within 5 years) peer-reviewed articles. Kindly click on ORDER NOW to receive an A++ paper from our masters- and PhD writers.

Get a 15% discount on your order using the following coupon code SAVE15


Order a Similar Paper Order a Different Paper