Frameor a swing
JFrame. The table should run from 0 degrees Fahrenheit to 250 degrees Fahrenheit, in steps of 10 degrees. Round the Celsius temperature values to the nearest integer.
Display any temperatures below the freezing point of water (32o Fahrenheit) in blue and any temperatures above the boiling point of water (212o Fahrenheit) in red (the rest in black).
The formula to use is:
See TempConv.jar model solution for a sample chart; just download and double-click to run.
You must turn in a stand-alone AWT or swing program, not an
JApplet nor a JavaFx program. You must meet all the requirements from the description above. If you include any creative extras, be sure your program still performs the basic chart as described above. Creative extras are extras, and you are not free to modify the project requirements.
It is not acceptable to pre-compute each Celsius value, and just have many “
g.drawString()” statements. You need to use Java to calculate each value using the correct formula, and use various control structures.
A non-working project can score quite well (so don’t be afraid to turn one in). Also a fully working project may not score 100%.
You must work alone on your project, however you can ask your instructor for help anytime. Please see the syllabus for additional information about projects.
Your chart need not look like the sample (which is ugly on purpose, so you can more easily do better). Try to be creative! You will not be graded on the artistic merits of your chart.