Create a Point class and a Line class.
Create a method in the Line class that will find (and display) the distance between the two points entered into the Line class.
A complete program is not required.
(To compute the distance, get the difference between the x's and then the y's then use Pythagorean's theorem to find the length)
#include
using namespace std;
class pointpublic pointint x pointint y point
class Line{public:point startpoint endprivate:int dist x;int dist y;} ;
class linepoint startpoint end
brainstorming:(a,b)(distance(point a point b)inst dist yinst dist xdist x = (c, a)dist y = (d-b)a^2+ b^2=c^2(distx)^2(disty)^2
int main(){
return 0;}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here