The entire exam is worth 140 points.

 

Multiple choice:_____________________________________________

 

31:________________________________________________________

 

32:______________________________________________________________

 

33:______________________________________________________________

_

34:______________________________________________________________

 

35:______________________________________________________________

 

 

 

 

TOTAL_________________________________________________________________

Circle the correct answer. Graded as follows: Correct 3 points; no answer, incorrect answer (or more than one answer) 0 point. No negative points. Answer with the ONE BEST answer. Do not mark more than one answer for a question.

 

 

 

  1. In HTML the commands <br> and <BR>

 

a. always mean the same thing

b. never mean the same thing

c. may or may not mean the same thing depending on what browser is used.

d. none of the above

 

 

  1. A file

 

a. has a name.

b. stores data.

c. has a size measured in bytes.

d. all of the above,.

e. none of the above

 

 

  1. A byte is

 

a. a single digit which is either zero or one

b. a computer input device.

c. the smallest area of a monitor screen on which the computer can write,

d. eight bits,.

e. none of the above

 

 

  1. Software is

 

a. computer memory

b. another term that means operating system.

c. another term for programs of any sort,

d. used as another term for all of the above.

e. none of the above

 

 

  1. An email message sent over the Internet

 

a. might be shipped as lots of small pieces of data.

b. can potentially take different routes from its source to its destination.

c. almost always gets to its destination faster than a regular post office type of letter.

d. all of the above,.

e. none of the above

 

  1. Most Internet search engines (such as Google or Yahoo)

 

a. accept advertising.

b. base their searches on keywords.

c. have two main components called a crawler and a query processor .

d. all of the above,.

e. none of the above

 

 

  1. A data base can be thought of as a collection of tables. In this view an entity is

 

a. one of the tables.

b. a label on a column of a table.

c. a row of a table.

d. a column of a table.

e. none of the above

 

 

  1. A column of a table (in a data base) is called

 

a. an attribute.

b. a field.

c. both of the above,.

d. none of the above

 

 

  1. An assignment statement

 

a. is a very direct way to change the value of a variable.

b. in JavaScript is written using an equals sign (among other things).

c. always involves a variable.

d. all of the above.

e. none of the above

 

 

  1. in JavaScript which of the following are used to test for equality?

 

a. =

b.==

c. ~

d. all of the above,.

e. none of the above

 

 

 

 

 

 

 

 

 

  1. Which of the following are good guides to the credibility of a website?

 

a.who owns the website.

b.how current the website is.

c. what other websites have links to it.

d. all of the above,

e. exactly two of the above.

f. none of the above

 

 

  1. Which of the following are means of input on a (JavaScript) webpage?

 

a. a button.

b.an alert window

c a text field.

d. all of the above,

e. exactly two of the above.

f. none of the above

 

 

  1. On a webpage forms are often used for

 

a.input.

b.part of what makes a webpage dynamic

c.something that invokes (calls) a function

d. all of the above,

e. exactly two of the above.

f. none of the above

 

 

  1. A function is

 

a.the same thing as a query.

b.the same thing as a form.

c.like a small program that has been given a name.

d. all of the above,

e. none of the above

 

 

  1. In JavaScript what is the following?
    var name;

 

a. a parameter.

b. a variable declaration

c. a function call or invocation.

d. is nothing in JavaScript,

e. none of the above

 

 

 

  1. What does the following JavaScript program do?
    <script language="JavaScript">
    alert("Push.");
    </script>

 

a. display a button with "Push" written on it.

b.display a window with "Push" written on it.

c. ring a bell.

d. is nothing in JavaScript,

e. none of the above

 

 

  1. What does the following form do?
    <INPUT NAME="sam" TYPE=Text>

 

a. display a text field with "sam" written in it.

b. display a button with "sam" written on it.

c. display a blank text field.

d. is not a correctly written form,

e. none of the above

 

 

  1. javaScript allows you to define functions. When we place the function definition in an HTML page, where do we normally put the function definition?

a. in the heading.

b in the body.

c. in the address section.

d. You do not place a function definition in an HTML page.

e. none of the above

 

 

  1. A cookie is

a. information left on your computer by a web server.

b.another name for the processor in a computer.

c.the part of your browser that runs JavaScript programs.

d. none of the above

 

 

  1. Which of the following is (are) operation(s) used with a data base?.

a. union.

b.join.

c. both of the above.

d. none of the above

 

 

 

 

  1. A computer virus .

a. is used by a web search engine (like Google) to search for data.

b. is a program that (among other things) makes copies of itself.

c. can only be transmitted via an e-mail message.

d. none of the above

 

 

  1. A loop in a program

a. is an instruction to repeatedly execute a list of statements.

b.might begin with the word while .

c. might begin with the word for

d. all of the above.

e. none of the above

 

 

  1. In a public key encryption scheme.

a. a key used in encryption/decryption is allowed to be publicly known.

b. allows the message to be public but the key is a actually a secrete.

c. was used by Julius Caesar.

d. none of the above

 

 

  1. The Chinese room argument

a. is supposed to show that computers can think.

b.is supposed to show that computers cannot think.

c. is supposed to show that computers can have emotions.

d. is supposed to show that computers cannot have emotions.

e. none of the above

 

 

  1. There are questions that people very much want the answer to and that there are known programs to answer the question

a. but, the program requires a computer with a nuclear power source.

b but, the program takes so long to finish that it is not practical.

c.but, the answer output is written in Egyptian hieroglyphics.

d. all of the above .

e. none of the above

 

Short Answer Questions: Although each question has lots of room for an answer, the answers are all short and do not need all that much room.

 

  1. What is bandwidth?

.
ANSWER: (10 pts)

 

  1. What is the output of the following JavaScript program? (The output is a number written in a window. What is the number?)

 

<script language="JavaScript">
var count = 7;

var score = 5;
if (count <= 5)

score = count*3;

else

score = count*2;
alert(score);
</script>

 

 

ANSWER: (10 pts)

 

  1. Describe the Turing test.
    ANSWER: (15 pts)

 

  1. What are session cookies used for?

(Hint: the answer is very short. If you write more than about five sentences, you are saying too much.)

ANSWER:. (15 pts)

 

  1. Write a complete JavaScript program that outputs 100 windows that each says "Hello". Each window has an "OK" button. When the button is clicked with your mouse the next Hello window is shown. Each Window has a number in addition to the word "Hello". The program does nothing else. Use a loop,
    ANSWER (15 pts)