Project #92047 - HW c++

Project Five

Due: 11/12/15 by 11:55PM


  1. Become familiar with the use of Pointers in C++

  2. Develop familiarity of using functions to process Pointers


Develop the object intArray that creates and manages an array of integers by the use of  Pointers. The intArray object will implement a number of useful manipulation of arrays including insert, delete, add, equal, and etc.  These functions will limit the use of an array to proper handling. For example these functions will eliminate the possibility of overstepping the boundaries of an array.  

Specific Requirements:

Your object should satisfy the following criteria:

  1. Should be named intArray
  2. Should contain a default constructor that will set the data pointer to null and size to 0.
  3. Should contain the alternate constructor intArray(int arraySize, int initValue) that will accept initial size and value for the array. If the initial value is missing, a default value of 0.
  4. Should contain the alternate constructor intArray(int anArray[], int arraySize) that will accept an array and create an object equal to the array. 
  5. The parameter that holds the size of the array should be private.
  6. Should contain a size() method that will return the size of the array. 
  7. Should contain a set(index, value) method that will set the data[index] = value.
  8. Should contain a get(index) method that will return data[index].
  9. Both set and get methods should exit the program if index is outside of the array boundaries. 
  10. Should contain an overloaded assignment operator (=) similar to your previous copy(intArray anIntArray) method that will copy one anIntArray into another. 
  11. Should contain an overloaded equality operator (==) similar to your equal(intArray anIntArray) method that will return true if two arrays are equal in size and content. 
  12. Should contain an overloaded addition and subtraction operator (+, -) similar to your previous add(intArray anIntArray) and subtract(intArray anIntArray) methods that will add or subtract one intArry into/from another.
  13. The copyadd and subtract methods above should exit the program if size incompatibility is identified.
  14. Should contain an insert(index, value) method that will insert the value at the index place of an array. The value should be inserted and not replaced. 
  15. Should contain a remove(index) method that will delete the index item of the array. Your method should then return the remove value. 
  16. Both insert and remove should exit the program if the index is invalid, and should expand/shrink the array appropriately. 
  17. Your program should have no memory leaks!

Subject Computer
Due By (Pacific Time) 11/12/2015 02:00 pm
Report DMCA

Chat Now!

out of 1971 reviews

Chat Now!

out of 766 reviews

Chat Now!

out of 1164 reviews

Chat Now!

out of 721 reviews

Chat Now!

out of 1600 reviews

Chat Now!

out of 770 reviews

Chat Now!

out of 766 reviews

Chat Now!

out of 680 reviews
All Rights Reserved. Copyright by - Copyright Policy