home *** CD-ROM | disk | FTP | other *** search
-
- #if __DLL__
- #define IMPORT
- #else
- #define IMPORT _Import
- #endif
-
- /****************************/
- /* Defining the Base Class */
- /****************************/
-
- class area
- {
- private:
- double dim1, dim2;
- public:
- static int IMPORT objectCount;
- void setarea(double d1 , double d2);
- void getdim(double &d1, double &d2);
- virtual double getarea();
- area::area(void);
- };
-
-
- /*******************************/
- /* Defining a Derived class */
- /*******************************/
-
-
- class rectangle : public area
- {
- public:
- static int IMPORT objectCount ;
- double getarea();
- rectangle::rectangle(void);
- };
-
- /*******************************/
- /* Defining a Derived class */
- /*******************************/
-
-
- class triangle : public area
- {
- public:
- static int IMPORT objectCount;
- double getarea();
- triangle::triangle(void);
- };
-
-
-