Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: Write a program that performs a variety of vector math operations. These operations include adding vectors, subtracting vectors, and finding the magnitude of a

Objective:
Write a program that performs a variety of vector math operations. These operations include adding vectors, subtracting vectors, and finding the magnitude of a vector.
Requirements:
Functionality. (80pts)
No Syntax, Major Run-Time, or Major Logic Errors. (80pts*)
*Code that cannot be compiled due to syntax errors is nonfunctional code and will receive no points for this entire section.
*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.
Use only Arrays to represent the Vectors and assume a decimal type. (80pts*)
*Other built in types like ArrayLists, LinkedLists, etc will receive no points for this entire section.
Clear and Easy-To-Use Interface. (10pts)
Users should easily understand what the program does and how to use it.
Users should be prompted for input and should be able to enter data easily.
Users should be presented with output after major functions, operations, or calculations.
Users should be able to perform any number of the required functions. In addition, users should be able to choose when to terminate the program.
All the above must apply for full credit.
Adding Two Vectors. (20pts)
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.
Subtracting Two Vectors. (20pts)
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.
Find the Magnitude of a Vector. (20pts)
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.
The program should clearly output the resulting magnitude to the user.
All the above must apply for full credit.
Run-Time and Logic Error Checking. (10pts)
Each major function must check for common run-time and logic errors.
Coding Style. (10pts)
Code functionality organized within multiple methods other than the main method. (5pts)
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)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Xxiv Special Issue On Database And Expert Systems Applications Lncs 9510

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Hendrik Decker ,Lenka Lhotska ,Sebastian Link

1st Edition

366249213X, 978-3662492130

More Books

Students also viewed these Databases questions

Question

Differentiate the function. R(a) = (3a + 1) 2

Answered: 1 week ago

Question

5. It is possible to make dashboards in Excel. True False

Answered: 1 week ago

Question

Explain all drawbacks of application procedure.

Answered: 1 week ago

Question

b. What groups were most represented? Why do you think this is so?

Answered: 1 week ago