#include <iostream>
using namespace std;
class Point
{
public:
Point(double xx=0,double yy=0)
{
x=xx;
y=yy;
}
void setpoint(double ,double);
double getx(){return x;}
double gety(){return y;}
void Point_show();
private:
double x,y;
};
void Point::setpoint(double xx,double yy)
{
x=xx;
y=yy;
}
void Point::Point_show()
{
cout<<"x="<<x<<" y="<<y<<endl;
}
int main()
{
Point p(4,5);
p.Point_show();
p.setpoint(3.5,2.5);
p.Point_show();
return 0;
}
using namespace std;
class Point
{
public:
Point(double xx=0,double yy=0)
{
x=xx;
y=yy;
}
void setpoint(double ,double);
double getx(){return x;}
double gety(){return y;}
void Point_show();
private:
double x,y;
};
void Point::setpoint(double xx,double yy)
{
x=xx;
y=yy;
}
void Point::Point_show()
{
cout<<"x="<<x<<" y="<<y<<endl;
}
int main()
{
Point p(4,5);
p.Point_show();
p.setpoint(3.5,2.5);
p.Point_show();
return 0;
}