Object-Oriented Programming Concepts
What Is an Object?
An object is a software bundle of related state and behavior.
What Is a Class?
A class is a blueprint or prototype from which objects are created.
What Is Inheritance?
Inheritance provides a powerful and natural mechanism for organizing and structuring your software.
What Is an Interface?
An interface is a contract between a class and the outside world.
What Is a Package?
A package is a namespace for organizing classes and interfaces in a logical manner.
Questions and Exercises: Object-Oriented Programming Concepts
Use the questions and exercises presented in this section to test your understanding of objects, classes, inheritance, interfaces, and packages.
Questions
Real-world objects contain ___ and ___.
state, behavior
A software object’s state is stored in ___.
fields
A software object’s behavior is exposed through ___.
methods
Hiding internal data from the outside world, and accessing it only through publicly exposed methods is known as data ___.
data encapsulation
A blueprint for a software object is called a ___.
class
Common behavior can be defined in a ___ and inherited into a ___ using the ___ keyword.
super class subclass extends
A collection of methods with no implementation is called an ___.
interface
A namespace that organizes classes and interfaces by functionality is called a ___.
Package
The term API stands for ___?
Application Programming interface