CSCI-A110: Review Guide for the Final Exam

Version 3.4, revised 2011 Apr 27.

Overview

Exam date: Tuesday, May 3, 2011.

The exam will cover the second half of the course, i.e., post-midterm material. Chapters covered: Coursepack (C), 11–14; Fluency (FIT), 9–10, 12–16, 23–24; additional readings from the course web site (Scratch, algorithms, databases, internet communication, privacy, security, limits of computation, closing remarks).

Students will be allowed to use a calculator for arithmetic operations (+, -, *, /). No notes, book, or computer may be used.

Mixed format, including multiple choice, true and false, short answer, and short essay. Some questions will require reading spreadsheet formulas Scratch, or database queries (QBE). "Read" means understand, interpret, be able to describe the result. Some questions will also require writing spreadsheet formulas and Scratch, but not QBE.

What to Know (K), with Sample Questions (Q)

Spreadsheets (C11, C14, FIT 14–15)

  1. Terms: spreadsheet, cell, cell address, cell range, named range, relative address, absolute address, formula, formula character, formula bar/editing box, edit, number format, function, what-if analysis, goal-seeking.
  2. What are spreadsheets useful for?
  3. Difference between relative and absolute addresses; how formulas change when copied to other cells.
  4. How to use the arithmetic operators *, +, -, /, and parentheses ( ... ) in formulas.
  5. How to use the spreadsheet functions sum, average, min, max.
  6. Options for formatting cells; scientific notation for numbers.
  7. Kinds of charts, including bar, column, pie, line, and scatter chart.

Sample Questions

  1. Where is cell D5? Where are the cells of the range B4:D7?
  2. What is the value of the formula =A4*(B6+C7)−10, if A4 contains 2, B6 contains 3, and C7 contains 4? (Make a sketch if it will help.)
  3. If the formula =2*D5 in cell C9 is copied and pasted into D8, what does it become? (Think carefully; drawing a diagram may help.) What if the original formula is =2*$D5? =2*D$5? =2*$D$5?
  4. Using the sum function and a cell range expression, write a short formula that means the same as =B5+B6+B7+B8+B9+B10.
  5. What is the meaning of 1.234E5? 6.54E-3?

Computer Operations (C11, FIT 9)

  1. Terms: Processor, central processing unit (CPU) memory, address, arithmetic-logic unit (ALU), control unit, registers, computer "word", hertz, mega-, giga-hertz, integrated circuit/IC/"chip", Moore's law, peripheral device.

Sample Questions

  1. Name and describe the five steps of the fetch/execute cycle. Hint: IF, ID, DF, IE, RS.
  2. Why does a computer have a clock?
  3. Processor 1 is a 2.4 GHz x86_64; processor 2 is a 1.2 GHz PowerPC. Can we infer that processor 1 runs programs twice as fast as processor 2? That processor 1 runs programs faster than processor 2?
  4. A person purchases or downloads a binary executable program for the PowerPC processor and tries to install and run it on an x86_64. What will happen?
  5. Distinguish between machine language, assembly language, and higher-level programming languages.

Internet Communication (C12; FIT 12)

  1. Terms: smiley/emoticon, netiquette, flaming, mailing list, virus, worm, Trojan program, email (MIME) attachment, phishing, intellectual property, copyright, mail forward, narrow reply/reply to sender, wide reply/reply to all, auto-reply, address book, mail list or group, SPAM.
  2. The parts of an email address (user name, hostname, domain).
  3. Risks of email attachments.
  4. Email and mailing list netiquette.

Sample Questions

  1. What is the function of each of these email headers: Subject, Date, From, To, Cc, Bcc?
  2. What is each protocol used for: HTTP, HTTPS, FTP, SMTP, POP, IMAP?
  3. Is "secret" a good password? How about "sdrawkcab", "$m00th3" (the round things are zeroes), "999"?
  4. What should you do to protect your computer from email viruses?

Privacy and Security (FIT 13)

  1. Terms: encrypt, decrypt, clear/plain text, cipher text, private key, public key, digital signature, backup.

