Free Online Flashcard Deck

1 Object-Oriented Programming Foundations Free Online FlashCards

Study 1 Object-Oriented Programming Foundations with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.

12 cards
01
Front

What does object-oriented programming organize software around?

Back

Object-oriented programming organizes software around objects that combine data with the operations that use or protect that data.

02
Front

How does a class differ from an object?

Back

A class is a definition or blueprint; an object is a concrete instance created from that class, with its own state.

03
Front

What is an object's state?

Back

An object's state is the information stored in it at a particular time, such as a bank account's identifier and current balance.

04
Front

What is an object's behavior?

Back

An object's behavior is the work it can perform, usually exposed through methods such as deposit() and withdraw().

05
Front

What is encapsulation?

Back

Encapsulation bundles state and behavior while controlling access to internal details, protecting invariants and allowing implementation changes without changing callers.

06
Front

What does an invariant represent in OOP?

Back

An invariant is a condition that must remain true. Encapsulation helps protect it by preventing invalid direct changes to an object's state.

07
Front

What relationship does inheritance represent?

Back

Inheritance lets a subclass reuse and specialize a superclass. It represents an “is-a” relationship when the subtype conforms to the base type's promises.

08
Front

What does polymorphism allow common code to do?

Back

Polymorphism lets common code use objects through a shared type while each object's actual type supplies the appropriate operation implementation.

09
Front

What does an interface define?

Back

An interface defines a contract: operations that an implementing class promises to provide, without prescribing every implementation detail.

10
Front

What is composition in object-oriented design?

Back

Composition builds a class from objects of other classes as parts. It represents a “has-a” relationship and can delegate work to those components.

11
Front

What does programming to an abstraction mean?

Back

Programming to an abstraction means client code depends on an interface or abstract type rather than a particular concrete implementation.

12
Front

What makes a class cohesive?

Back

A cohesive class has a focused purpose and closely related responsibilities rather than combining unrelated concerns.