@szCreating @szJava @szPrograms
Solution and Answer Guide
Farrell, Java Programming 10e, [978-035-767-3423], Chapter 1: Creating Java Programs
Table of Contents
Review Questions Answers ........................................................................................................................... 1
Programming Exercises Solutions ................................................................................................................. 7
Debugging Exercises Solutions ................................................................................................................... 13
Game Zone Solutions .................................................................................................................................. 14
Case Problems Solutions ............................................................................................................................. 16
Review Questions Answers
1. The most basic circuitry-level computer language is .
a. machine language
b. Java
c. high-level language
d. C++
Answer: a
Feedback:
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.
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
b. high-level
c. machine
d. object-oriented
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. 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.
© @sz2022 @szCengage. @szAll @szRights @szReserved. @szMay @sznot @szbe @szscanned, @szcopied @szor @szduplicated, @szor 1
posted@sz
website,
@sz into@sz@sz
@sz a @szpublicly
whole @szor @szaccessible
@szin @szpart. TestBanksAdept
, Solution @szand @szAnswer @szGuide: @szFarrell, @szJava @szProgramming @sz10e, @sz[978-035-767-3423], @szChapter @sz1:
@szCreating @szJava @szPrograms
3. The @szrules @szof @sza @szprogramming @szlanguage @szconstitute @szits @sz .
a. syntax
b. logic
c. format
d. objects
Answer: @sza
Feedback:
The @szrules @szof @sza @szprogramming @szlanguage @szconstitute @szits @szsyntax.
4. A @sz translates @szhigh-level @szlanguage @szstatements @szinto @szmachine @szcode.
a. programmer
b. syntax @szdetector
c. compiler
d. decipherer
Answer: @szc
Feedback:
A @szcompiler @sztranslates @szhigh-level @szlanguage @szstatements @szinto @szmachine @szcode. @szA
@szprogrammer @szwrites @szhigh- @szlevel @szlanguage @szstatements @szbut @szdoes @sznot @sztranslate @szthem.
@sz“Syntax @szdetector” @szand @sz“decipherer” @szare @sznot @szterms @szused @szin @szprogramming.
5. Named @szcomputer @szmemory @szlocations @szare @szcalled @sz .
a. compilers
b. variables
c. addresses
d. appellations
Answer: @szb
Feedback:
Named @szcomputer @szmemory @szlocations @szare @szvariables. @szCompilers @sztranslate @szprogramming
@szstatements @szinto @szmachine @szlanguage; @szthey @szare @sznot @szmemory @szlocations. @szAddresses @szare
@szunnamed @szcomputer @szmemory @szlocations. @sz“Appellations” @szis @sznot @sza @szterm @szused @szin
@szprogramming.
6. The @szindividual @szoperations @szused @szin @sza @szcomputer @szprogram @szare @szoften @szgrouped @szinto @szlogical @szunits @szcalled
.
a. procedures
b. variables
© @sz2022 @szCengage. @szAll @szRights @szReserved. @szMay @sznot @szbe @szscanned, @szcopied @szor @szduplicated, @szor 2
posted@sz
website,
@sz into@sz@sz
@sz a @szpublicly
whole @szor @szaccessible
@szin @szpart. TestBanksAdept
, Solution @szand @szAnswer @szGuide: @szFarrell, @szJava @szProgramming @sz10e, @sz[978-035-767-3423], @szChapter @sz1:
@szCreating @szJava @szPrograms
c. constants
d. logistics
Answer: @sza
Feedback:
The @szindividual @szoperations @szused @szin @sza @szcomputer @szprogram @szare @szoften @szgrouped @szinto
@szlogical @szunits @szcalled @szprocedures. @szVariables @szare @sznamed @szmemory @szlocations, @szand
@szconstants @szare @szvalues @szthat @szdo @sznot @szchange; @szthey @szare @sznot @szgroups @szof @szlogical
@szoperations. @sz“Logistics” @szis @sznot @sza @szterm @szcommonly @szused @szin @szprogramming.
7. Envisioning @szprogram @szcomponents @szas @szobjects @szthat @szare @szsimilar @szto @szconcrete @szobjects @szin @szthe
real @szworld @szis @szthe @szhallmark @szof @sz
@sz .
a. command-line @szoperating @szsystems
b. procedural @szprogramming
c. object-oriented @ s z programming
d. machine @szlanguages
Answer: @szc
Feedback:
Envisioning @szprogram @szcomponents @szas @szobjects @szthat @szare @szsimilar @szto @szconcrete @szobjects @szin
@szthe @szreal @szworld @szis @szthe @szhallmark @szof @szobject-oriented @szprogramming.
8. The @szvalues @szof @szan @szobject’s @szattributes @szare @szknown @szas @szits @sz .
a. state
b. orientation
c. methods
d. condition
Answer: @sza
Feedback:
The @szvalues @szof @szan @szobject’s @szattributes @szare @szknown @szas @szits @szstate.
9. An @szinstance @szof @sza @szclass @szis @sza(n) @sz .
a. method
b. procedure
c. object
d. case
Answer: @szc
© @sz2022 @szCengage. @szAll @szRights @szReserved. @szMay @sznot @szbe @szscanned, @szcopied @szor @szduplicated, @szor 3
posted@sz
website,
@sz into@sz@sz
@sz a @szpublicly
whole @szor @szaccessible
@szin @szpart. TestBanksAdept
, Solution @szand @szAnswer @szGuide: @szFarrell, @szJava @szProgramming @sz10e, @sz[978-035-767-3423], @szChapter @sz1:
@szCreating @szJava @szPrograms
Feedback:
An @szinstance @szof @sza @szclass @szis @szan @szobject.
10. Java @szis @szarchitecturally @sz .
a. neutral
b. oriented
c. specific
d. abstract
Answer: @sza
Feedback:
Java @szis @szarchitecturally @szneutral.
11. You @szmust @szcompile @szclasses @szwritten @szin @szJava @szinto @sz .
a. bytecode
b. source @szcode
c. Javadoc @szstatements
d. object @szcode
Answer: @sza
Feedback:
You @szmust @szcompile @szclasses @szwritten @szin @szJava @szinto @szbytecode. @ s z Source @szcode @szis @szthe
@szhigh-level @szprogramming @szstatements. @szJavadoc @szstatements @szare @sza @sztype @szof @szcomment
@szused @szfor @szdocumentation. @szObject @szcode @szis @szthe @szlow- @szlevel @szcode @szproduced @szwhen @sza
@szcompiler @sztranslates @szhigh-level @szcode.
12. All @szJava @szprogramming @szstatements @szmust @szend @szwith @sza @sz .
a. period
b. comma
c. closing @szparenthesis
d. semicolon
Answer: @szd
Feedback:
All @szJava @szprogramming @szstatements @szmust @szend @szwith @sza @szsemicolon.
13. Arguments @szto @szmethods @szalways @szappear @szwithin @sz .
a. parentheses
b. double @szquotation @szmarks
© @sz2022 @szCengage. @szAll @szRights @szReserved. @szMay @sznot @szbe @szscanned, @szcopied @szor @szduplicated, @szor 4
posted@sz
website,
@sz into@sz@sz
@sz a @szpublicly
whole @szor @szaccessible
@szin @szpart. TestBanksAdept