19 lines
339 B
C++
19 lines
339 B
C++
|
|
#ifndef EXAMPLE06_POINT_H
|
|
#define EXAMPLE06_POINT_H
|
|
|
|
class Point {
|
|
private:
|
|
int x, y;
|
|
public:
|
|
Point(); // default constructor
|
|
Point (int x, int y); // constructor
|
|
|
|
int getX() const;
|
|
int getY() const;
|
|
void print() const;
|
|
double distance(const Point& p) const;
|
|
};
|
|
|
|
#endif //EXAMPLE06_POINT_H
|