Question: - + Q Fitte Exercise 2. Copy ct_Exi.html and ct_Ex1.js to new files named ct_Ex2.html and ct_Ex2.js. In this exercise, you should translate your flowchart
- + Q Fitte Exercise 2. Copy ct_Exi.html and ct_Ex1.js to new files named ct_Ex2.html and ct_Ex2.js. In this exercise, you should translate your flowchart of Exercise 2 of Part 1 to js.You should make so changes in both html and js files, such that you get the following results when, for instance, you ent 11, and 4 for the sides of the triangle. area of a triangle when you enter three good sides area: 19.96 In particular, you need to make about 6 changes in your ct_Ex2.html as follows: a) Make sure you link your html file to your new js file b) Change the header to be "area of a triangle when you enter three good sides" c) Add a new input (because this program receives 3 inputs) with id "num3" d) Correct the labels of the inputs to a, b, and e) As side of a triangle cannot be negative numbers change the min and max to 1 and 100 4) When the "enter" button is clicked, the event handler area() should be triggered. Also, you need to make about changes in your EX2.js as follows: a) Make sure name of the function is area() b) Make sure pre/post conditions are updated to reflect how this function works c) Add a line to capture the value of c d) Replace the line sewh; with what you have in your flowchart for Heron's formula e) Correct the output to have a more relevant label and correct value as the picture above illustrates Note that the answer is fixed to 2 digits after the decimal point. This should be addressed in the implementation, not necessarily the design (.e., flowchart). Before moving on to Exercise 3, compare your code in ct_EX2.js with your img_02.jpe your flowchart for this problem. Make sure they are match
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
