Deck 1: Introduction to Programming and the Java Language
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/47
Play
Full screen (f)
Deck 1: Introduction to Programming and the Java Language
1
An Arithmetic Logic Unit (ALU) is also called:
A) an Integer Unit (IU).
B) a Local Area Network (LAN).
C) an Ethernet port.
D) a Floating Point Unit (FPU).
A) an Integer Unit (IU).
B) a Local Area Network (LAN).
C) an Ethernet port.
D) a Floating Point Unit (FPU).
A
2
Which of the following specifications provides details regarding the CPU?
A) 1 TB (terabyte) hard disk
B) 3 MB of cache memory
C) 3.4-GHz Intel Core i3-3240 processor
D) 8 GB of RAM (random access memory)
A) 1 TB (terabyte) hard disk
B) 3 MB of cache memory
C) 3.4-GHz Intel Core i3-3240 processor
D) 8 GB of RAM (random access memory)
C
3
A CPU rated at 2 GHz is capable of executing:
A) 2 billion instructions per second.
B) 0.5 billion instructions per second.
C) 2 MB of instructions.
D) 2 GB of data from the cache.
A) 2 billion instructions per second.
B) 0.5 billion instructions per second.
C) 2 MB of instructions.
D) 2 GB of data from the cache.
A
4
Machine language uses binary codes, or strings of As through Zs, to execute the instruction set of the CPU and to refer to memory addresses.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
5
Two forward slashes in a Java application indicate comments for information, not instructions to be executed.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
6
Memory chips contain __________, each containing a bit, which can store either a 0 or a 1.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
7
Every Java application must define a class and a main method. Execution of a Java application always begins with the code inside __________.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
8
Calculate the equivalent of the binary number 11011 in our decimal system.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
9
Rewrite 1010 1100 0111 0010 as a hexadecimal number.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
10
Which of the following is not a benefit of readable code?
A) It allows someone else to take over the maintenance of your program.
B) Well-designed code allows you and others to incorporate prewritten and pretested modules into your program.
C) Specifications for any program are continually changing.
D) It protects your job because others cannot copy your code.
A) It allows someone else to take over the maintenance of your program.
B) Well-designed code allows you and others to incorporate prewritten and pretested modules into your program.
C) Specifications for any program are continually changing.
D) It protects your job because others cannot copy your code.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
11
Each instruction in a computer program is executed using a Fetch-Decode-Execute cycle.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
12
The binary equivalent for the decimal number 12 is:
A) 1000
B) 1101
C) 1100
D) 1200
A) 1000
B) 1101
C) 1100
D) 1200
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
13
The hexadecimal system has only two possible digits.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
14
Which of the following criteria is used to choose a programming language?
A) Do you need the language to be portable?
B) What type of application is the project?
C) How is it compiled?
D) All of these are correct.
A) Do you need the language to be portable?
B) What type of application is the project?
C) How is it compiled?
D) All of these are correct.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
15
Which of the following is not a characteristic of Java?
A) The language is highly symbolic.
B) The language is somewhat portable among CPUs.
C) A Java program is compiled into JVM, and then JVM is interpreted by processor-independent byte codes.
D) The language can be specialized for applications.
A) The language is highly symbolic.
B) The language is somewhat portable among CPUs.
C) A Java program is compiled into JVM, and then JVM is interpreted by processor-independent byte codes.
D) The language can be specialized for applications.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
16
The indentation in pseudocode is used to:
A) make it easier to see the flow of control of the program.
B) identify the importance of the data.
C) signal that an algorithm is being used.
D) All of these are correct.
A) make it easier to see the flow of control of the program.
B) identify the importance of the data.
C) signal that an algorithm is being used.
D) All of these are correct.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
17
A programmer is required to specify the flow of control because the order in which instructions are executed by the computer is critical in programming.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
18
The hexadecimal number C1 is equivalent to which decimal number?
A) 13
B) 193
C) 161
D) 1
E) 121
A) 13
B) 193
C) 161
D) 1
E) 121
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
19
The hexadecimal number 8C is equivalent to which binary number?
A) 1100
B) 100012
C) 10001100
D) 110011
E) 11001000
A) 1100
B) 100012
C) 10001100
D) 110011
E) 11001000
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
20
The decimal value of the Unicode character A is:
A) 0.
B) 1.
C) 27.
D) 65.
E) 56.
A) 0.
B) 1.
C) 27.
D) 65.
E) 56.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
21
Boundary conditions are the values that sit on the boundaries of producing different output for a program.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
22
Linux is an example of application software.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
23
An operating system can schedule multiple programs to run during the same time interval.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
24
GHz stands for gigahertz.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
25
Java's syntax is similar to the syntax of the ______ programming language.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
26
The Java compiler converts Java source code into ________, which is a machine language for a virtual machine.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
27
_________ is a method for expressing a program's order of instructions in the English language.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
28
Which of the following is not a hexadecimal digit?
A) 0
B) 9
C) A
D) F
E) G
A) 0
B) 9
C) A
D) F
E) G
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
29
The binary number 1010 is equivalent to which hexadecimal number?
A) A
B) B
C) C
D) D
E) 9
A) A
B) B
C) C
D) D
E) 9
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
30
What does JVM stand for?
A) Java Virtual Memory
B) Job Virtual Machine
C) Java Virtual Mode
D) Java Veritable Machine
E) Java Virtual Machine
A) Java Virtual Memory
B) Job Virtual Machine
C) Java Virtual Mode
D) Java Veritable Machine
E) Java Virtual Machine
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
31
What is the name of the Java compiler?
A) java
B) javac
C) compiler
D) cc
E) jc
A) java
B) javac
C) compiler
D) cc
E) jc
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
32
When you successfully compile the file Hi.java, the file __________ is created.
A) Hi
B) Hi.javac
C) Hi.class
D) class
E) Hi.java
A) Hi
B) Hi.javac
C) Hi.class
D) class
E) Hi.java
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
33
You have successfully compiled the file Hi.java. How do you run the corresponding program from the command line?
A) java Hi.java
B) java Hi.class
C) java Hi
D) Hi
E) Hi.class
A) java Hi.java
B) java Hi.class
C) java Hi
D) Hi
E) Hi.class
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
34
Which company introduced Java?
A) Microsoft
B) IBM
C) Sun Microsystems (now Oracle)
D) AT&T
E) MIT
A) Microsoft
B) IBM
C) Sun Microsystems (now Oracle)
D) AT&T
E) MIT
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
35
Main memory is made of DRAM.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
36
A CPU rated at 1 GHz is capable of executing 1 million instructions per second.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
37
Cache memory is hardware.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
38
A byte contains _____ bits.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
39
DRAM stands for __________.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
40
Unicode is a world standard to represent __________.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
41
Compare the causes of compiler, run-time, and logic errors.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
42
How would you convert a binary number to a decimal number?
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
43
Give two examples of operating systems.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
44
List the digits and characters used in hexadecimal representation.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
45
What does it mean for a program to be readable?
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
46
Why would writing readable code help advance your career?
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
47
Convert 162 into a binary number. Show your work.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck