Question
COMP 3053: Analysis of Algorithms (Spring 2021)Homework #1 (100 Points)Due Date: 02/08/2021Vector is an ordered set of elements that is also called dynamic array. It
COMP 3053: Analysis of Algorithms (Spring 2021)Homework #1 (100 Points)Due Date: 02/08/2021Vector 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 a C++ class (the header Bile is provided by the instructor). You need to download the Vector.h Bile from the ecourses, and implement all functions deBined in the class using C++ with a Bile 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 deBined in Vector ADT.append(element) - Add a new element to the end of the collection.clear() - Make the collection empty.contains(element) - Does the collection contain the given element?elementAt(index) - Access the element at the given index.isEmpty() - Is the collection empty?isFull() Is the collection full?removeAt(index) - Remove the element at the given index.getSize() - How many elements are in the collection?operator[] overload operator[] to access an individual element in the vectorinsertAt(index, element) - Insert a new element at the given index.remove(element) - Remove the given element from the collection.Submission policy: You need to submit your completed program source code to ecourses by at the end of the class time. You need to upload all of your source code: Main.cpp, Vector.cpp, and Vector.h. You need to follow the C++ programming practice to name these Biles. Do NOT change any of their names or upload other Biles to ecourses.
/--------------------------------------------------------------------//// Homework Vector.h//// Class declaration for the array implementation of the Vector ADT////--------------------------------------------------------------------#ifndef VECTOR_H#define VECTOR_Husing namespace std;template
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started