Free Online Flashcard Deck

2 Classes and Objects Free Online FlashCards

Study 2 Classes and Objects with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.

12 cards
01
Front

What is a class?

Back

A class is a template that defines the common structure and behavior of a kind of object.

02
Front

What is the purpose of a constructor?

Back

A constructor initializes a new object's initial state and helps ensure required values are valid.

03
Front

What is an object?

Back

An object is a concrete instance of a class with its own identity and state.

04
Front

What does instantiation mean?

Back

Instantiation is the process of creating a concrete object from a class.

05
Front

What is a field?

Back

A field is a variable associated with a class or object that stores data.

06
Front

What makes up an object's state?

Back

An object's state is the collection of values held by its instance fields at a particular time.

07
Front

What is a method?

Back

A method is a function defined as part of a class that provides behavior for an object or class.

08
Front

What does this refer to in an instance method?

Back

Within an instance method, this commonly refers to the current object on which the method was called.

09
Front

What is constructor overloading?

Back

Constructor overloading provides multiple constructors with different parameter lists.

10
Front

What is encapsulation?

Back

Encapsulation protects an object's state by controlling access to fields through carefully designed methods or properties.

11
Front

What does object identity distinguish?

Back

Object identity distinguishes a particular object from others, even when their field values are equal.

12
Front

What is aliasing?

Back

Aliasing occurs when multiple variables or names refer to the same object.