Question
Write a c++ program to load two column of numbers, do arithmetic operations to the data points by following the steps below carefully. Output the
Write a c++ program to load two column of numbers, do arithmetic operations to the data points by following the steps below carefully.
Output the computed results to the specified output files Steps to complete.
0. Download the data file named Datafile1.data from the file area of the assignment. (Do not change the file name to .txt. Open the file in notepad (win) or view/vi/vim (linux) or any viewer of your choice if you like to see the data)
1. Create distinct functions for this project.
2. Define ONE class and use distinct instance of a class to store column1, column2, addition, multiplication. This should produce 4 class objects. 2. Load two columns of data points, each column into the storage area of its class instance where the data storage is a vector .
3. Add each position of the data and store it in another class instance where the data storage is a vector.
4. Multiply each position of the data and store it to another class instance where the data storage is a vector.
5. Write the results of addition and multiplication to a file named Output-MultAdd-class.data. Columns of the output file is value1, value2, Addition, Multiplication in a nicely formatted fashion.
6. Design Suggestions: Create member functions for the class that operate on the one data element which is a vector. You will be getting four class objects that hold value1, value2, addition and multiplication
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