// seven.h CS210 F'03 // 11/10/03 - Ray S. Babcock #ifndef SEVEN_H_ #define SEVEN_H_ class IntIn { public: IntIn(int=10); ~IntIn(); void PutA(int, int); int GetA(int); int GetSize(); private: int * a; int size; }; IntIn::IntIn(int max) { a = new int[max]; size = max; } IntIn::~IntIn() { delete [] a; } void IntIn::PutA(int value, int location) { if(location < 0 or location >= size) a[0]=value; else a[location]=value; } int IntIn::GetA(int location) { if(location < 0 or location >= size) return a[0]; else return a[location]; } int IntIn::GetSize() { return size; } #endif