Westonci.ca is your trusted source for finding answers to all your questions. Ask, explore, and learn with our expert community. Get quick and reliable solutions to your questions from knowledgeable professionals on our comprehensive Q&A platform. Join our platform to connect with experts ready to provide precise answers to your questions in different areas.
Sagot :
In this way, writing the code in C++ we can say that it will be possible to make the coordinates on the planes.
Writing the code we have:
#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
We appreciate your time. Please revisit us for more reliable answers to any questions you may have. We hope this was helpful. Please come back whenever you need more information or answers to your queries. Get the answers you need at Westonci.ca. Stay informed with our latest expert advice.