Question: in Python http://www.cse.msu.edu/~cse231/Online/Labs/Lab14/Lab14.pdf Assignment overview We are going to work with overloaded operators and making our own class. We are going to make a 2D

in Python

http://www.cse.msu.edu/~cse231/Online/Labs/Lab14/Lab14.pdf

in Python http://www.cse.msu.edu/~cse231/Online/Labs/Lab14/Lab14.pdf Assignment overview We are going to work with overloadedoperators and making our own class. We are going to make a

Assignment overview We are going to work with overloaded operators and making our own class. We are going to make a 2D vector class. Some Background So if you don't remember, here is a little background on two-dimensional vectors. A vector is basically an arrow that has a magnitude (a length) and a direction (an angle with respect to typically the x axis It usually is represented as an x,y pair, where the origin of the vector is a 0,0 and the head of the vector is at the listed pair. x,y 0.0 A vector V*2 V W V-W Here are some of the operations you can perform on a vector. vector addition. If V1 is (x,y) and V2 is (a,b), the V+W is (xtra, y+b, a vector vector multiplication by a scalar. if vi is (x,y), the V n is (x n,y n), a vector vector subtraction V-W is the same as V+(W -1), a vector

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!