Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use visual C++ to solve thermalconduct.dat 31 9 5.21 4.91 4.74 8.90 6.09 6.89 7.72 9.87 7.87 6.85 8.13 5.27 6.00 7.52 7.18 6.04

Please use visual C++ to solve

image text in transcribed

thermalconduct.dat

31 9

5.21 4.91 4.74 8.90 6.09

6.89 7.72 9.87 7.87

6.85 8.13 5.27 6.00 7.52

7.18 6.04 6.98 8.05

9.90 3.89 3.99 6.26 6.63

3.96 6.03 10.03 5.38

6.83 8.88 5.39 6.91 5.56

9.33 3.74 6.86 6.60

5.26 3.89 3.77 4.82 9.60

6.12 8.72 6.59 6.88

7.33 7.11 9.22 8.26 8.83

4.37 5.22 5.26 4.02

5.48 5.52 3.57 6.50 8.97

9.33 4.66 5.97 6.92

8.31 8.67 9.55 7.52 5.56

8.35 5.35 6.42 7.87

5.86 6.50 5.75 5.10 7.14

9.21 5.59 3.41 5.95

6.42 6.40 3.24 3.89 9.14

4.94 6.81 9.25 8.88

7.87 9.17 5.35 6.30 9.57

7.71 6.92 3.36 8.13

9.86 5.42 8.16 5.49 7.68

7.65 5.73 6.02 5.47

5.24 6.11 8.58 8.54 4.38

3.78 5.75 8.81 6.15

8.89 9.79 6.80 8.48 7.58

5.81 6.58 5.72 5.66

8.18 3.20 7.81 7.68 3.42

4.87 7.60 7.29 8.45

9.72 9.86 9.29 3.85 5.81

8.02 9.70 8.75 8.15

3.13 4.25 3.29 3.05 7.67

4.93 8.06 9.24 5.98

5.45 7.67 5.07 6.90 9.58

9.31 5.76 9.56 7.86

7.64 7.09 3.23 5.05 8.70

8.81 8.85 4.26 9.66

4.91 7.73 4.30 9.62 6.36

5.69 3.86 4.75 8.51

4.55 5.48 8.05 9.91 8.31

6.46 3.33 9.32 7.94

7.98 7.33 8.06 4.95 5.88

7.87 3.50 7.14 3.68

7.37 8.70 9.18 8.63 9.85

8.87 4.07 6.50 5.69

7.12 3.04 7.06 9.31 9.96

7.26 5.22 7.28 7.12

7.62 3.50 3.41 7.17 9.08

7.01 5.06 8.76 6.18

3.24 9.87 9.50 9.22 5.68

5.23 2.98 6.70 3.26

5.39 7.56 8.62 9.65 6.15

6.16 6.76 4.34 4.54

6.13 4.55 4.94 6.83 4.66

8.00 3.58 6.15 8.86

4.62 5.78 6.79 8.11 8.51

9.22 3.95 5.96 3.01

8.01 3.77 9.94 7.02 9.21

8.05 7.41 9.81 9.08

9.02 4.82 8.02 3.08 9.43

2.76 9.04 7.33 3.46

