Setup a website that looks like this and store it in the q1 folder. The file should
Fantastic news! We've Found the answer you've been seeking!
Question:
Setup a website that looks like this and store it in the "q1" folder. The file should be named "index.html".
- Make the title of this page: "(Your Name)'s Rectangle Calculator".
- Add necessary html documentation using comments. Make sure that you include your name, class number, section number, and the date.
- Write three functions that return information about a rectangle:
- The area of a rectangle is height times the width. Name this getArea.
- The perimeter of a rectangle is 2 times the (height plus width). Name this getPerimeter.
- The distance between two opposite corners is the square root of the combined height squared and the width squared. (It's the Pythagorean theorem.) Name this getOppositeCornerDistance.
- Create two input textboxes on the screen for the height and the width of a rectangle.
- Report to the screen the area, perimeter, and the distance between two opposite corners.
- Here's how to get points deducted for this problem. In other words, don't do these things in your code:
- Pull data from the form while inside of any of the three required functions (getArea, getPerimeter, and getOppositeCornerDistance).
- Reporting data to the screen while inside of any of the three required functions (getArea, getPerimeter, and getOppositeCornerDistance).
- Leave the parameters blank on any of your three required functions (getArea, getPerimeter, and getOppositeCornerDistance).
- Not using a return statement on any of your three required functions (getArea, getPerimeter, and getOppositeCornerDistance).
- Hint: You'll need to craft an additional primary function that pulls data from forms, calls the required functions, and prints data out to the screen.
Related Book For
Posted Date: