// pfarrayd.h -- slighyly modified from the textbook example #ifndef PFARRAYD_H #define PFARRAYD_H //Objects of this class are partially filled arrays of doubles. class PFArrayD { public: PFArrayD(int capacityValue = 5); PFArrayD(const PFArrayD& pfaObject); ~PFArrayD( ); int getCapacity( ) const { return capacity; } int getNumberUsed( ) const { return used; } bool full( ) const { return (capacity == used); } void addElement(double element); void emptyArray( ){ used = 0; } double& operator[](int index); double operator[](int index) const; PFArrayD& operator =(const PFArrayD& rightSide); private: double *a; //for an array of doubles. int capacity; //for the size of the array. int used; //for the number of array positions currently in use. }; #endif //PFARRAYD_H