Question: Obj ective: Write a program that performs a variety of vector math operations. These operations include adding vectors, subtracting vectors, and nding the magnitude of

 Obj ective: Write a program that performs a variety of vectormath operations. These operations include adding vectors, subtracting vectors, and nding the

Obj ective: Write a program that performs a variety of vector math operations. These operations include adding vectors, subtracting vectors, and nding the magnitude of a vector. Requirements: 0 Functionality. (80pts) 0 No Syntax, Major Run-Time, or Major Logic Errors. (80pts*) I *Code that cannot be compiled due to syntax errors is nonlnctional code and will receive no points for this entire section. I *Code that cannot be executed or tested due to major run-time or logic errors is nonfunctional code and will receive no points for this entire section. 0 Use only Arrays to represent the Vectors and assume a decimal type. (80pts*) I *Other built in types like ArrayLists, LinkedLists, etc will receive no points for this entire section 0 Clear and Easy-To-Use Interface. (lOpts) I Users should easily understand what the program does and how to use it. I Users should be prompted for input and should be able to enter data easily. I Users should be presented with output aer major functions, operations, or calculations. I Users should be able to perform any number of the required Jnctions. In addition, users should be able to choose when to terminate the program. I All the above must apply for full credit. 0 Adding Two Vectors. (20pts) I Users should be able to enter the size and values for both Vectors. The size of a vector must be greater or equal to 1 and the two vectors being added must have the exact same size. Otherwise, the user must be prompted there is an error and the program must continue and not terminate. - The program should clearly output the resulting Vector to the user. - All the above must apply for full credit. 0 Subtracting Two Vectors. (20pts) I Users should be able to enter the size and values for both Vectors. The size of a vector must be greater or equal to 1 and the two vectors being added must have the exact same size. Otherwise, the user must be prompted there is an error and the program must continue and not terminate. - The program should clearly output the resulting Vector to the user. I All the above must apply for full credit. 0 Find the Magnitude of a Vector. (20pts) I Users should be able to enter the size and values of the Vector. The size of a vector must be greater or equal to 1. Otherwise, the user must be prompted there is an error and the program must continue and not terminate. I The program should clearly output the resulting magnitude to the user. I All the above must apply for full credit. 0 Run-Time and Logic Error Checking. (lOpts) I Each major lnction must check for common run-time and logic errors. I Coding Style. (lOpts) . Code functionality organized within multiple methods other than the main method. (5pts) o Readable Code (5pts) Meaningful identifiers for data and methods. Proper indentation that clearly identifies statements within the body of a class, a method, a branching statement, a loop statement, etc. . All the above must apply for full credit. . Comments. (10pts) . Your name in the file. (5pts) At least 5 meaningful comments in addition to your name. These must describe the function of the code it is near. (5pts) Additional Notes: . Vector Addition. Adding together two vectors first requires each vector have the same number of components (the same size). The result of vector addition creates a new vector where its components are the result of each component-wise addition. o Example: ( 5) + ( 3) = (10 ) . Vector Subtraction. . Subtracting two vectors first requires each vector have the same number of components (the same size). The result of vector subtraction creates a new vector where its components are the result of each component-wise subtraction. o Example: . Vector Magnitude. Finding the magnitude of a vector requires finding the square root of the sum of its components squared. o Example: = V22 + 32 + 42 +52 +62 = 90~ 9.48 OUT A WN

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 Programming Questions!