Help with overloaded operations

I have a problem with the following question

Design a class that represents a vector of integer values. It must be possible to compare two vectors to one another. It must also be possible to add two vectors to one another, where the result of the addition should be a new vector that is the right operand appended to (added to the back of) the left operand. Furthermore, it should be possible to perform an assignment between two vectors, and construct one vector from another. It must also be possible to print a vector. Finally, correct memory management must be provided, so that no memory faults or memory leaks occur. You will de ne and implementing a class (called IntegerVector) that represents a vector of integer values.

The questions below will guide you, step by step, through the design and implementation of the IntegerVector class.

We will begin by writing the IntegerVector class de nition. Each IntegerVector object must store the following data:

 An array of values, called values, where each value is an integer. It must be possible to store any arbitrary number of integer values. Therefore, the array must be dynamically allocated on the heap.

 The number of integer values in the array, called valueCount, which is stored as an integer value.

Additionally, the IntegerVector class needs:

 A constructor that receives two parameters: an array of integer values, and an integer representing the size of the array.

 A copy constructor.

 A destructor.

Finally, the following operators must be de ned for the IntegerVector class:

 An assignment operator, that allows one IntegerVector object to be assigned to another.  An equality comparison operator, that compares two IntegerVector objects to one another, returning true if the two objects represent the same sequence of integer values, and false oth- erwise.

 An addition operator, that adds two IntegerVector objects to one another, producing a new IntegerVector object. The resultant object should contain data that represents the right operand concatenated to the left operand.

 A stream insertion operator that prints an IntegerVector object.

Write down the IntegerVector class de nition. Pay special attention to the access speci ers of all the members, and ensure that all the data is accessible only within the IntegerVector class. Also provide the de nitions for any functions or operators that need to be implemented outside of the IntegerVector class. Do not provide any member function implementations, preprocessor directives, or namespace-related statements.

Please can anymore help me!!!????!!!!
Last edited on
Topic archived. No new replies allowed.