Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
12/1ab%20works/lab04/Lab04.pdf - + Fit to page D Page Exercise 2. Copy ct_Ex1.html and ct_Ex1.js to new files named ct_Ex2.html and ct_EX2.js. In this exercise, you
12/1ab%20works/lab04/Lab04.pdf - + Fit to page D Page Exercise 2. Copy ct_Ex1.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 is. You should make some changes in both html and js files, such that you get the following results when, for instance, you enter 10 11, and 4 for the sides of the triangle. area of a triangle when you enter three good sides 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 c e) As side of a triangle cannot be negative numbers change the min and max to 1 and 100 1) When the "enter" button is clicked, the event handler area() should be triggered. Also, you need to make about 5 changes in your ct_Ex2.js as follows: a) Make sure name of the function is areal) 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 sew+h; 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 (le, 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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started