Question: please i need a C++ code solution for this question D. Design a class for Vector (2)(4044) Description Point and vector are two important concepts



please i need a C++ code solution for this question
D. Design a class for Vector (2)(4044) Description Point and vector are two important concepts in math. Design a class for point and a class for vector in math to implement vector operations. The point and class are in 3-Dimension with three components. To make thing simple, they are integers. You are provided with main function. You are required to complete the program, and test it, and run it. You dont have to worry about input and output format. Instructions: A vector is an object that has both a magnitude and a direction. Geometrically, we can picture a vector as a directed line segment, whose length is the magnitude of the vector and with an arrow indicating the direction. The direction of the vector is from its tail to its head. A vector can be represented in the form of v=xi+yk+zkv=xi+yj+zk So a vector has three components (x,y,z) where x,y and z are real numbers(here to make thing simple they are integers). Now you are required to design a class for vector which has the following features: You are required to design a class for point and vector to complete the following main function. So that it can run and print out the expected results. \{ wgVector v1,v2,v3,v4,v5; int d; cin>>v1;//input a vector cin>>v2; /linput a vector cin>>d: llinput an integer v3=v1+v2;// wo vector addition v4=v2d;//a vector times an integer get another vector v5=v1v2; //two vector subtraction cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
