//Point CLASS DECLARATION //PREPROCESSOR DIRECTIVES #include //CLASS DECLARATION class Point { public: Point(int x = 0, int y =0); //CONSTRUCTOR void plot(); //PLOT POINT(X,Y) private: int x; //X-COORDINATE int y; //Y-COORDINATE }; //END Point //MAIN FUNCTION int main() { Point p(40,12); p.plot(); //RETURN return 0; }//END main() //CONSTRUCTOR IMPLEMENTATION Point :: Point(int x, int y) { this -> x = x; this -> y = y; } //END Point() //PLOT IMPLEMENTATION void Point :: plot() { for(int i = 0; i < y; ++i) //MOVE CURSOR DOWN y LINES cout << endl; for ( i = 0; i < x; ++i) //MOVE CURSOR OVER x LINES cout << ' '; cout << "C++" << endl; //DISPLAY "C++" } //END plot()