The type of errors that the compiler will NOT detect are known as:
The method ____ of an Iterator<E> object returns an object of type E from the container that has not yet been accessed by this iterator instance.
Some of the commonly used public methods of an Iterator object are:
If the expression, pet1.setName("Socrates"), is a valid method call, which of the following MUST be true about the setName() method?
What do you call a section of code that is written in a natural language (like English), which is ignored by the compiler and is intended for people to read?
A variable that is declared as "final" is known as a ___.
What is the purpose of a mutator method?
Altering the flow of a program by making a choice is called a(n) ________ statement.
“Coupling” refers to
The BlueJ tool called a/an _____ is used to view the current value (state) of an objects fields.
The signature of a method consists of...
A collection of objects and defined states to setup scenarios for several test are know as:
Given the string declarations below, what is the value of s3 == s2?
String s1 = new String("foo");
String s2 = new String("foo");
String s3 = s2;
What are two key components of Java objects?
A Java "HashMap" container is best described as:
Say that a particular item of data is NOT a primitive data type. What must it be?
If the initial condition of any "while" loop is false it will still execute once.
Examine the following code:
int[] numList = new int[4];
int accumulator = 0
for( int index = 0; index < 4; index++)
{
accumulator = accumulator + index;
numList[index] = accumulator;
}
What will be the value stored in numList[3] after the for loop completes?
What type of instruction uses the equal sign (=) symbol?
“Cohesion” refers to
The part of a method definition that serves as a place holder for data passed to the method is known as
String variables are primitive variable types.
Examine the following code:
int count = 1;
while ( ___________ )
{
System.out.print( count + " " );
count = count + 1;
}
System.out.println( );
What condition should be used so that the code writes out:
1 2 3 4 5 6 7 8
What is a class?
Loop indentation is important because
Another word for "looping" is:
To guard against infinite loops you must insure that _____
What method has the same name as the class name, and is used to perform the initial setup operations for class instance variables?
What is another name for creating an object?
Copy of Given the string declarations below, what is the value of s1 == s2?
String s1 = new String("foo");
String s2 = new String("foo");
String s3 = s2;
Which of the following is true of a constructor method?
The type of errors that the compiler will detect are known as
Say that there are four classes: Book, Magazine, Newpaper, Publication. What are the likely relationships between these classes?
Does a superclass inherit both member variables and methods?
Which of the following pertains to polymorphic variables?
What restriction is the on using the super( ) call in a constructor?
Which of the following is an advantage to using inheritance?
How can you tell when information is being passed to the constructor of the parent class?
If you have two classes, Hamster and Animal, where Hamster is a subclass of Animal, what is the correct class header for Hamster?
Can an object be a subclass of another object?
Does a subclass inherit both member variables and methods?
Which of the following is NOT an advantage to using inheritance?
How can you tell when a constructor is being called in a program?
Which of the following is one form of polymorphism in Java?
What is an advantage of polymorphism?
When a class implements an interface, what must it do?
What two things must your program do to respond to a particular type of event?
In Java, what do you call an area on the screen that has nice borders and various buttons along the top border?
The DYNAMIC type of any variable refers to
The STATIC type of any variable refers to
Can an abstract parent class have non-abstract children?
What is an abstract class?
What must be true if a child of an abstract parent class does not override all of the parent's abstract methods?
An object that waits for and responds to an event from a GUI component is a:
Here is an abstract method defined in some abstract parent class:
public abstract int sumUp ( int[] arr );
Which of the following is required by all of it's non-abstract child classes?
How is a GUI component (such as a button) placed into a JFrame?
What letter do many Swing class names start with?
Can an abstract class define both abstract methods and non-abstract methods?
What must be true if a child of an abstract parent class does not override all of the parent's abstract methods?
What is an abstract method?
When a class implements an interface, what must it do?
Can an interface ever contain method bodies?
A child class can extend ___ parent(s) and can implement ___ interfaces.
What is an abstract class?
Can an interface name be used as the type of a variable?
What method is used to read the text from a JTextField?
[T/F] A checked exception is any exception checked for by the compiler.
____ is when a program is written to respond to button clicks, menu selections, user actions
When the user clicks on a button, what is generated?
What is a container object in GUI programming?
Which of the following is an exception thrown by the methods of the class String?
In which of the following layout managers do all rows (columns) have the same number of components and all components have the same size?
When is a finally{} block executed?
How many finally blocks can there be in a try/catch structure?
If the user changes the size of the frame, what happens to the graphical components?
Every try block:
What can a method do with a checked exception?
What happens when there is no catch block following the try block?
What is the purpose of the Graphics object?
What type of object determines where GUI components go in the content pane?
Which manager displays components in the possible locations of north, south, east, west, center?
Must a program respond to all events that its components generate?
Components must be added to the window's ___
Which manager displays components row-by-row, in order in which they were added?
If a negative value is used for an array index, what exception is thrown?
What is the name for a method that responds to events?
How does BoxLayout() put components into the content pane?
The fundamental classes for GUI programming are contained in the:
Which class of exceptions is NOT checked?
An abstract variable V is a mutable entity that admits two operations:
An implementation detail, such as whether a method is recursive or iterative, should usually be ______ from the user.
A description of a software design pattern includes at least:
If a recursive algorithm does not make progress toward the base case, it could _____
A suggested approach to discover the initial potential classes for a project is to extract the following from the project description and use cases:
[T/F] A "singleton" design pattern is used to ensure that only ONE instance of a class can be created.
[T/F] Scenarios are very technical problem descriptions that are best written by software engineers rather than the people familiar with the business problem.
The operations that modify a stack are:
[T/F] A design pattern is a description of a common computing problem and a
description of a small set of classes and their interaction structure that helps to solve that problem.
What are some of the key ACTIVITIES in software development?
A recursive definition is commonly one which defines the nth case in terms of the ______ case.
An iterative method ___
What are two parts to recursion?
What are two ways to view recursion?
Consider square numbers defined as follows:
square(1) = 1
square(N) = square(N-1) + 2N -1
According to this definition, what is square(3)?
Say that you have an recursive Java method, compute(). Is it always possible to write a iterative version of compute( )?
The FACTORY design pattern's primary purpose is to:
A base case is that part of a recursive definition that
[T/F] A "singleton" design pattern is used to ensure that only ONE instance of a class can be created.