You are here:

C++/arrays of integers

Advertisement


Question
In 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.

Answer
You'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

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Zlatko

Expertise

No longer taking questions.

Experience

No longer taking questions.

Education/Credentials
No longer taking questions.

©2016 About.com. All rights reserved.