Question: Take your ConvertTemp. java file and copy it to a file named LabCh04NiceConvertTemp.java. Then add in a loop to make the work be performed repeatedly
Take your ConvertTemp. java file and copy it to a file named LabCh04NiceConvertTemp.java. Then add in a loop to make the work be performed repeatedly At the end of the loop body, ask the user whether they want to convert another temper- ature, get the answer in a String, and set the value of a boolean variable named done to true or false depending on their answer (use keys.nextLine) to get the answer). If the first char in their answer is n or N, set done to true. Exit the loop when done holds true Here is a sample execution showing how your program should behave, with the user input shown in bold: Enter temp in Fahrenheit 71.5 That is 21.9444444444444 in centigrade Convert another? y Enter temp in Fahrenheit: 212 That is 100.0 in centigrade Convert another? Yes Enter temp in Fahrenheit: 32 That is 0.0 in centigrade Convert another? n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
