package lab5; public class MyVector { private double[] vector; MyVector(double vector[]) { // Make a deep copy } /** * Name: magnitude * PreCondition: v is not null * PostCondition: Returns the calcuated magnitude of vector v * @params v */ public double magnitude() { // the magnitude of a vector v is calculatd as // sqrt(v[0] * v[0] + v[1] * v[1] + ...) } /** * Name: getArray * PreCondition: none * PostCondition: Returns copy of the array */ public double[] getArray() { // Return deep copy } }