question archive Create class named Vector with four (integer) data members (x and y coordinates of two 1) points)
Subject:Computer SciencePrice: Bought3
Create class named Vector with four (integer) data members (x and y coordinates of two
1) points).
2) Provide default and parameterized constructors.
3) Provide a set method which accepts four integers and sets the values of the data members.
· Provide get() methods to return each of the data members.
· Provide functions to calculate the magnitude and direction of the vector.
· In main(), declare an object vl of class vector, call the functions to compute the magnitude and
· direction of the vector and display these values in the main.
· Declare another object v2 of vector and set its data members.
· Do the following in the main. (DO NOT create functions)
o Compute the dot product between vl and v2. (vl.v2 = VI. x v2. x + VI. y v2. y)
o Compute the angle between the two vectors. (Hint: vl.v2 = lv111v21cosB)
o Compute the magnitude of the cross product of the two vectors. (Hint: lv111v21