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