Starting Out with Java From Control Structures through Objects 5th Edition Tony Gaddis Test Bank download
Starting Out with Java From Control Structures through Objects 5th Edition Tony Gaddis Test Bank download
https://testbankdeal.com/product/starting-out-with-java-from-
control-structures-through-objects-5th-edition-tony-gaddis-test-
bank/
https://testbankdeal.com/product/starting-out-with-java-from-control-
structures-through-objects-5th-edition-tony-gaddis-solutions-manual/
https://testbankdeal.com/product/starting-out-with-c-from-control-
structures-through-objects-7th-edition-tony-gaddis-test-bank/
https://testbankdeal.com/product/starting-out-with-java-from-control-
structures-through-objects-6th-edition-gaddis-test-bank/
https://testbankdeal.com/product/business-data-networks-and-
security-11th-edition-panko-test-bank/
Microsoft Access 2013 Comprehensive 1st Edition Pratt Test
Bank
https://testbankdeal.com/product/microsoft-
access-2013-comprehensive-1st-edition-pratt-test-bank/
https://testbankdeal.com/product/human-communication-4th-edition-
pearson-test-bank/
https://testbankdeal.com/product/accounting-theory-conceptual-issues-
in-a-political-and-economic-environment-8th-edition-wolk-solutions-
manual/
https://testbankdeal.com/product/contemporary-business-15th-edition-
boone-test-bank/
https://testbankdeal.com/product/auditing-and-assurance-services-an-
asia-edition-1st-edition-rittenberg-solutions-manual/
Concepts of Database Management 8th Edition Pratt Test
Bank
https://testbankdeal.com/product/concepts-of-database-management-8th-
edition-pratt-test-bank/
Gaddis: Starting Out with Java: From Control Structures through Objects, 5/e © 2012 Pearson Education
Chapter 6
MULTIPLE CHOICE
ANS: B
2. Class objects normally have __________ that perform useful operations on their data, but primitive variables do
not.
a. fields
b. instances
c. methods
d. relationships
ANS: C
3. In the cookie cutter metaphor, think of the ________ as a cookie cutter and ________ as the cookies.
a. object; classes
b. class; objects
c. class; fields
d. attribute; methods
ANS: B
ANS: D
5. When you are working with a ____________, you are using a storage location that holds a piece of data.
a. primitive variable
b. reference variable
c. numeric literal
d. binary number
ANS: A
ANS: B
ANS: C
8. Java allows you to create objects of this class in the same way you would create primitive variables.
a. Random
b. String
c. PrintWriter
d. Scanner
ANS: B
ANS: D
10. Data hiding, which means that critical data stored inside the object is protected from code outside the object, is
accomplished in Java by:
a. using the public access specifier on the class methods
b. using the private access specifier on the class methods
c. using the private access specifier on the class definition
d. using the private access specifier on the class fields
ANS: D
ANS: D
12. You should not define a class field that is dependent upon the values of other class fields:
a. in order to avoid having stale data
b. because it is redundant
c. because it should be defined in another class
d. in order to keep it current
ANS: A
ANS: D
ANS: B
ANS: A
16. A constructor:
a. always accepts two arguments
b. has return type of void
c. has the same name as the class
d. always has an access specifier of private
ANS: C
17. Which of the following statements will create a reference, str, to the String, “Hello, World”?
a. String str = "Hello, World";
b. string str = "Hello, World";
c. String str = new "Hello, World";
d. str = "Hello, World";
Gaddis: Starting Out with Java: From Control Structures through Objects, 5/e © 2012 Pearson Education
ANS: A
18. Two or more methods in a class may have the same name as long as:
a. they have different return types
b. they have different parameter lists
c. they have different return types, but the same parameter list
d. you cannot have two methods with the same name
ANS: B
19. Given the following code, what will be the value of finalAmount when it is displayed?
ANS: D
20. A class specifies the ________ and ________ that a particular type of object has.
a. relationships; methods
b. fields; object names
c. fields; methods
d. relationships; object names
ANS: C
21. This refers to the combining of data and code into a single object.
a. Data hiding
b. Abstraction
c. Object
d. Encapsulation
ANS: D
ANS: B
23. In your textbook the general layout of a UML diagram is a box that is divided into three sections. The top
section has the _______; the middle section holds _______; the bottom section holds _______.
a. class name; attributes or fields; methods
b. class name; object name; methods
c. object name; attributes or fields; methods
d. object name; methods; attributes or fields
ANS: A
ANS: D
a. methods private
b. fields private
c. fields public
d. fields and methods public
ANS: B
26. After the header, the body of the method appears inside a set of:
a. brackets, []
b. parentheses, ()
c. braces, {}
d. double quotes, ""
ANS: C
ANS: C
a. /
b. @
c. -
d. +
ANS: D
ANS: B
30. When an object is created, the attributes associated with the object are called:
a. instance fields
b. instance methods
c. fixed attributes
d. class instances
ANS: A
31. When an object is passed as an argument to a method, what is passed into the method’s parameter variable?
a. the class name
b. the object’s memory address
Gaddis: Starting Out with Java: From Control Structures through Objects, 5/e © 2012 Pearson Education
ANS: B
ANS: D
ANS: D
34. Which of the following statements will create a reference, str, to the string, “Hello, world”?
a. 1
b. 2
c. 1 and 2
d. Neither 1 or 2
ANS: C
ANS: C
36. Given the following code, what will be the value of finalAmount when it is displayed?
orderNum = orderNumber;
orderAmount = orderAmt;
orderDiscount = orderDisc;
}
ANS: C
ANS: C
38. Instance methods do not have this key word in their headers:
a. public
b. static
c. private
d. protected
ANS: B
39. Which of the following is not involved in finding the classes when developing an object-oriented application?
ANS: C
a. archive c. collection
b. package d. attachment
ANS: B
41. Quite often you have to use this statement to make a group of classes available to a program.
a. import c. link
b. use d. assume
ANS: A
import java.util.Scanner;
This is an example of
ANS: B
import java.util.*;
ANS: A
44. The following package is automatically imported into all Java programs.
a. java.java c. java.util
b. java.default d. java.lang
ANS: D
TRUE/FALSE
ANS: T
Gaddis: Starting Out with Java: From Control Structures through Objects, 5/e © 2012 Pearson Education
ANS: T
ANS: T
4. A method that stores a value in a class's field or in some other way changes the value of a field is known as a
mutator method.
ANS: T
ANS: F
ANS: T
7. Shadowing is the term used to describe where the field name is hidden by the name of a local or parameter
variable.
ANS: T
8. The public access specifier for a field indicates that the attribute may not be accessed by statements outside
the class.
ANS: F
9. A method that gets a value from a class's field but does not change it is known as a mutator method.
ANS: F
10. Instance methods do not have the key word static in their headers.
ANS: T
11. The term "default constructor" is applied to the first constructor written by the author of a class.
ANS: F
12. When a local variable in an instance method has the same name as an instance field, the instance field hides the
local variable.
ANS: F
13. The term "no-arg constructor" is applied to any constructor that does not accept arguments.
ANS: T
14. The java.lang package is automatically imported into all Java programs.
ANS: T
Visit https://testbankdead.com
now to explore a rich
collection of testbank,
solution manual and enjoy
exciting offers!
Random documents with unrelated
content Scribd suggests to you:
Tusk-elephant mountain, 291
Unlucky days, 18
Untruthfulness, 36
Vaeddā, 202–204;
complains to King, 188;
K. imprisons travellers, 34, 64, 65;
in folk-tales, 34;
seven shoot for Princess, 96, 98;
shoots magic turtle-dove, 80, 81;
visits city, 273;
wedding custom, 240;
stories, 224
Victim’s escape, enemies take his place, 105, 106, 110, 112
Village, Kandian, 6;
dress, 8, 103;
garden, 11;
life, 21, 35;
new year’s re-union, 21;
path, 2;
tank, 4;
women, 8
Vishnu, 227;
boar incarnation, 50;
creation of earth and man, 47–50
Warāgan, 182
Warnings by animals, etc., 14, 15, 19, 97, 122–124, 126, 297–299, 300, 356
Wimalī, 302;
reared by Rākshasa, 303
Woodpecker’s cry, 3;
an omen, 19
Writing style, 93
Yabbaelli, f. Demon Hound, 297
Yugas, four, 49
Butler & Tanner The Selwood Printing Works Frome and London
Colophon
Availability
This eBook is for the use of anyone anywhere at no cost and with
almost no restrictions whatsoever. You may copy it, give it away or
re-use it under the terms of the Project Gutenberg License included
with this eBook or online at www.gutenberg.org .
Scans of this book are available from the Internet Archive (Volume I:
copy 1 , 2 , 3 ; Volume II: copy 1 , 2 , 3 ; Volume III: copy 1 ,
2 , 3 ).
Metadata
Revision History
2018-02-15 Started.
External References
Corrections
Edit
Page Source Correction
distance
10 verandah veranda 1
27 Ratēmahatmayā Raṭēmahatmayā 1 / 0
34,
34,
34,
34,
Vaedda Vaeddā 1/0
34,
64,
65,
239
45 VAEDDAS VAEDDĀS 1/0
53 eld held 1
54, [Not in source] , 1
73,
75,
77,
79,
82,
83,
100,
101,
104,
108,
113,
258,
273,
285,
287,
306,
339,
395
54,
[Not in source] ; 1
385
55 [Not in source] ’ 1
55 ’?’ ?” 2
80 should’nt shouldn’t 2
92 jogī jōgī 1/0
97 Brāmaṇa Brāhmaṇa 1
105 fields field 1
105 . , 1
109 dismisssed dismissed 1
124 ” ’ 1
151 Raja Rāja 1/0
151 Raṭēmahatmaya Raṭēmahatmayā 1 / 0
165,
188, . ? 1
287
167 Rishi Ṛishi 1/0
167 ‘ “ 1
174 [Not in source] ” 1
185 After-words Afterwards 2
197 [Not in source] . 1
207 Kujja Kujija 1
225 Kinnaras Kinnarās 1/0
230 case care 1
232,
247,
265, , . 1
300,
343
240 live lives 1
240,
Hitopadesa Hitōpadesa 1/0
248
253 Kaḍmbāwa Kaḍambāwa 1
253 Puttala m Puttalam 1
256 . [Deleted] 1
272 , [Deleted] 1
273 “ [Deleted] 1
275 Rakshasī Rākshasī 1/0
282,
workpeople work-people 1
282
296 Punci-Ammā Puñci-Ammā 1/0
306 kitul Kitul 1
313 ’ ” 1
319 greul gruel 2
351 Upāsaka Upāsakā 1/0
352 Varian t Variant 1
369 Perẹlibāse Pereḷibāse 2/0
387 Gama-gāeni Gama-gāēni 1/0
390 Maccocalingae Maccocalingæ 2
390 Modogalingae Modogalingæ 2
391 Pātaliputta Pāṭaliputta 1/0
393,
; , 1
393
Abbreviations
Overview of abbreviations used.
Abbreviation Expansion
V.P. Vishnu Purāna
*** END OF THE PROJECT GUTENBERG EBOOK VILLAGE FOLK-
TALES OF CEYLON, VOLUME 1 (OF 3) ***
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.
testbankdeal.com