Question: I need help with this part please: 5 . Correct the definitions of the math operations. ( a ) The following functions are closely related.

I need help with this part please:
5. Correct the definitions of the math operations. (a) The following functions are closely related.
double dotWith(MathVector) should calculate the dot product. ..(x1,x2,x3,...,xN)(y1,y2,y3,...,yN)=x1y1+x2y2+x3y3+...+xNyN
You do not need to worry about a user attempting to find the dot product of vectors
of different dimensions.
double getMagnitude() should calculate the magnitude of the vector using Pythagoras...
(x1,x2,x3,...,xN)=qx21+x2+x23+...+x2N
I have attached everything I have so far for reference.
class MathVector {
private final int dim;
private final double[] values;
public MathVector(int N){
dim=N;
}
values = new double N;
public MathVector(double... arr){
dim= arr. length;
values = new double [dim];
for (int [i]=arr[i]dim,=v*dim;=[i]=virx=r**y=r**x,yrx=r**y=r**z=r**cos[idx-1]=val=0x?=0i=0;ii=0;i
 I need help with this part please: 5. Correct the definitions

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!