previous | start | next

## Interface (Syntax 6.1 : Class Definition)

Syntax 6.1 : Class Definitions
    class Class_name
    {
    public:   constructor declarations
       member function declarations
    private:   data fields
    };
Example: |
    class Point
    {
    public:
       Point (double xval, double yval);
       void move(double dx, double dy);
       double get_x() const;
       double get_y() const;
    private:
       double x;
       double y;
    };
Purpose: | Define the interface and data fields of a class.

previous | start | next