http://www.carnegietech.org/search?keyword=MCQ&course=SSD1 According to the URL, the names of the two successful controls in the submitted form are (a) search and HTTP (b) search and GET
(c) MCQ and SSD1 (d) keyword and course
3. The action attribute of an HTML FORM element determines
(a) the network protocol used to submit the data of the form (b) a list of form controls to submit
(c) the encoding standard used to encode the data of the form (d) the processing agent to which the data of the form is submitted 4. A Java servlet is a program that typically runs inside which of
the following?
I. II.
A Web server A Web browser
(a) II only (b) None
(c) I only (d) I and II only
5. In HTML, which of the following is an attribute of the INPUT element that can be used to specify the initial value of a single-line
text-input control?
(a) value
(b) initial
(c) default (d) name
6. Which of the following HTML INPUT elements will result in a check
box that appears initially in a checked state?
I. II. III.
(a) I, II, and III (b) III only
(c) II only
(d) II and III only
7. Java servlets enable _____ content at the _____ of the
implementation of an application.
(a) dynamic, client side (b) dynamic, server side
(c) static, client side (d) static, server side
8. Through a _____, Java servlets respond _____ to requests from clients.
(a) server-push mechanism, indirectly (b) Web server, indirectly
(c) Web server, directly
(d) server-push mechanism, directly
9. Web servers typically use _____ to distinguish between requests from multiple clients.
(a) aliases (b) servlets
(c) META tags (d) cookies
10. Typically, a request from a client browser is forwarded to a
servlet by a
(a) cookie
(b) response header
(c) Web server (d) request header
Take Assessment: Multiple-Choice Quiz 4 1. Consider the following class.
public class AppletClass extends java.applet.Applet {
public void paint(java.awt.Graphics g)
g.drawString(\
} }
Before compiling this class, the Java compiler requires that it be stored with which of the following names? (a) Applet.java (b) AppletClass.java
(c) AppletClass.applet
(d) Any filename with the extension \
2. In Java programming, a programmer creates _____ files, and then
a compiler translates them to _____ files. (a) source, HTML (b) HTML, byte code
(c) source, byte code (d) byte code, source
3. When compiling a Java program that contains syntax errors, the compiler will always
(a) fix the syntax errors and complete the compilation
(b) fail to complete the compilation and report a guess of what and where the errors are
(c) ignore the syntax errors and create a compiled program without the lines containing errors
(d) fail to complete the compilation and report the exact location of each error
4. When programming a Java applet, a programmer creates a(n) _____ file, which a Java compiler translates into a(n) _____ file.
(a) source code, HTML (b) bytecode, source code
(c) source code, bytecode (d) HTML, bytecode
5. Upon compilation, the source code of a Java class MyClass will be stored in the file _____, and the corresponding byte code will be
stored in the file _____.
(a) MyClass.class, MyClass.java
(b) MyClass.java, MyClass.class (c) MyClass.java, MyClass.exe
(d) MyClass.class, MyClass.exe
6. Which of the following statements is true of the process of
programming?
(a) Most of the time spent in programming is usually spent planning the solution to a problem.
(b) The best way to program is to begin coding immediately, and
then to follow up by testing.
(c) Programming is synonymous with coding.
(d) Programming can be made easier by dividing a larger problem into smaller pieces.
7. When a Java class is designed, which of the following is a part (are parts) of the planning stage?
I. II. III.
Deciding how to display the results Writing a problem definition
Identifying the data needed to solve the problem
(a) I and II (b) II only
(c) I and III (d) II and III
8. Programming involves four general phases that the programmer moves
into and out of during the development of a program. The order in
which the programmer moves through these phases is generally which of the following?
(a) defining/redefining --> planning --> implementing/coding --> testing/analyzing
(b) There is no defined order. The programmer moves into and out of one of the various four phases as dictated by circumstance and situation while writing the program.