CSC 121: Computers and Scientific Thinking
Fall 2008

Test 2 Review


Thu, November 20
  • As with Test 1, the test will contains extra points (e.g., 53 out of 50).
  • As with Test 1, the test will include a variety of questions (e.g., TRUE/FALSE, short answer, trace/modify code).
Study advice
  • review online lecture notes
  • review text
  • look over chapter exercises, review questions, labs
  • reference other sources for examples, different perspectives
Course Material
TEST 1 MATERIAL
Event-driven Pages
    event-handler elements
        button (INPUT tag, attributes: TYPE, VALUE, ONCLICK)
        text box (INPUT tag, attributes: TYPE, ID, VALUE, SIZE)
        text area (TEXTAREA tag, attributes: ID, ROWS, COLS)
        image (IMG tag, attributes: ID, SRC, ALT)
    accessing a text box/text area/image
        document.getElementById('BOX_OR_TEXTAREA_ID').value
        document.getElementById('IMAGE_ID').src   
    functions to simplify buttons 
Abstract Thinking & Functions
    abstraction, user-defined functions
        parameters, comments, return statement
        local variables, var declaration
    function libraries, SRC attribute of SCRIPT tag
        random.js: RandomInt, RandomNum, RandomChar, RandomOneOf
Conditional Execution
    if statement
        boolean test, if-else
        nested if-else statements, cascading if-else statements
        logical connectives: && (and), || (or), ! (not)
    counter
        variable that you initialize to 0, increment each time an event occurs
    while loops
        logic-driven loops, counter-driven loops
        danger of infinite loops

Applications in Biology & Bioinformatics
    impact: 1. computer technology as tools
            2. modeling of complex systems,
            3. storing and analyzing biological data
    bioinformatics, genetic databases
Problem Solving & Algorithms
    Polya's problem solving steps
    algorithm analysis, rate of growth, Big Oh notation
        sequential search vs. binary search
    machine language vs. high-level language
        program translation: interpreter vs. compiler
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