1. Engineering
  2. Computer Science
  3. vector is an ordered set of elements that is also...

Question: vector is an ordered set of elements that is also...

Question details

Vector is an ordered set of elements that is also called dynamic array. It is similar to the list data structure that you learned in the data structure course, except that the data is saved in order (not sorted). You need to implement the Vector ADT using C++ class (prototype is provided by the instructor). You need to download the Vector.h file from the ecourses, and implement all functions defined in the class using C++ with a file named Vector.cpp. You will also need to create a Main.cpp to create object(s) of the Vector class, and test if these functions are working correctly The following is the list of functions defined in Vector ADT append(element) - Add a new element to the end of the collection. .clearO- Make the collection empty contains(element)- Does the collection contain the given element? . element.At(index) -Access the element at the given index isEmptyO Is the collection empty? isFull0 Is the collection full? removeAt index) Remove the element at the given index getSizeO- How many elements are in the collection? operatoril- overload operatorll to access an individual element in the vector insertAt(index, element) Insert a new element at the given index remove(element) - Remove the given element from the collection.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution