Temperature Values & Table of Function Arguments and Values Paper

Temperature Values & Table of Function Arguments and Values Paper

Code must use Object Oriented Programming, e.g., Class name, Public, Private, Main, etc…

Suppose you are given a table of function arguments and values, such as the table below. You can use linear interpolation to find function values whose arguments are not in the table. Given an argument x, find the two closest arguments x1 and x2 in the table, and let y1 and y2 be the corresponding values. Then the values of y can be obtained from the relation:

Provide a class FunctionTable with a member function void read(string file_name) to read table values from a file and a member function double interpolate_value(double x) cost that uses linear interpolation to compute the value for the given argument. You may assume that the entries in the file are sorted by increasing x – values.

Implement a test program that uses the following table, which yields the internal energy of an ideal gas for a given set of temperature values.

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon
"FIRST15"

Order Now