Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi I need help with the c++ programs . Can anyone help me please. I really need

ID: 3620875 • Letter: H

Question

Hi
I need help with the c++ programs . Can anyone help me please. I really need this to be done or else i won't be graduate.

Question:-
This assignment takes you in a slightly new direction by using files for the access and storage of data. The program you create will be part of a data analysis project being conducted by the National Organization for Animal Speed Categorization and will be a key part of a sequence of data collection, analysis and display. This program will perform part of the data analysis and is required to accept data in a specified format from a file and to be able to generate data in a specific format for later use by other programs.

The analysis to be performed is the calculation of the magnitude and direction of data representing two points on a graph better known as a Vector. Data will be provided in a data file using the format of a sequence of four floating point values, each two values representing the X and Y coordinate of a point. The start and end point of each Vector is represented by an X and Y pair of numeric values read in from the file. Data will be organized in groups of four numeric values, each value separated by whitespace characters, and representing the start and end point of the respective Vector.

The formula for computing the magnitude of each Vector will be based on common algebra using:

______________________________

Magnitude = v (| X2 – X1|2 + |Y1 – Y2|2)



Angle = Arctangent((Y1 – Y2) / (X2 – X1))



The output of the program will be displayed on the screen and also written to a file. To better understand the results the data should be displayed in 4 columns, the first two columns should be the first and second set of values representing the start and end point of the Vector, the third column the Magnitude of the Vector and the fourth and last column representing the angle in degrees.

To demonstrate your ability to program you must create two functions that will be used by your main program code. One of the functions must compute the magnitude and the other the angle represented by the Vector data. Your main program code should handle the file operations and the additional (duplicate) display of vector point data and the computed vector data (magnitude and angle). Data written to the file will consist only of the 6 numeric values representing the Vector with each value separated by white space. The same data written to the display screen should be formatted in columns with appropriate titles / descriptions for each column.

The source data file provided to you will be called VECTOR_DATA.TXT and the output data file the program creates should be called PROCESSED_DATA.TXT. The program must conform to these names. A small sample of test data will be provided.

Run your completed project file and take a screen shot of the output. Submit your C++ code file (named appropriately with your LAST NAME-HW5 as the first part of the filename) by the due date through the online submission point.

Explanation / Answer

Coding is something that you can't answer in a simple step by step process, their are an R (set of real numbers) number of programs that qualify to meet this criteria. But I can point you in the right direction first, determine your input: "two points on a graph better known as a Vector. " "Data will be provided in a data file using the format of a sequence of four floating point values," next, make an example file that will contain this data: VECTOR_DATA.TXT --------------------------- 1234.1234 1234.1234 1234.1234 1234.1234 "each two values representing the X and Y coordinate of a point." so it appears that every line is going to contain the information of 2 vectors. "A small sample of test data will be provided." You should have included this in the question to reduce ambiguity in the answer. Next determine your output: "To better understand the results the data should be displayed in 4 columns, the first two columns should be the first and second set of values representing the start and end point of the Vector, the third column the Magnitude of the Vector and the fourth and last column representing the angle in degrees." now build a small program that completes some of the problem and encourages you to get the rest of the problem. I would start with the simplest method to compute Magnitude = v (| X2 – X1|2 + |Y1 – Y2|2) and a simple program to to test it. Think in object oriented terms you likely need a class to represent vectors, class syntax looks like this: class vector { private: int x; int y; static int next_id; public: /* method to compute magnitude */ static int compute() { ... } }; you need to try this, use the compiler and text book your class came with and then ask a more specific question when you run into a compiler error you cannot decifer. The textbook of your class likely had information on the intrinsics of how to run your compiler. If you do this and have a more specific question then you'll receive more specific help. This is how CRAMSTER works, and for that matter learning in general.