Question: 1) [12 points] Remember that great application you wrote for Fever Foxes (Lab 6- 2). Now they want you to add a data validation feature
![1) [12 points] Remember that great application you wrote for Fever](https://s3.amazonaws.com/si.experts.images/answers/2024/08/66d0749005d5e_35966d0748f6d93b.jpg)
1) [12 points] Remember that great application you wrote for Fever Foxes (Lab 6- 2). Now they want you to add a data validation feature that restricts the entered temperature. Start with the key or your Lab 6-2 code. Modify the application header and close to say Fever Foxes, v2. Prompt for and get from the user a temperature in Fahrenheit in the range -60 to 120. If the value is outside the range, print an error message including the invalid value (and nothing else except the application close). If the value is within the range, convert it to Celsius and show both values. Use formatted output manipulators (setw, left/right) to print the following two rows: Fahrenheit temperature Celsius temperature And three columns: A left-justified label. A right-justified value. A left-justified units (output manipulators not needed here, just place one space before the units to separate it from the second column). Define constants for the column widths. Format all real numbers to two decimal places. Include the degree symbol in the output: Windows users - declare a constant for the degree symbol: DEGREE_SYMBOL = (char) 167 Use the constant in the output. Mac OS users - copy the degree symbol above to your code. For invalid input, the output should look like this: Welcome to Fever Foxes, v2 - - - - - - - - - - Enter temperature in Fahrenheit (-60 to 120): 200 Error: Fahrenheit temperature 200.00 is outside the valid range of -60 to 120. End of Fever Foxes, v2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
