In this step, you will work on reproducing the code example 6.10 from your lectures.
Create a new Processing sketch in your workspace and call it Example_6_10.
Write a method called farenheitToCelsius
that takes one float parameter.
The return type for this method is float
.
The method returns the result of the conversion: (farenheit - 32.0) * (5.0/9.0)
The farenheitToCelsius
method should be called from the draw()
method.
The value retuned from the calculation should be printed to the console.
Test your code by passing the farenheit value of 451. The celsius value printed should be: 232.77779