Help with class array

I dont even know where to start with this function...the class and main are defined, have to get the user to input an array and then have the function double and reverse the input array...any ideas would be appreciated, i am really bad at OOP :(


const int MAX_SIZE = 30;
const double SENTINEL = -999;

class Array
{
public:
Array() {}
Array (const Array&);
double& operator [] (int i);
double getEle (int i) const;
int getSize() const;

private:
double data[MAX_SIZE];
int size;

friend istream& operator >> (istream&, Array&);
friend ostream& operator << (ostream&, const Array&);
};




int _tmain(int argc, _TCHAR* argv[])
{
Array a;
int i;
cout << "Enter up to " << MAX_SIZE << " numbers followed by " << SENTINEL << endl;
cin >> a;
cout << "Original list: " << a << endl;
Array aDouble(a);

for (i=0; i < aDoubled.getSize(); ++i)
aDoubled[i] *= 2;
cout << "Doubled list: " << aDoubled << endl;
cout << "Reversed original list: ";

for (i = a.getSize() - 1; i >= 0; -i)
cout << setw(6) << a.getEle(i);
cout << endl;

system("PAUSE");
return 0;
}
Topic archived. No new replies allowed.