C++/arrays of integers
Expert: Zlatko - 4/16/2011
QuestionIn this problem , given an abstract class to support arrays of Integers. All i need to extends two classes of arrays for ordered and unordered arrays of integers.
class iArray{
private:
int * Data;
unsigned int maxsize;
unsigned int used;
public:
int& operator[](unsigned int);
};
class iOArray: public iArray {}
class iUArray: public iArray{}
I am free to design iArray class, and the two derived classes. The input file contains
some random 100 integers to be inserted in the two example objects of the iOArray and
iUArray , next the input file contains 20 integers to be search from the two arrays. You
need to produce the two times for insertion of data and search of data.
AnswerYou've made a good start, but you have not told me what part you are having trouble with or what you don't understand. In short, you've given me your assignment, but you have not asked a question. I document a similar exercise here:
http://sites.google.com/site/zlatkoscodingtopics/array-class
Maybe that will help you get started.
Best regards
Zlatko