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 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) * 10-4 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. Your main function should do the following: Input values for the width at 70 degrees F and the width tolerance 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 the * shown above)

Metals expand when heated and contract when cooled. For a typical aluminum

0 Fa sr wh0-2345678901234567890 ? tm999999999900000000001 rd c99999999990ssssssssss t 0.1 9 9 9 9 9 9 9 9 9 9 0 0 000000000 999999999900000000000 1e hte hht s ttae r r e r0-2345678901234567890 e e p g6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 8 ttme nned

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!