Question: Converter.java contains one method: c2f. Double.java contains three methods: format1, format3, and format. TempTable.java contains one method: main. There are JavaDoc comments for the three




Converter.java contains one method: c2f. Double.java contains three methods: format1, format3, and format. TempTable.java contains one method: main. There are JavaDoc comments for the three classes and for all the methods in these classes. Most of the methods have "dummy implementations" so that they will compile as downloaded. The application method has a brief skeleton of the code. Use these classes to create a table like the one that follows: Celsius Fahrenheit 0.0 32.000 10.0 50.000 20.0 68.000 0.0 86.000 0.0 104.000 50.0 122.000 60.0 140.000 70.0 158.000 80.0 176.000 90.0 194.000 100.0 212.000 Add a loop to TempTable.main to generate the Celsius values. Pass that into Converter.c2f to convert the value into Fahrenheit. Use Double.format1 to create String representations of the Celsius values and Double.format3 to create String representations of the Fahrenheit values. You can use these strings to generate the output within the loop in TempTable.main Notes: * The Double.format1 method shall format the double value into a string that is 6 characters wide with one digit after the decimal point The Double.format3 method shall format the double parameter value into a string that is 12 characters wide with three digits after the decimal point. * For the Minus version you can leave the "dummy implementation" in the three-parameter method Double.format. Hint: The String.format method will be very helpful. Here is the formula for Celsius to Fahrenheit conversion: F-1.8C 32 For reference sake, here is a Python version of the code: def main: print('Celsius Fahrenheit') for i in range(11): print(%6.1 1961 2.3r % (i*10, *90/5+32)) Package up the three Java source code files into a jar file, from which they can be extracted, compiled, and run Make the jar file runnable Complete the Double method. That is, replace the "dummy implementation" within the three parameter Double.format method Here are some notes about these enhancements: Runnable jar Needless to say, when the jar file is run, it should run TempTable.main Double.format Complete this method in addition to completing the implementations of format1 and format3. Note: It would be possible to implement the format1 and format3 methods using the three-parameter format method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
