TEST BANK FOR
INTRODUCTION TO
JAVA
PROGRAMMING
AND DATA
STRUCTURES
COMPREHENSIVE
VERSION, 12TH
EDITION, Y. DANIEL
LIANG
, Chapter 1 Introduction to Computers, Programs, and Java
Section 1.2 What is a Computer?
1. is the physical aspect of the computer that can be seen.
a. Hardware
b. Software
c. Operating system
d. Application program
Key:a See the first paragraph in Section 1.2.
#
Section 1.2.1 What is a Computer?
2. is the brain of a computer.
a. Hardware
b. CPU
c. Memory
d. Disk
Key:b See the first paragraph in Section 1.2.1.
#
3. The speed of the CPU may be measured in .
a. megabytes
b. gigabytes
c. megahertz
d. gigahertz
Key:cd See the third paragraph in Section 1.2.1. 1 megahertz equals 1 million pulses per second and 1 gigahertz is
1000 megahertz.
#
Section 1.2.2 Bits and Bytes
4. Why do computers use zeros and ones?
a. because combinations of zeros and ones can represent any numbers and characters.
b. because digital devices have two stable states and it is natural to use one state for 0 and the other for 1.
c. because binary numbers are simplest.
d. because binary numbers are the bases upon which all other number systems are built.
Key:b See the second paragraph in Section 1.2.2.
#
5. One byte has bits.
a. 4
b. 8
c. 12
d. 16
Key:b See the thrid paragraph in Section 1.2.2.
#
5. One gigabyte is approximately bytes.
a. 1 million
b. 10 million
c. 1 billion
d. 1 trillion
Key:c See the fifth paragraph in Section 1.2.2.
© 2020 Pearson Education, Inc., Hoboken, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist.
,#
Section 1.2.3 Memory l21 l21
6. A program and its data must be moved into the computer's
l21 l21 l21 l21 l21 l2 1 l21 l21 l21 l21 before they can be executed by the CPU.
l21 l21 l21 l21 l21 l21 l21
a. memory
b. hard disk l21
c. CPU
d. CD-ROM
Key:a See the first paragraph in Section 1.2.3.
l 21 l21 l21 l21 l21 l21 l21
#
Section 1.2.4 Storage Devices l21 l21 l21
6. A computer's
l21 l21 is volatile; that is, any information stored in it is lost when the system's power is turned off. l21 l21 l21 l21 l21 l21 l 21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21
a. memory
b. hard disk l21
c. flash stick l21
d. CD-ROM
Key:a See the first paragraph in Section 1.2.4.
l 21 l21 l21 l21 l21 l21 l21
#
6. Which of the following are storage devices?
l21 l21 l21 l21 l21 l21
a. portable disk l21
b. hard disk l21
c. flash stick l21
d. CD-ROM
Key:abcd See the second paragraph in Section 1.2.4.
l21 l21 l21 l21 l21 l21 l21
#
Section 1.2.5 Input and Output Devices
l21 l21 l21 l21 l21
7. The specifies the number of pixels in horizontal and vertical dimensions of the display device. l21 l21 l21 l21 l21 l21 l21 l 21 l21 l21 l21 l21 l21
a. screen resolution l21
b. pixel
c. dot pitch l21
d. monitor
Key:a See the third last paragraph in Section 1.2.5.
l 21 l21 l21 l21 l21 l21 l21 l21
#
Section 1.2.6 Communications Devices
l21 l21 l21
7. is a device to connect a computer to a local area network (LAN). l21 l21 l21 l21 l21 l21 l21 l21 l21 l2 1 l21 l21
a. Regular modem l21
b. DSL
c. Cable modem l21
d. NIC
Key:d See the bullet items in Section 1.2.6.
l21 l 21 l21 l21 l21 l21 l21
#
Section 1.3 Program Languages l21 l21 l21
8. are instructions to the computer. l21 l21 l21 l21
a. Hardware
b. Software
c. Programs
d. Keyboards
Key:bc See the Key Point in Section 1.3.
l21 l21 l21 l21 l21 l21 l21
l21 #
© 2020 Pearson Education, Inc., Hoboken, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist.
, 9. Computer can execute the code in l21 l21 l21 l21 l21 .
a. machine language l21
b. assembly language l21
c. high-level language l21
d. none of the above l21 l21 l21
Key:a See the first paragraph in Section 1.3.1.
l 21 l21 l21 l21 l21 l21 l21
#
10. translates high-level language program into machine language program. l21 l21 l21 l 21 l21 l21 l21
a. An assembler l21
b. A compiler l21
c. CPU
d. The operating system l21 l21
Key:b See the first paragraph after Table 1.1 in Section 1.3.3.
l21 l21 l21 l21 l21 l21 l21 l21 l21 l21
#
Section 1.4 Operating Systems l21 l21 l21
11. is an operating system. l21 l21 l21
a. Java
b. C++
c. Windows
d. Visual Basic l21
e. Ada
Key:c See the first paragraph in Section 1.4.
l 21 l21 l21 l21 l21 l21 l21
#
12. is a program that runs on a computer to manage and control a computer's activities. l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21
a. Operating system l21
b. Java
c. Modem
d. Interpreter
e. Compiler
Key:a See the first paragraph in Section 1.4.
l 21 l21 l21 l21 l21 l21 l21
#
Section 1.5 Java, World Wide Web, and Beyond
l21 l21 l21 l21 l21 l21 l2 1
14. Due to security reasons, Java l21 cannot run from a Web browser in the new version of Java.
l21 l21 l21 l21 l 21 l 21 l21 l21 l21 l21 l21 l21 l21 l 21
a. applications
b. applets
c. servlets
d. Micro Edition programs l 21 l2 1
Key:b See the last paragraph in Section 1.5.
l21 l21 l21 l2 1 l21 l21 l21
#
15. l21 is not an object-oriented programming language.
l21 l 21 l21 l21 l21
a. Java
b. C++
c. C
d. C#
e. Python
Key:c See Table 1.1 in Section 1.3.1.
l21 l21 l21 l21 l21 l21
#
16. l21 is interpreted.
l21
© 2020 Pearson Education, Inc., Hoboken, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist.
l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21
INTRODUCTION TO
JAVA
PROGRAMMING
AND DATA
STRUCTURES
COMPREHENSIVE
VERSION, 12TH
EDITION, Y. DANIEL
LIANG
, Chapter 1 Introduction to Computers, Programs, and Java
Section 1.2 What is a Computer?
1. is the physical aspect of the computer that can be seen.
a. Hardware
b. Software
c. Operating system
d. Application program
Key:a See the first paragraph in Section 1.2.
#
Section 1.2.1 What is a Computer?
2. is the brain of a computer.
a. Hardware
b. CPU
c. Memory
d. Disk
Key:b See the first paragraph in Section 1.2.1.
#
3. The speed of the CPU may be measured in .
a. megabytes
b. gigabytes
c. megahertz
d. gigahertz
Key:cd See the third paragraph in Section 1.2.1. 1 megahertz equals 1 million pulses per second and 1 gigahertz is
1000 megahertz.
#
Section 1.2.2 Bits and Bytes
4. Why do computers use zeros and ones?
a. because combinations of zeros and ones can represent any numbers and characters.
b. because digital devices have two stable states and it is natural to use one state for 0 and the other for 1.
c. because binary numbers are simplest.
d. because binary numbers are the bases upon which all other number systems are built.
Key:b See the second paragraph in Section 1.2.2.
#
5. One byte has bits.
a. 4
b. 8
c. 12
d. 16
Key:b See the thrid paragraph in Section 1.2.2.
#
5. One gigabyte is approximately bytes.
a. 1 million
b. 10 million
c. 1 billion
d. 1 trillion
Key:c See the fifth paragraph in Section 1.2.2.
© 2020 Pearson Education, Inc., Hoboken, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist.
,#
Section 1.2.3 Memory l21 l21
6. A program and its data must be moved into the computer's
l21 l21 l21 l21 l21 l2 1 l21 l21 l21 l21 before they can be executed by the CPU.
l21 l21 l21 l21 l21 l21 l21
a. memory
b. hard disk l21
c. CPU
d. CD-ROM
Key:a See the first paragraph in Section 1.2.3.
l 21 l21 l21 l21 l21 l21 l21
#
Section 1.2.4 Storage Devices l21 l21 l21
6. A computer's
l21 l21 is volatile; that is, any information stored in it is lost when the system's power is turned off. l21 l21 l21 l21 l21 l21 l 21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21
a. memory
b. hard disk l21
c. flash stick l21
d. CD-ROM
Key:a See the first paragraph in Section 1.2.4.
l 21 l21 l21 l21 l21 l21 l21
#
6. Which of the following are storage devices?
l21 l21 l21 l21 l21 l21
a. portable disk l21
b. hard disk l21
c. flash stick l21
d. CD-ROM
Key:abcd See the second paragraph in Section 1.2.4.
l21 l21 l21 l21 l21 l21 l21
#
Section 1.2.5 Input and Output Devices
l21 l21 l21 l21 l21
7. The specifies the number of pixels in horizontal and vertical dimensions of the display device. l21 l21 l21 l21 l21 l21 l21 l 21 l21 l21 l21 l21 l21
a. screen resolution l21
b. pixel
c. dot pitch l21
d. monitor
Key:a See the third last paragraph in Section 1.2.5.
l 21 l21 l21 l21 l21 l21 l21 l21
#
Section 1.2.6 Communications Devices
l21 l21 l21
7. is a device to connect a computer to a local area network (LAN). l21 l21 l21 l21 l21 l21 l21 l21 l21 l2 1 l21 l21
a. Regular modem l21
b. DSL
c. Cable modem l21
d. NIC
Key:d See the bullet items in Section 1.2.6.
l21 l 21 l21 l21 l21 l21 l21
#
Section 1.3 Program Languages l21 l21 l21
8. are instructions to the computer. l21 l21 l21 l21
a. Hardware
b. Software
c. Programs
d. Keyboards
Key:bc See the Key Point in Section 1.3.
l21 l21 l21 l21 l21 l21 l21
l21 #
© 2020 Pearson Education, Inc., Hoboken, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist.
, 9. Computer can execute the code in l21 l21 l21 l21 l21 .
a. machine language l21
b. assembly language l21
c. high-level language l21
d. none of the above l21 l21 l21
Key:a See the first paragraph in Section 1.3.1.
l 21 l21 l21 l21 l21 l21 l21
#
10. translates high-level language program into machine language program. l21 l21 l21 l 21 l21 l21 l21
a. An assembler l21
b. A compiler l21
c. CPU
d. The operating system l21 l21
Key:b See the first paragraph after Table 1.1 in Section 1.3.3.
l21 l21 l21 l21 l21 l21 l21 l21 l21 l21
#
Section 1.4 Operating Systems l21 l21 l21
11. is an operating system. l21 l21 l21
a. Java
b. C++
c. Windows
d. Visual Basic l21
e. Ada
Key:c See the first paragraph in Section 1.4.
l 21 l21 l21 l21 l21 l21 l21
#
12. is a program that runs on a computer to manage and control a computer's activities. l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21
a. Operating system l21
b. Java
c. Modem
d. Interpreter
e. Compiler
Key:a See the first paragraph in Section 1.4.
l 21 l21 l21 l21 l21 l21 l21
#
Section 1.5 Java, World Wide Web, and Beyond
l21 l21 l21 l21 l21 l21 l2 1
14. Due to security reasons, Java l21 cannot run from a Web browser in the new version of Java.
l21 l21 l21 l21 l 21 l 21 l21 l21 l21 l21 l21 l21 l21 l 21
a. applications
b. applets
c. servlets
d. Micro Edition programs l 21 l2 1
Key:b See the last paragraph in Section 1.5.
l21 l21 l21 l2 1 l21 l21 l21
#
15. l21 is not an object-oriented programming language.
l21 l 21 l21 l21 l21
a. Java
b. C++
c. C
d. C#
e. Python
Key:c See Table 1.1 in Section 1.3.1.
l21 l21 l21 l21 l21 l21
#
16. l21 is interpreted.
l21
© 2020 Pearson Education, Inc., Hoboken, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist.
l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21 l21