/* Copyright(C) 2008 All Rights Reserved. Salih Yurttas, Computer Science, TAMU. Permission to use, copy, modify, and distribute this software and its documentation for EDUCATIONAL purposes and without fee is hereby granted provided that this copyright notice appears in all copies. date : January 1, 2008. author : Salih Yurttas. A.h */ #ifndef A_H #define A_H #include using namespace std; class A { public: A(const int s=0, // common size for the a1 and a2 const int a=0, // initial values for a1 const int b=0); // initial values for a2 A(const A&); ~A(); A& operator=(const A&); int get_size() const; int* get_a1() const; void set_a1(const int); // every position assigned identical value int* get_a2() const; void set_a2(const int); // every position assigned identical value void set_a(const int, // new size const int, // a1 is assigned with identical int const int); // a2 is assigned with identical int void set_a(const int, // new size const int*, // a1 is assigned with new int* const int*); // a2 is assigned with new int* A& operator+=(const A&); A& operator-=(const A&); friend A operator+(const A&, const A&); friend A operator-(const A&, const A&); friend bool operator==(const A&, const A&); friend bool operator!=(const A&, const A&); friend ostream& operator<<(ostream&, const A&); private: int size; // common size for a1 and a2 int* a1; int* a2; }; #endif