Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Average Temperatures The temperature assignment requires that we create an application that averages Low and High daily temperatures as input by the user. 1. Upon

Average Temperatures The temperature assignment requires that we create an application that averages Low and High daily temperatures as input by the user. 1. Upon entry to the temps.html form, the user sees average low temperature and high temperature: 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!: 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 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 . Based on the above, requirements are as follows: 1. Create an HTML5 file that contains an HTML form like the 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 . The temps.html file must be free of errors and validated. . Add the necessary code to use the temps.js file 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)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago