TU S
Java Programming
10th Edition
VI U
T
A_V
SOLUTIONS
MIA
& ANSWER
E_DA
GUIDE
CPO
PNR
Joyce Farrell
NOO
Comprehensive Solutions and Answer Guide
VIESS
for Instructors and Students
||| ||| || ||| || | || ||| | || ||| |
DE?U
9780357673423
© Joyce Farrell. All rights reserved. Reproduction or distribution
without permission is prohibited.
R?
© MEDGEEK
,TU S
TABLE OF CONTENTS
Solutions and Answer Guide – Java Programming (10th Edition)
Author: Joyce Farrell
ISBN: 9780357673423
VI U
PART I: FUNDAMENTALS OF JAVA PROGRAMMING
T
Chapter 1: Creating Java Programs
A_V
Chapter 2: Using Data
Chapter 3: Using Methods
Chapter 4: Using Classes and Objects
PART II: PROGRAM LOGIC AND CONTROL STRUCTURES
MIA
Chapter 5: Making Decisions
Chapter 6: Looping
Chapter 7: Characters, Strings, and the StringBuilder
E_DA
Chapter 8: Arrays
PART III: ADVANCED OBJECT-ORIENTED CONCEPTS
Chapter 9: Inheritance and Interfaces
CPO
Chapter 10: Exception Handling
PART IV: DATA STREAMS AND RECURSION
PNR
Chapter 11: File Input and Output
Chapter 12: Recursion
PART V: DATA STRUCTURES AND GUI DEVELOPMENT
NOO
Chapter 13: Collections and Generics
Chapter 14: Introduction to Swing Components
VIESS
DE?U
R?
, Solution and Answer Guide: Farrell, Java Programming 10e, [978-035-767-3423], Chapter 1: Creating Java Programs
TU S
Solution and Answer Guide
Farrell, Java Programming 10e, [978-035-767-3423], Chapter 1: Creating Java Programs
Table of Contents
VI U
Review Questions Answers ............................................................................................ 1
T
Programming Exercises Solutions ..................................................................................7
Debugging Exercises Solutions .................................................................................... 13
A_V
Game Zone Solutions .................................................................................................... 15
Case Problems Solutions .............................................................................................. 17
MIA
Review Questions Answers
1. The most basic circuitry-level computer language is ____________.
E_DA
a. machine language
b. Java
c. high-level language
CPO
d. C++
Answer: a
Feedback:
PNR
The most basic circuitry-level computer language is machine language. Machine language, or
machine code, is the most basic set of instructions a computer can execute. Java and C++
are both high-level languages and are the opposite of circuitry-level computer language.
NOO
2. Languages that let you use an easily understood vocabulary of descriptive terms, such as read, write,
or add, are known as ____________languages.
a. procedural
VIESS
b. high-level
c. machine
d. object-oriented
DE?U
Answer: b
Feedback:
High-level languages use English-like terms; Java is an example of a high-level language.
Procedural languages are those that run by executing a series of procedures or methods.
R?
© 2022 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible 1
website, in whole or in part.
, Solution and Answer Guide: Farrell, Java Programming 10e, [978-035-767-3423], Chapter 1: Creating Java Programs
TU S
Machine-level languages do not use English-like terms; they use 1s and 0s. Object-oriented
languages are run by declaring and using objects that contain data and methods.
3. The rules of a programming language constitute its ____________.
a. syntax
VI U
b. logic
T
c. format
A_V
d. objects
Answer: a
Feedback:
MIA
The rules of a programming language constitute its syntax.
4. A ____________ translates high-level language statements into machine code.
a. programmer
E_DA
b. syntax detector
c. compiler
d. decipherer
CPO
Answer: c
Feedback:
PNR
A compiler translates high-level language statements into machine code. A programmer
writes high-level language statements but does not translate them. “Syntax detector” and
“decipherer” are not terms used in programming.
5. Named computer memory locations are called ____________.
NOO
a. compilers
b. variables
VIESS
c. addresses
d. appellations
Answer: b
DE?U
Feedback:
Named computer memory locations are variables. Compilers translate programming
statements into machine language; they are not memory locations. Addresses are unnamed
computer memory locations. “Appellations” is not a term used in programming.
6. The individual operations used in a computer program are often grouped into logical units called
R?
© 2022 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible 2
website, in whole or in part.