| A: Tue, Nov 17 B: Mon, Nov 16 |
|
| Study advice |
|
| Course Material | TEST 1 MATERIAL User Interaction and Computation text boxes INPUT tag, attributes: TYPE="text", ID, SIZE, VALUE access contents via document.getElementById('BOX_ID').value variables naming conventions variables & memory cells variables for reusing values (e.g., fill-in-blank story) variables for temporary values (e.g., swapping images) pages that compute numbers & expressions, mathematical operators (+, -, *, /) number representation parseFloat function programming errors & debugging syntax error, run-time error, logic error Functions and Randomness predefined functions units of computational abstraction function call, inputs & output (return value) Math functions Math.sqrt, Math.abs, Math.floor, Math.ceil, Math.round Math.min, Math.max, Math.pow Math.random simple user-defined functions function keyword, function name, comments, {} enclosed in SCRIPT tags in HEAD functions to simplify buttons code goes into function; ONCLICK attribute calls the function randomness in a page application: dice simulation function changes dice images at random, called on button click requires consistent naming scheme (die1.gif, die2.gif, ...) application: random slide show similar to dice, pick among images (slide1.jpg, side2.jpg, ...) ONLOAD attribute of BODY to perform initial selection application: banner ads similar to slide show, pick among banners (ad0.gif, ad1.gif, ...) setInterval function to schedule regular changes variable and % operator to rotate banners in order Computer Science as a Discipline study of computation, artificial vs. natural science CS themes: hardware, software, theory subfields of CS Algorithms & Data Structures: public-key encryption Architecture: parallel processing Operating Systems & Networks: Ethernet Software Engineering: software life cycle Artificial Intelligence: Turing Test Bioinformatics: genetic databases ethics of computing |