Answered step by step
Verified Expert Solution
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. pts
No Syntax, Major RunTime, or Major Logic Errors. pts
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 runtime 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. pts
Other built in types like ArrayLists, LinkedLists, etc will receive no points for this entire section.
Clear and EasyToUse Interface. pts
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. pts
Users should be able to enter the size and values for both Vectors. The size of a vector must be greater or equal to 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. pts
Users should be able to enter the size and values for both Vectors. The size of a vector must be greater or equal to 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. pts
Users should be able to enter the size and values of the Vector. The size of a vector must be greater or equal to 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.
RunTime and Logic Error Checking. pts
Each major function must check for common runtime and logic errors.
Coding Style. pts
Code functionality organized within multiple methods other than the main method. pts
Readable Code pts
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. pts
Your name in the file. pts
At least meaningful comments in addition to your name. These must describe the function of the code it is near. pts
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started