Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use C++ Visual Studio Please Do not use pointers, dynamic arrays and/or vectors to complete this program (This is important)! And as well if you

Use C++ Visual Studio

Please Do not use pointers, dynamic arrays and/or vectors to complete this program (This is important)!

And as well if you could please make sure that you have comments 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.

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 should have a main function and 4 other functions as described below. The manufacturer has stated that there will not be more than 50 formulations and not more than 12 plants.

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.

Here is a Screen Shot of what the "thermalconduct.dat" file looks like ( I have this file so I can put into the code after it has been written):

image text in transcribed

75808227, 5 8 3 7 5 6 5 5 8 6 6 1 4 8 9 2 8646186 8036809898141641986596611258004 8 5 6 6 4 6 7 5 8 8 5 6 5 8 8 5 7 9 8 7 3576348393 , 8 3 6 9 6 7 2 1 5 6 2 1 2 9 5 4 6 6 5 2 4 0 8 6045613 8908529442308727252731527731983 9606655639368578994497678646597 243422659123580066563072686854 7007726358977567078835020975940 7663854556655679858333455263379 9863273514158172311967761360256 8193133329767, 8 8 0 9 3 8 6 4 8 8 2 0 2 1 0 207 67' 3 9 6 4 9 8 9 4 7 7 3 5 4 8 4 9 8 5 6 7 8 7 7 568982 9236037644788821780618568856113 0565689511563548657338890616524 67659885799747357, 9 8 6 8 5 9 9 9 5 6 4899 006-260 0 9 0 9 4 8 8 5 5 0 5 2 1 5 3 1 7253-28 9029825518345468090699631268100 8666486753658873365994897996873 47. 9 9 7 2 7 5 5 4 5 6 8 0 1 9 9 7 3 0 5 6861024942 7293725572315882202300104569790 4535393953588679353488973984698 9 1398912700721906579383040765872 9188815654141728260743705855778 4838375866956939477757833974534 1 3 1503638162764982354|587224932-2 2898234384882817|469593-6231600 569657' 5 8 5 6 7 9 5 8 8 9 3 5 7 4 4 7777356489

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

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students also viewed these Databases questions

Question

=+ For what reasons can and do unions go on strike?

Answered: 1 week ago