CSCI 1320 Creating Modern Web Applications Lecture 7: JavaScript/DOM LAB

advertisement
CSCI 1320
Creating Modern Web Applications
Lecture 7: JavaScript/DOM LAB
Lab Assignment

Create a triangle information system


Input 3 numbers representing the lengths of the sides


Geared at middle-high school students
Error checking as appropriate
Display:

The corresponding 3 angles
 https://www.mathsisfun.com/algebra/trig-solving-triangles.html

Area and perimeter of the triangle

Whether the triangle is
 Equilateral, Isosceles, Scalene, or Not a Triangle
 Acute, Right, or Obtuse

2
Do this all on the client side
CS132 Lecture 7: Javascript lab
7/27/2016
Mechanics
 Work in teams of 1 to ~4
 Make sure each person’s name is in meta tag on page
 Try to get it working in class
 Display on the screen if possible
 Check off (when working) in class
 Or mail to spr+16lab02@cs.brown.edu
 Do this by the end of the day tomorrow
3
CS132 Lecture 7: Javascript lab
7/27/2016
Next Time
 Requirements and Specifications
4
CS132 Lecture 7: Javascript lab
7/27/2016
LAB Assignment
 Create a calculator on a web page.
 Web page should include buttons and display field
 (0…9, clear, .,+, -, *, /)
 Can do other equivalents as well
 JavaScript to handle the buttons and update display
 Work in teams
 We are looking for
 Functionality
 Something that looks good and is usable
5
CS132 Lecture 7: Javascript lab
7/27/2016
Download