Java How to Program, 11/e Multiple Choice Test Bank 4 of 8
b. A bank-account object would likely have a balance attribute that represents the amount of money in the account.
c. Each bank-account object knows the balance in the account it represents, but not the balances of the other
accounts in the bank.
d. Attributes are specified by the class’s methods.
Section 1.5.7 Encapsulation and Information Hiding
1.5.7 Q1: Which of the following statements is false?
a. Classes (and their objects) encapsulate, i.e., encase, their attributes and methods.
b. A class’s (and its object’s) attributes and methods are intimately related.
c. For objects to communicate effectively with one another, each must know how the other object is implemented.
d. Information hiding is crucial to good software engineering.
Section 1.5.8 Inheritance
1.5.8 Q1: A new class of objects can be created conveniently by ________; the new class (called the ________)
starts with the characteristics of an existing class (called the ________), possibly customizing them and adding
unique characteristicsof its own.
a. inheritance, superclass, subclass.
b. composition, subclass, superclass
c. inheritance, subclass, superclass
d. composition, superclass, subclass
Section 1.5.9 Interfaces
1.5.9 Q1: Java supports ________; collections of related methods that typically enable you to tell objects what to
do, but not how to do it (we’ll see an exception to this in Java SE 8).
a. classes
b. subclasses
c. superclasses
Section 1.5.10 Object-Oriented Analysis and Design (OOAD)
1.5.10 Q1: To create the best solutions, you should follow a detailed ________ process for determining your
project’s ________ (i.e., defining what the system is supposed to do) and developing a ________ that satisfies them
(i.e., specifying how the system should do it).
a. design, requirements, analysis
b. analysis, requirements, design
c. requirements, design, analysis
d. analysis, design, set of requirements
Section 1.5.11 The UML (Unified Modeling Language)
1.5.11 Q1: ________ is a graphical language that allows people who design software systems to use an
industry standard notation to represent them.
a. The Unified Graphical Laguage
b. The Unified Design Language
c. The Unified Modeling Language
d. None of the above