Question: In C + + Create a class Vector ( oriented segment of a straight line ) , describe it with the coordinates of two points

In C++ Create a class Vector (oriented segment of a straight line), describe it with the coordinates of two points stored in an array of length 6(x1, y1, z1, x2, y2, z2).
Overload operators:
=
"+"
"-"
*(vector multiplication)
>,<,>=,<=,==,!=(must be compared by length)
>>(must enter vector parameters)
<<(must output length of vector)
In the main program, demonstrate the work of all operators.
In order to get 10 arrays with vector coordinates, you have to create them dynamically!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!