C++ Programming 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...




C++ Programming


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 point

public point

int x point

int y point


class Line

{

public:

point start

point end



private:

int dist x;

int dist y;


} ;


class line

point start

point end





brainstorming:

(a,b)

(distance(point a point b)

inst dist y

inst dist x

dist x = (c, a)

dist y = (d-b)

a^2+ b^2=c^2

(distx)^2(disty)^2





int main()

{


return 0;

}




May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here