Sample Questions

  1. Distinguish between opt-in and opt-out.
  2. Compare the law's treatment of individual privacy rights in the United States and Europe.
  3. What is the advantage of public key encryption over private key encryption?
  4. If a key is public, how can it be used to send secret messages?
  5. Which should you share with others: your public key, private key, both, or neither?
  6. What does "backing up a disk drive" mean, and why is it important?

Scratch/Scripting Concepts

  1. Terms: variable, value, number, string.
  2. Be able to read (interpret) and write (draw) scripts using arithmetic (*, +, -, /), sequences of statements, conditional processing (if, if ... else), comparisons (=, <, >), iteration/looping (repeat, repeat until, forever).

Sample Questions

Four Scripts
Peter's script

Peter's script

Cathy's script

Cathy's script

Esther's script

Esther's script

Fred script

Fred's script

  1. When Peter's script is run, after the user enters the numbers 10 (first) and 20 (second), what does the sprite say?
  2. When Cathy's script is run, after the user enters the numbers 16 (first) and 21 (second), what does the sprite say?
  3. When Esther's script is run, what does the sprite say?
  4. When Fred's script is run, how far does the sprite move?
  5. Write (draw, sketch) Scratch scripts to:
    1. Ask for two numbers; report their sum.
    2. Ask a quiz question; check the answer.
    3. Draw a triangle using a repetition control structure.
    You may use any of the block types shown below to build the scripts.

    Script blocks

Algorithms (C14, FIT 10)

  1. Know the five essential characteristics of algorithms: input specified, output specified, definiteness, effectiveness, finiteness (terms and meanings).
  2. Algorithm structures: sequence, conditional, repetition (looping).

Sample Questions

  1. Distinguish algorithms from programs.
  2. Algorithm interpretation. Show the steps of executing the algorithm described below, with input N = 7. What is the output value?
    Input:
    N, a whole number greater than zero.
    Output:
    A sequence of e's and o's, corresponding to the even and odd numbers from N down to 1.
    Variables:
    N, result, I.
    Procedure:
    1.  Write the value of N.
    2.  Write the empty (blank) string as the initial value of result.
    3.  Write the value of N as the initial value of I.
    4.  Repeat until I is less than or equal to zero:
        a.  If I is even, make a new word consisting of the letters
    	  in the value of result, followed by the letter "e",
    	  and write the word as the new value of result.
            Otherwise, I is odd; make a new word consisting of 
              the letters in the value of result followed by 
              the letter "o", and write the word as the new value of 
              result.
        b.  Evaluate I − 1 and write the value as the new value 
            of I.
    5.  Output the value of result as the answer.
    

Databases (FIT 16)

  1. Terms: database, database management system (DBMS), redundancy, relational database, relation, table, tuple, row, record, attribute, column, field, primary key, query, form, report, view, SQL, QBE,
  2. Why is redundancy bad?

Sample Questions

Sample Database Table

Some questions refer to the Enrollment table, below, which lists some students and the courses they are enrolled in.

Enrollment
StudentNameStudentIDCourseNumber
Ted21ANTH A-101
Ted21BIOL L-107
Ted21CHEM C-290
Eve22BIOL L-107
Eve22ENG W-131
Eve22BUS A-201
  1. Both spreadsheets and relational databases contain "tables" of data, in some sense. What are the differences?
  2. Show the results of running the QBE queries:
    query 1 query 2
  3. The Enrollment database table has some redundancy. Can you identify it and eliminate it?
  4. Distinguish between a query and a report.

Limits of Computation, Closing Remarks (FIT 23–24)

(Extra credit)

  1. Terms: Turing test, Eliza, Deep Blue, universality principle, halting problem, intractable, ubiquitous computing.
  1. Do computers now, or will they ever, think? Why or why not?
  2. Can an x86_64 processor and a PowerPC processor compute the same functions? Run the same programs? Explain.
  3. Is an algorithm that requires time proportional to N better or worse than an algorithm that requires time proportional to N2? What about N2 compared to 2N?
  4. State Moore's Law.
  5. Why will quantum computers be really, really fast?