Question: I need help with this! In HTML & Javascript create a function as a Fahrenheit/Celsius temperature converter. The page should: Allow users to type in
I need help with this!
In HTML & Javascript create a function as a Fahrenheit/Celsius temperature converter. The page should:
- Allow users to type in a numerical temperature and then select whether their current measurement is in Fahrenheit or Celsius.
- If the entered temperature is in Fahrenheit, convert to Celsius using the following formula: Celsius = 5 / 9 (Fahrenheit - 32)
- If the entered temperature is in Celsius, convert to Fahrenheit using the following formula: Fahrenheit = 9 / 5 X Celsius + 32
- After the user has entered the data, the page should display the converted temperature in a meaningful way, including an appropriate editorial message about the number. For example, you might choose to display "Stay in bed!" for temperatures (in Fahrenheit) that are less than zero, "Bundle up!" for Fahrenheit temperatures between 0 and 32, etc. You may choose the messages and the breakpoints, but there should be at least four different messages that display at different temperature settings. All the numbers on the timeline should be covered.
- Demonstrate excellence in code organization and documentation
- Your solution should be modular - i.e. function-driven
- Each function should make good use of parameters and return statements in order to be as reusable as possible
- The application should store all JavaScript in an external file and use JavaScript event properties to assign functions to objects as needed.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
