Question: Metals expand when heated and contract when cooled. For a typical aluminum bar, if you know the width at 70 degrees F, the new width

 Metals expand when heated and contract when cooled. For a typicalaluminum bar, if you know the width at 70 degrees F, the

Metals expand when heated and contract when cooled. For a typical aluminum bar, if you know the width at 70 degrees F, the new width at a temperature can be calculated with the following formula: new width-width(at 70 degrees F) +(temperature - 70)* 104 Write a function named widthAtTemperature, that takes two parameters: 1. a double value that represents the width of a bar at 70 degrees F 2. a double value that represents a temperature widthAtTemperature should return a double value that represents the width at the given temperature. A researcher is performing an experiment, and the size of the bar can only vary within a given tolerance. Your goal is to output a chart showing the width of a bar at a series of temperatures and indicating which widths are within the tolerance range. For example, the following shows the output for a bar of width 10.0 cm at 70 degrees F and a tolerance of 0.00050. The" symbol is used to mark the usable temperature range tae Enter the bar width at 0 degrees F: 10 Enter the tolerance for width variation:.0005 emperature degrees F Your main function should do the following Input values for the width at 70 degrees F and the width tolerance 2 Print neatly formatted headings for your chart Loop for all temperatures from 60 degrees through 85 degrees and call your widthAtTemperature function to determine the new width at each temperature Output the temperature, width at that temperature, and if width is within the tolerance range, mark it in some way (such as with theshown above 9

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!