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:

  1. 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
  2. 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.
  3. Your solution should be modular - i.e. function-driven
    1. Each function should make good use of parameters and return statements in order to be as reusable as possible
    2. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!