AP Computer Science Chapter 2 Terms

object reference

A variable that represents an object.

object

Something that is created or manipulated by the program.

state

The description of an object.

behavior

The different functions of an object.

class

A software blueprint for implementing objects of a given type.

instance

An object is a single __________ of a class.

methods

The _______ of the class provide both the behaviors exhibited by the object and the operations that manipulate the object.

encapsulation

Combining an object's data and methods into a single unit called a class is known as __________.

public, client programs

The keyword ________ preceding the class declaration signals that the class is usable by all __________.

information hiding

Restriction of access is known as ________.

static

A(n) ______ variable contains a value that is shared by all instances of the class.

static final

___________ variables in a class cannot be changed.

public void method_name(parameter_list)

Show a general method header.

access specifier

The ___________ tells which other methods can call this method.

void

A return type of _______ signals that the method does not return a value.

parameter list

Items in the __________ are separated by commas.

constructor

A(n) _______ creates an object of the class

BankAccount b = new BankAccount();

Construct a "BankAccount" object named "b".

accessor

A(n) ________ method accesses a class object without altering the object.

mutator

A(n) ________ method changes the state of an object by modifying at least one of its instance variables.

static

A method that performs an operation for the entire class, not its individual objects, is called a ________ method.

overloaded

Two or more methods in the same class that have the same name but different parameter lists are called ________ methods.

signature

The ________ of a method consists of the method's name and a list of the parameter types.

scope

The ________ of a variable or method is the region in which that variable or method is visible and can be accessed.

local

A(n) ________ variable is defined inside a method.

block

A(n) ________ is a piece of code enclosed in a {} pair.

primitive

All numerical data types, as well as types char and boolean, are ________ data types.

reference

All objects are ________ data types.

null reference

An uninitialized object variable is called a ________.

b = null;

Set a reference with the name "b" to null.

compile-time

If you fail to initialize a local variable in a method before you use it, you will get a ________ error.

parameters

The header of a method defines the ________ of that method.

3

int num1 = 3;
int num2 = num1;
int num1 = 4;
What is the value of num2?

object reference

A variable that represents an object.

object

Something that is created or manipulated by the program.

state

The description of an object.

behavior

The different functions of an object.

class

A software blueprint for implementing objects of a given type.

instance

An object is a single __________ of a class.

methods

The _______ of the class provide both the behaviors exhibited by the object and the operations that manipulate the object.

encapsulation

Combining an object's data and methods into a single unit called a class is known as __________.

public, client programs

The keyword ________ preceding the class declaration signals that the class is usable by all __________.

information hiding

Restriction of access is known as ________.

static

A(n) ______ variable contains a value that is shared by all instances of the class.

static final

___________ variables in a class cannot be changed.

public void method_name(parameter_list)

Show a general method header.

access specifier

The ___________ tells which other methods can call this method.

void

A return type of _______ signals that the method does not return a value.

parameter list

Items in the __________ are separated by commas.

constructor

A(n) _______ creates an object of the class

BankAccount b = new BankAccount();

Construct a "BankAccount" object named "b".

accessor

A(n) ________ method accesses a class object without altering the object.

mutator

A(n) ________ method changes the state of an object by modifying at least one of its instance variables.

static

A method that performs an operation for the entire class, not its individual objects, is called a ________ method.

overloaded

Two or more methods in the same class that have the same name but different parameter lists are called ________ methods.

signature

The ________ of a method consists of the method's name and a list of the parameter types.

scope

The ________ of a variable or method is the region in which that variable or method is visible and can be accessed.

local

A(n) ________ variable is defined inside a method.

block

A(n) ________ is a piece of code enclosed in a {} pair.

primitive

All numerical data types, as well as types char and boolean, are ________ data types.

reference

All objects are ________ data types.

null reference

An uninitialized object variable is called a ________.

b = null;

Set a reference with the name "b" to null.

compile-time

If you fail to initialize a local variable in a method before you use it, you will get a ________ error.

parameters

The header of a method defines the ________ of that method.

3

int num1 = 3;
int num2 = num1;
int num1 = 4;
What is the value of num2?