Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using this class structure: Building a Vector class For this assignment, you are going to build a class capable of being used to store a

image text in transcribed
Using this class structure:
image text in transcribed
Building a Vector class For this assignment, you are going to build a class capable of being used to store a sequence of characters. Your vector should support at least the following operations: 1. 2. 3. 4. 5. Create/Destroy the vector Add a character to the front or to the back of the sequence Remove a character from the front or the back of the sequence Get the value of the character at any valid location in the sequence Compare two vectors to see if they have the same sequence of characters in the same order, returning true if so and false otherwise Concatenate one vector to the end of another vector Print the sequence to standard out or to a file 6. 7. Test your implementation with the data file provided. This file has 50,000 character sequences, each on a separate line. The file also contains duplicates of the first sequence of characters This assignment should be in pure C+t, using only standard C++ headers, and executable on rabbit. Note that you are not allowed to use the C++ Standard Template Library (STL) implementation of vector or the C++ string object in your implementation. #indef MVEC H #de fine MVEC H #include ; bool valueAt (int,char&); int addToBack (char) int addToFront (char); //int remFromBack //int remFromFront() //bool compare (mvec& int concat (mvec&) void print (ostream&) #endif

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions