Temperature Converter

===================================================================================================================================================================

Challenge:

Bidirectional data flow, user-provided text input.

Criteria:

Temperature Converter increases the complexity of Counter by having bidirectional data flow between the Celsius and Fahrenheit inputs and the need to check the user input for validity. A good solution will make the bidirectional dependency very clear with minimal boilerplate code.

Temperature Converter is inspired by the Celsius/Fahrenheit converter from the book Programming in Scala. It is such a widespread example—sometimes also in the form of a currency converter—that one could give a thousand references. The same is true for the Counter task.

A dialogue box with 2 inputs with label celsius & fahrenheit.

Temperature Converter

 =

Assumptions:

Code:

After opening a code link below, hit the '.' key to open GitHub's browser editor for improved reading experience.