Question: just use include and cmath . A 2D vector (u, v) has its base at the origin in the cartesian coordinate system, i.e. the x-y

just use include and cmath .
 just use include and cmath . A 2D vector (u, v)
has its base at the origin in the cartesian coordinate system, i.e.
the x-y axes, and its tip (or arrow) at x-u and y
= v. Thus, a 2D vector can be represented simply as an
(r,y) point in the cartesian coordinate system. Write a program that reads
in a pair of 2D vectors and a scalar value and then
applies the following vector operations: addition, subtraction, scalar multiplication, and perpendicularity. The
main routine of the program is already provided in vector2D_template.cpp (which you

A 2D vector (u, v) has its base at the origin in the cartesian coordinate system, i.e. the x-y axes, and its tip (or arrow) at x-u and y = v. Thus, a 2D vector can be represented simply as an (r,y) point in the cartesian coordinate system. Write a program that reads in a pair of 2D vectors and a scalar value and then applies the following vector operations: addition, subtraction, scalar multiplication, and perpendicularity. The main routine of the program is already provided in vector2D_template.cpp (which you copied into vector2D.cpp). Your task is to add eight functions read_vector), vector_lengthO, writo_vector), vector_add), vector_subtract ), scalar_mult), normalizeO, and perpendicular() so that the program produces the desired results 1. Write your code incrementally. I HIGHLY SUGGEST that you write each function at a time as described in the following steps. After you have written a solution to one

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!