Directions Download the Temperatures Assignment (temperatures.pdf) Download Temperatures Assignment (temperatures.pdf) . Review the most helpful resources for completing this assignment. These...

1 answer below »


Directions



  1. Download the
    Temperatures Assignment (temperatures.pdf)


    Download Temperatures Assignment (temperatures.pdf)

    .

  2. Review the most helpful resources for completing this assignment. These includethe today.html, today.js, event.html, event.js, tasks.html, tasks2.js, and employee.html and employee.js files from Chapter 6.

    • You will also need to retrieve the current date from your system hint: new Date(), and use some date methods shown in Chapter 6 on Page 176 TABLE 6.1.

    • You will likely need to use the parseFloat() function to convert any temperature that you retrieve from an array into a floating number that can be added to a sum needed for calculating an average.



  3. Create an HTML form named temps.html and a JavaScript file named temps.js as described in the Temperatures Assignment.

  4. Submit the files when you are finished.




Average Temperatures The temperature assignment requires that we create an application that averages Low and High daily temperatures as input by the user. The following screenshots demonstrate how the application works: 1. Upon entry to the temps.html form, the user sees the following: 2. After entering the first pair of temperatures for the current date (50 and 80 were used in the example) and clicking on Add the temperatures!, the user sees the following: 3. After entering the next pair of temperatures for the previous date (48 and 78 were used in the example) and clicking on Add the temperatures!, the user sees the following: 4. Enter in temperatures of 44 and 74 for 2 days prior to the current date and click on Add the temperatures!, and display the output. Enter in temperatures of 42 and 68 for 3 days prior to the current date and click on Add the temperatures!, and display the output as seen below. Based on the screenshots above, requirements are as follows: 1. Create an HTML5 file that contains an HTML form like the screenshots shown above that accepts a Low Temperature and High Temperature and a submit button with the label Add the temperatures!. Save the file as temps.html and store it in your Ch06 directory. The temps.html file must be free of errors and validated. Add the necessary code to link to a CSS file called forms.css that is stored in your Ch06/css subdirectory. Add the necessary code to use the temps.js file that is stored in your Ch06/js subdirectory. (8 Points) 2. Download the forms.css file and store it in your Ch06/css subdirectory. (1 Points) 3. Create and debug a JavaScript file that processes the Low and High Temperatures from the temps.html file that meets the following specifications (40 Points Total as broken down below): a. Save the file as temps.js in your Ch06/js subdirectory. (1 Points) b. An if statement must be used to ensure that the user enters both low and high temperatures for any given day before the form is submitted. If the user does not enter one or both of the temperatures, a message or messages must be displayed to tell the user that valid low and high temperatures must be entered. The form will not be processed unless both temperatures are entered. (4 Points) c. The low and high temperature values entered from the html form must be processed into an array or arrays with loops as needed in the temps.js file to calculate and display the results in an HTML table as shown that becomes the output to the temps.html file. (6 Points) Further detail on each part of processing the array and resulting HTML table appear in Items d through j below: d. The table must display a header row of Date, Low Temperatures, High Temperatures. (4 Points) e. The first row of the table must display a row that contains the current date and the first pair of temperatures entered. (4 Points) f. Each additional row follows the pattern of displaying a date which is one day older than the previous date and the most recent pair of temperatures entered. (4 Points) g. The date must be displayed in the format shown. (4 Points) h. The average low temperature for all low temperatures entered must be calculated. (4 Points) i. The average high temperature for all high temperatures entered must be calculated. (4 Points) j. A summary row must display “Averages” as shown followed by the average low temperature and average high temperature. (5 Points) 4. Submit the temps.html, forms.css, and temps.js files to Blackboard. (1 Points) Helpful Hints: The today.html, today.js, event.html, event.js, tasks.html, tasks2.js, and employee.html and employee.js files from Ch06 are extremely helpful in forming your solution. You will also need to retrieve the current date from your system hint: new Date(), and use some date methods shown in Ch06 on Page 176 TABLE 6.1. You will likely need to use the parseFloat() function to convert any temperature that you retrieve from an array into a floating number that can be added to a sum needed for calculating an average.
Answered Same DayAug 04, 2022

Answer To: Directions Download the Temperatures Assignment (temperatures.pdf) Download Temperatures Assignment...

Aditi answered on Aug 04 2022
83 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here