IDNLearn.com makes it easy to find answers and share knowledge with others. Ask your questions and receive comprehensive, trustworthy responses from our dedicated team of experts.
In this way, writing the code in C++ we can say that it will be possible to make the coordinates on the planes.
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
class Point{
private:
float x;
float y;
public:
Point(){
x = y = 0;
}
Point(float x, float y){
this->x = x;
this->y = y;
}
float getX(){
return x;
}
float getY(){
return y;
}
float getDistance(){
return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2));
}
string toString(){
return "("(x1, y)","(x2, y2)")";
}
};
See more about C code at brainly.com/question/17544466
#SPJ1