public class CashRegister
{
public static final double DIME_VALUE = 0.1;
private static int objectCounter;
public void updateDimes(int dimes) {. . .}
private boolean updateCounter(int counter) {. . .}
}
What are DIME_VALUE and updateDimes?
100
The name of the more general entity in an inheritance heirarchy.
What is a superclass?
100
The collection that keeps a set of items in order from smallest to largest.
What is a TreeSet?
100
A technique where methods call themselves.
What is recursion?
200
The correct way to construct an object of the Motorcycle class if the class has a constructor that takes no input arguments.
What is Motorcycle myBike = new Motorcycle()?
200
A class that cannot be instantiated
What is an abstract class?
200
The syntax for adding an element to a HashSet hm;
What is hm.add("Something")?
200
The problem with Math m = new Math();
What is an example of trying to instantiate an abstract class?
300
The methods that can access the instance variable empName in the following code snippet:
public class Employee {
private String empName;
. . .
}
What are methods in the Employee class?
300
The framework of a class Manager that is a subclass of Employee.
What is
public class Manager extends Employee {
...
}
300
The syntax for creating a map between the names of people and their favorite numbers.
What is Map favoriteNumbers = new HashMap();?
300
The number of concrete methods in an interface.
What is 0?
400
The methods that retrieve and change the values of instance variables in a class.
What are getters and setters (or accessors and mutators)?
400
The way a subclass modifies a private superclass instance variable.
What is using a public modifier (setter) method of the superclass?
400
A requirement for creating a TreeSet.
What is implementing the Comparable interface in SomeClass?
400
What a class that implements an interface must do
What is implement all abstract methods defined in the interface?
500
The correct placement of instance variables in a class.
What is inside the class but outside any methods?
500
The term for making a method's behavior specific to a subclass.
What is overloading?
500
The way to get all keys from a TreeMap tm.
What is tm.keySet();?
500
Polymorphism
What is the property of methods calls being defined by the type of object that executes them.