Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

- + 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

image text in transcribed
- + 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

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

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions