1. Engineering
  2. Computer Science
  3. i need the pseudo codeand the output of the program...

Question: i need the pseudo codeand the output of the program...

Question details
I need the ““((pseudo code))””,and the output of the program .

Progr amming Assignment ADT Two-dimensional Vector ABSTRACT DATA TYPE (ADT) Two-dimensional vector There are many applications in mathematics, engineer ing, physics, finance, etc. in which the underlying model is a twodimensional veetor .in Whi The general form of an two-dimensional vector is: where: and b are each a real number Example: v = ( 2.45, -2.78 ) The following are some of the operations that are frequently requiedn applications that involve two-dimensional vectors: vectors:vi a, b scalar: vector addition: 2. vector subtraction: 3 Scalar multiple: 4 scalar product v2b d) k a kb) Also called: dot product or inner product. 5 magnitude (length) of a vector 2 2 1/2 Note the result obtained from the scalar product and magnitude operations is a scalar valde (not another vector IMPLEMENTATION OF THE ADT In order to implement this ADT in a progr amming language it is necessary to first select an appropriate data structure. The ADT vector can be r epr esented as: struct VECTOR double double This declaration makes it possible to declare variables of type VECTOR in the application programs
DIRECTIONS use the following for ALL test suns of this pr ogr am: Vector 1 vec1: namel name2 scalar 10 Vector 2 veq2: 4. Continuing to use a STEPWISE MODULAR APPROACH you should next write the code declaration and definition) for the function that implements the vector subtraction operation and then add the calls:. calc difference( veci, vec2, differ) print vector (outfile, Difference, differ) at the, appropr iate points in the main function 5 Write the code (declaration and definition) for the function that i mplements the scalar multiple operation and tben add the calls: scalarmult( veci, 10, s mult) print vector(outfile, Scalar multiples mult) 6. Write the code (declaration and definition) for the function that implements the scalar product operation (use a return statement) and then add th ne of code: outfile <<-scalar productー << scalar_prod(veci, vec2) endl endi 7 Write the code (declaration and definition) for the function that implements the magnitude operation (use a return statement) and then add the line of code: outfile << Magnitude of Vector 1 = magnitude(vec 1) endl < endl; SUBMIT THE FOLLOWING in the order specified) a source code listing 2 the program output 3 the handwr itten wor k
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution