True/False
Indicate whether the sentence or statement is true
or false.
|
|
1.
|
ENIAC, one of the world's first computers, stands for Electronic Number Integrator and
Calculator.
|
|
2.
|
The
first computers in the 1940s and 1950s could handle multiple tasks at a time.
|
|
3.
|
Software consists of the programs that give the hardware useful
functionality.
|
|
4.
|
The
most common user interface input device is a microphone.
|
|
5.
|
The
contents of RAM are lost every time the computer is turned off.
|
|
6.
|
Java
uses the ASCII scheme to encode characters into binary notation.
|
|
7.
|
Mistakes found later in the software development life cycle are less expensive to
correct than those found earlier.
|
|
8.
|
Inheritance is the process of sharing methods and instance variables between a base
class and its subclasses.
|
|
9.
|
Computers normally represent numbers and data in memory in base 10, or
decimal.
|
|
10.
|
Programming in machine languages produces portable easy to maintain
code.
|
|
11.
|
Programming in assembly languages is never used by programmers today.
|
|
12.
|
Java
is the fastest growing programming language in the world.
|
|
13.
|
Java
runs faster than most modern programming languages.
|
|
14.
|
GUI
is an acronym for Graphical User Interface.
|
|
15.
|
Terminal I/O is no longer used, therefore familiarity with it is not
necessary.
|
|
16.
|
Colons (:) mark the end of each statement in a Java program.
|
|
17.
|
The
name of the text file with Java source code must match the name of the program with a .class
extension.
|
|
18.
|
The
javac command compiles a Java program.
|
|
19.
|
The
Java keyword new is used to instantiate an object.
|
|
20.
|
The
Java message System.out.print("hello") will place the cursor on the beginning
of the next line.
|
|
21.
|
The
period ( . ) in System.out is a method selector.
|
|
22.
|
Just-in-time compilation (JIT) translates Java byte code into machine language when
they are first encountered so that the next time the instruction is encountered it is executed fast
machine code, rather than being interpreted.
|
|
23.
|
Highly readable programs are not necessary, since programs are usually maintained by
the same programmer who originally wrote it.
|
|
24.
|
Semantics consists of the rules for combining words into statements.
|
|
25.
|
When
compared to natural languages, programming languages have large vocabularies.
|
|
26.
|
To
manipulate an object in Java a programmer will send the object a message.
|
|
27.
|
Primitive data types must be instantiated before being used.
|
|
28.
|
Both
the value of a variable and the type of data it contains can change during execution of a
program.
|
|
29.
|
It is
illegal to declare several variables in a single declaration, i.e. int a, b, c;
|
|
30.
|
The
division statement of 10/4 will be evaluated to 2.
|
|
31.
|
User
defined symbols are case sensitive in Java.
|
|
32.
|
The
purpose of comments in a program is to document every line of code.
|
|
33.
|
Sending a message to a variable representing an object before it has been instantiated
causes a "null pointer exception".
|
|
34.
|
Inserting debugging output statements into code is a useful way to find syntax
errors.
|
Multiple Choice
Identify the
letter of the choice that best completes the statement or answers the question.
|
|
35.
|
The
speed of IBM business computers in the 1950s was about: a. | 800-megahertz | c. | 1-hertz | b. | 50-megahertz | d. | 1-megahertz | | | | |
|
|
36.
|
In
which decade did PCs first appear in great numbers? a. | 1970s | c. | 1960s | b. | 1980s | d. | 1990s | | | | |
|
|
37.
|
How
many bits are there in a byte?
|
|
38.
|
Which
of the following is NOT one of the six major subsystems of a PC? a. | Speakers | c. | RAM | b. | CPU | d. | User Interface | | | | |
|
|
39.
|
Which
PC component does the work of the computer? a. | Internal Memory | c. | CPU | b. | Monitor | d. | Modem | | | | |
|
|
40.
|
Which
of the following software is System Software? a. | Word Processor | c. | Database System | b. | Compiler | d. | Web
Browser | | | | |
|
|
41.
|
110
base 2 is equivalent to what base 10 number?
|
|
42.
|
A
byte's location in memory is called its: a. | variable | c. | number | b. | address | d. | value | | | | |
|
|
43.
|
Which
of the following is NOT a phase of the waterfall model of the software development life
cycle? a. | Interaction | c. | Maintenance | b. | Analysis | d. | Design | | | | |
|
|
44.
|
Which
phase of the software development life cycle is the most expensive? a. | analysis | c. | integration | b. | design | d. | maintenance | | | | |
|
|
45.
|
What
defines or describes a list of data resources and rules of behavior? a. | method
| c. | class
| b. | variable | d. | address | | | | |
|
|
46.
|
In
Object Oriented Programming objects work together by asking each other for services by sending what
to each other? a. | variables | c. | addresses | b. | messages | d. | methods | | | | |
|
|
47.
|
When
different types of objects respond to the same message differently, it is referred to
as: a. | encapsulation | c. | information
hiding | b. | inheritance | d. | polymorphism | | | | |
|
|
48.
|
Combining the description of resources and behaviors into a single software entity is
called: a. | encapsulation | c. | polymorphism | b. | inheritance | d. | information hiding | | | | |
|
|
49.
|
Java
incorporates the good features of which two programming languages, while omitting the less desirable
ones? a. | C++,
COBOL | c. | C++,
Smalltalk | b. | Visual Basic, Smalltalk | d. | COBOL, Visual Basic | | | | |
|
|
50.
|
It is
easy for a programmer who knows what language to learn Java? a. | Assembly
Language | c. | Scheme
| b. | Lisp | d. | C++ | | | | |
|
|
51.
|
The
Java compiler translates Java source code into: a. | Java byte code | c. | assembly language | b. | machine
language | d. | C++ | | | | |
|
|
52.
|
To
run Java byte code on a particular computer you must install what on that computer? a. | Java
compiler | c. | Java Virtual
Machine | b. | Word processor | d. | Java Applet | | | | |
|
|
53.
|
Small
Java programs downloaded from web pages are called: a. | threads | c. | servlets | b. | GUI's | d. | applets | | | | |
|
|
54.
|
What
is the name of an object that knows how to display or print characters in a terminal
window? a. | println | c. | monitor | b. | System.out | d. | HelloWorld | | | | |
|
|
55.
|
What
character is the method selector operator in Java? a. | period ( .
) | c. | semicolon ( ;
) | b. | comma ( ,
) | d. | colon ( :
) | | | | |
|
|
56.
|
What
are the three steps to entering a program into a computer and running it? a. | Edit, Compile,
Debug | c. | Edit, Debug,
Execute | b. | Compile, Interpret, Execute | d. | Edit, Compile, Execute | | | | |
|
|
57.
|
Which
of the following is NOT an integrated Development Environment (IDE)? a. | Visual
Cafe | c. | UNIX command
line | b. | Visual
J++ | d. | JBuilder | | | | |
|
|
58.
|
What
command runs a Java program that has already been compiled? a. | javac | c. | run | b. | javar | d. | java | | | | |
|
|
59.
|
The
statement telling the Java compiler where to find a complete specification of a class
is: a. | new | c. | class
| b. | import | d. | void | | | | |
|
|
60.
|
The
Java compiler will ignore everything after what symbol?
|
|
61.
|
What
is the Java mechanism for repeating a group of statements? a. | for
loop | c. | import
statement | b. | TurtleGraphics | d. | variable | | | | |
|
|
62.
|
What
is the set of all the words and symbols in the Java programming language? a. | Program | c. | Syntax | b. | Vocabulary | d. | Semantics | | | | |
|
|
63.
|
Of
the following, which is NOT a difference between natural languages and programming
languages? a. | Size | c. | Literalness | b. | Semantics | d. | Rigidity | | | | |
|
|
64.
|
Which
of the following is NOT a primitive data type in Java? a. | integer | c. | boolean | b. | string | d. | character | | | | |
|
|
65.
|
How
many bytes does the primitive data type double require?
|
|
66.
|
How
many numeric data types does Java include?
|
|
67.
|
Which
of the following is correct Java for writing exponential, or scientific notation? a. | 3.14 | c. | 5.124E5 | b. | 5 x 10 -1 | d. | none of the above | | | | |
|
|
68.
|
Which
keyword in Java declares a variable whose value cannot change? a. | final | c. | constant | b. | const | d. | new | | | | |
|
|
69.
|
Which
of the following operators has the highest precedence? a. | Assignment ( =
) | c. | Method Selector
( . ) | b. | Unary Plus ( + ) | d. | Subtraction ( - ) | | | | |
|
|
70.
|
The
expression 3 + 2 * 5 - 1 yields:
|
|
71.
|
Which
of the following mixed-mode arithmetic expressions yields 8.0? a. | 5 / 2 *
4.0 | c. | 5.0 / 2 *
4 | b. | 5 / 2.0 *
4 | d. | 5.0 / 2.0 *
4 | | | | |
|
|
72.
|
What
is the string concatenation operator?
|
|
73.
|
What
string results from the expression "1 + 2 = " + 1 + 2 a. | "3 =
3" | c. | "1 + 2 =
12" | b. | "1 + 2 = 3" | d. | "3 = 12" | | | | |
|
|
74.
|
Which
of the following is the escape sequence for a newline?
|
|
75.
|
Which
String class method returns a string's length? a. | size() | c. | stringLength() | b. | length() | d. | width() | | | | |
|
|
76.
|
What
keyword indicates a method does not return a value? a. | double
| c. | void | b. | final | d. | null | | | | |
|
|
77.
|
Which
of the following user-defined symbols is invalid? a. | _name | c. | $income | b. | number3 | d. | 9innings | | | | |
|
|
78.
|
In
the statement import x.y.z; what does the x represent? a. | the name of a
class | c. | a
variable | b. | a subsection of the package | d. | the name of the overall package | | | | |
|
|
79.
|
Which
type of error occurs when an instruction tries to divide by 0? a. | Logic
error | c. | Run-time
error | b. | Syntax error | d. | No error | | | | |
|
Completion
Complete each sentence or
statement.
|
|
80.
|
__________ consists of the physical devices that you see on your
desktop.
|
|
81.
|
A
______ is the smallest unit of information processed by a computer and consists of a single 0 or
1.
|
|
82.
|
Humans normally represent numbers in base ____.
|
|
83.
|
The
implementation phase of the software development life cycle is also known as the _________
phase.
|
|
84.
|
The
principle of providing access to services but not to data resources is called ____________
_________.
|
|
85.
|
A
_________ is a process that can run concurrently with other processes.
|
|
86.
|
A
program is a sequence of instructions or, ___________ _______ for a computer.
|
|
87.
|
Values in the parentheses following a message to an object are called
_______________.
|
|
88.
|
Mistakes in source code detected by the compiler are called _________
errors.
|
|
89.
|
A
_____________ names a location in RAM in which a value can be stored.
|
|
90.
|
_____________ defines the rules for interpreting the meaning of
statements.
|
|
91.
|
A
_________ is an item whose value can change during the execution of a program.
|
|
92.
|
A
programmer can collect a class or group of classes in a ____________.
|
|
93.
|
The
KeyboardReader class method ______________ returns the entire input line.
|
|
94.
|
A(n)
_________ is a step-by-step procedure for solving a problem.
|
|
95.
|
_________ errors occur when the instruction does not do what was
intended.
|
Short Answer
|
|
96.
|
Name
four Java primitive data types.
|
|
97.
|
Give
an example of a string literal and a floating point literal.
|
|
98.
|
Write
a variable declaration statement for an integer value with the name
employeeNumber
|
|
99.
|
What
does the modulus operator ( % ) yield?
|
|
100.
|
Casting the floating point number 3.8 to an integer using (int)3.8,
yields what value?
|
|
101.
|
What
comprises a methods signature?
|
|
102.
|
Name
the three types of programming errors.
|