Goals: Developing problem-solving skills, using functions and arrays Problem: The company, HeatTransfer, has expanded its study to include more formulations and plants. They have automated the data collection so that the thermal conductivities are stored in a file containing a table (2-D array). Each row of the table represents a specific formulation and each column represents a specific plant. Your program functions as described below. The manufacturer has stated that there will not be more than 50 formulations and not more than 12 plants. should have a main function and 4 other One function should open the file "thermalconduct.dat" and read the first line that contains the number of formulations (the first value) and number of plants (the second value). Using these values, your function should then read the rest of the data and store the values in a 2-dimensional array. As the thermal conductivities are being stored, a message should be output if any thermal conductivity is not in the range of 3 to 10. The message should output the formulation, plant and thermal conductivity as the example below The value of 14.56 from plant 1 for formulation 8 is suspect. The thermal conductivity should still be stored in the array. The number of formulations and number plants should be sent back to the function call One function should accept the 2-dimensional array, the number of formulations and number of plants then create a 1-dimensional array containing the minimum thermal conductivities for each formulation and create a 1-dimensional array containing the maximum thermal conductivities for each formulation. This function should call the function to output a 1-dimensional array for the minimum and maximum values before sending these arrays back to the function call One function should accept the 2-dimensional array and determine the average thermal conductivity for each formulation. The average thermal conductivity for each formulation should be calculated without including the maximum and minimum thermal conductivity for that formulation, therefore this function will need to call the function that calculates the minimum and maximum thermal conductivities for each formulation. The average thermal conductivities for the formulations should be stored in another 1-dimensional array which is sent back to the function call. One function that will accept a 1-dimensional array, the number of values stored in the array and a description of what is stored in the array, e.g "minimum thermal conductivity for each formulation", average thermal conductivity for each formulation", etc. The function will then output the description and the values. The values should be output to 4 significant digits; The main function should prompt the user to enter the filename for the data file and call the function to import the data from the file into a 2-dimensional file. Next main should call the function to calculate the averages of the formulations. The main function should then call the function to output a 1-dimensional array sending the array of averages to the function to calculate the 1-dimensional array A data file, "thermalconduct.dat", has been posted on CANVAS. However, you should create your own file with fewer formulations and plants to test your code Do not use pointers, dynamic arrays and/or vectors to complete this project. Remember that if you get help from anyone other than the TAs or Dr. Quick you are required to give the person's name in the overall introductory comments for the program. Make sure that you have comments immediately before each function that describe the purpose of the function, the input needed by the function (what is passed to the function and what the user is prompted to enter within the function), the output expected from the function (what is sent back to the function call and what is output to the screen) by the function, and processing needed by the function Remember to confirm all your submissions to CANVAS. You may make multiple submissions to the assignment and the latest one will be graded. Goals: Developing problem-solving skills, using functions and arrays Problem: The company, HeatTransfer, has expanded its study to include more formulations and plants. They have automated the data collection so that the thermal conductivities are stored in a file containing a table (2-D array). Each row of the table represents a specific formulation and each column represents a specific plant. Your program functions as described below. The manufacturer has stated that there will not be more than 50 formulations and not more than 12 plants. should have a main function and 4 other One function should open the file "thermalconduct.dat" and read the first line that contains the number of formulations (the first value) and number of plants (the second value). Using these values, your function should then read the rest of the data and store the values in a 2-dimensional array. As the thermal conductivities are being stored, a message should be output if any thermal conductivity is not in the range of 3 to 10. The message should output the formulation, plant and thermal conductivity as the example below The value of 14.56 from plant 1 for formulation 8 is suspect. The thermal conductivity should still be stored in the array. The number of formulations and number plants should be sent back to the function call One function should accept the 2-dimensional array, the number of formulations and number of plants then create a 1-dimensional array containing the minimum thermal conductivities for each formulation and create a 1-dimensional array containing the maximum thermal conductivities for each formulation. This function should call the function to output a 1-dimensional array for the minimum and maximum values before sending these arrays back to the function call One function should accept the 2-dimensional array and determine the average thermal conductivity for each formulation. The average thermal conductivity for each formulation should be calculated without including the maximum and minimum thermal conductivity for that formulation, therefore this function will need to call the function that calculates the minimum and maximum thermal conductivities for each formulation. The average thermal conductivities for the formulations should be stored in another 1-dimensional array which is sent back to the function call. One function that will accept a 1-dimensional array, the number of values stored in the array and a description of what is stored in the array, e.g "minimum thermal conductivity for each formulation", average thermal conductivity for each formulation", etc. The function will then output the description and the values. The values should be output to 4 significant digits; The main function should prompt the user to enter the filename for the data file and call the function to import the data from the file into a 2-dimensional file. Next main should call the function to calculate the averages of the formulations. The main function should then call the function to output a 1-dimensional array sending the array of averages to the function to calculate the 1-dimensional array A data file, "thermalconduct.dat", has been posted on CANVAS. However, you should create your own file with fewer formulations and plants to test your code Do not use pointers, dynamic arrays and/or vectors to complete this project. Remember that if you get help from anyone other than the TAs or Dr. Quick you are required to give the person's name in the overall introductory comments for the program. Make sure that you have comments immediately before each function that describe the purpose of the function, the input needed by the function (what is passed to the function and what the user is prompted to enter within the function), the output expected from the function (what is sent back to the function call and what is output to the screen) by the function, and processing needed by the function Remember to confirm all your submissions to CANVAS. You may make multiple submissions to the assignment and the latest one will be graded

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

explain what is meant by the terms unitarism and pluralism

Answered: 1 week ago