Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Java Software Solutions
Quiz 10: Polymorphism
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 1
True/False
One of the advantages of the linear search is that it does not require its data to be sorted.
Question 2
True/False
It is possible to sort an array of int, float, double or String, but not an array of an Object class such as a CD class.
Question 3
True/False
A reference variable can refer to any object created from any class related to it by inheritance.
Question 4
Multiple Choice
In order to determine the type that a polymorphic variable refers to, the decision is made
Question 5
True/False
The fact that the System.out.println() method is able to handle such a wide variety of objects, and print them correctly, is an example of the polymorphic nature of the println() method.
Question 6
True/False
The binary search can be used on unsorted data. It will just perform more slowly.
Question 7
True/False
To swap the 3rd and 4th elements in the int array values, you would do: values[3] = values[4]; values[4] = values[3];
Question 8
True/False
A GUI control that allows the user to specify a numeric value within a bounded range is a spinner.
Question 9
True/False
A polymorphic reference can refer to different types of objects over time.
Question 10
Multiple Choice
Code Example Ch 10-1 An int array stores the following values:
9
4
12
2
6
8
18
\begin{array} { | l | l | l | l | l | l | l | } \hline 9 & 4 & 12 & 2 & 6 & 8 & 18 \\\hline\end{array}
9
ā
4
ā
12
ā
2
ā
6
ā
8
ā
18
ā
ā
-Refer to Code Example Ch 10-1: Which of the following lists of numbers would accurately show the array after the second pass of the selection sort algorithm?
Question 11
True/False
An interface reference can refer to any object of any class that implements the interface.
Question 12
Multiple Choice
A variable declared to be of one class can later reference an extended class of that class. This variable is known as
Question 13
True/False
The spinner GUI control can allow the user to select values that are either numbers or strings.
Question 14
True/False
If classes C1 and C2 both implement an interface Cint, which has a method whichIsIt, and if C1 c = new C1(); is performed at one point of the program, then a later instruction c.whichIsIt(); will invoke the whichIsIt method defined in C1.