Download Chapter 10 Book Work

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Java Programming, 3rd Edition Chapter 10 Book Work
Page 1 of 2
Multiple Choice Instructions: Write the letter of the correct response on your paper.
1.
__________ inheritance means that an object can inherit from only a single parent.
2.
a. Single
b. Double
c. Object
d. Multiple
__________ inheritance means an object can inherit from more than one parent.
3.
a. Single
b. Double
c. Object
d. Multiple
In addition to defining a class to create objects using inheritance, an object also may be composed of
other __________.
4.
a. values
b. classes
c. objects
d. is-a relationships
A(n) __________ is a class that cannot be used to create an object and it used only for the purpose of
inheritance.
5.
a. abstract class
b. concrete class
c. method class
d. value class
A(n) __________ is a class from which an object may be created and may/may not be a parent class.
6.
a. abstract class
b. concrete class
c. method class
d. value class
A(n) __________ in Java is a class that cannot be extended.
7.
a. closed class
b. fixed class
c. final class
d. only class
Method call concatenation, or method call __________, is a means of performing multiple method
calls by concatenating calls with period separators.
8.
a. connecting
b. hooking
c. fixing
d. chaining
To guarantee that the callback method is present in the calling object, the calling object must
implement a(n) __________ that requires that method.
9.
a. interface
b. value
c. function
d. class
A(n) __________ is an object used to draw titles, empty spaces, lines, or fancy edges around a
component.
a. Art block
b. Border
c. Box interface
d. DrawMethod
Java Programming, 3rd Edition Chapter 10 Book Work
Page 2 of 2
10. An object created without a reference variable is call a(n) __________ object.
a. lost
b. floating
c. anonymous
d. unlisted
True/False Instructions: Write T if the statement is true or F if the statement is false on your paper.
1. Unlike a human parent and child, a parent class cannot pass down features to child class.
2. Interfaces may use multiple inheritance as their methods only can be abstract.
3. Inheritance and aggregation are not mutually exclusive.
4. Classes may not have method headers without implementations.
5. Feel free to use as many final methods as you like since they do not inhibit extensibility of classes.
6. By making a class final, you are not allowing any new classes to enhance its functionality.
7. If you want to bookmark a single line of code, place the insertion point behind the desired line of code and
save a Favorite in the Search menu.
8. If you need to navigate quickly between two lines of code, set a bookmark at each line and then used the F2
key to navigate back and forth between the two lines.
9. To understand what happens in a concatenated method call, read the code from left to right, starting with the
object reference and first method.
10. A user does not have to be added to before testing the stock list application for the Password Exception
classes and subclasses.
Short Answer Instructions: Write the best answer on your paper.
1.
Extending the __________ is the means of implementing inheritance in Java.
2.
The class providing the inherited features is the superclass, or __________.
3.
The class inheriting attributes and behaviors is called the subclass, or __________.
4.
A method that includes only a method header without implementation is called a(n)__________.
5.
A class designated as a(n) __________ means it cannot have any subclasses.
6.
A(n) __________ is a method that can be inherited, but cannot be overridden by a subclass.
7.
Java now supports true, more flexible enumerated types with the reserved word, __________.
8.
In Java, a __________ is a way for one object to provide a generic reference to itself, so that a second
object can call back to a known method of the first object.
9.
A(n) __________ object is a Border object with text that, by default, displays in a line surrounding the
component for which it is used.
10.
The __________ method of the Toolkit object gets the size of the screen in pixels and returns a
Dimension object, which encapsulates the width and height of the screen.