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. 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 x, and x2 in the
table, and let yı and y2 be the corresponding values. Then the value of y can be
obtained from the relation
y – 31 – 12 – 1
*-* x2 – X
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)
const 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.
х
y
142.56
200
250
178.28
290
315
206.91
224.85
250.02
286.16
350
400
450
322.62
500
359.49
550
600
396.86
434.78
473.25
512.33
650
700
Purchase answer to see full
attachment
Consider the following information, and answer the question below. China and England are international trade…
The CPA is involved in many aspects of accounting and business. Let's discuss some other…
For your initial post, share your earliest memory of a laser. Compare and contrast your…
2. The Ajax Co. just decided to save $1,500 a month for the next five…
How to make an insertion sort to sort an array of c strings using the…
Assume the following Keynesian income-expenditure two-sector model: AD = Cp + Ip Cp = Co…