002 - Object-Oriented Programming Concepts Flashcards
A software object’s state is stored in ___.
Class fields
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 ___.
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.
Superclass 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
Real-world objects contain ___ and ___.
States and behaviors
______ is a software bundle of related state and behavior.
An object
__________ are often used to model the real-world objects that you find in everyday life
Software objects
_______ is a blueprint or prototype from which objects are created
A class
__________ is a contract between a class and the outside world.
An interface
_______ is a namespace for organizing classes and interfaces in a logical manner.
A package
Placing your code into ________ makes large software projects easier to manage.
packages
________ operate on an object’s internal state and serve as the primary mechanism for object-to-object communication.
Methods
The source code for an object can be written and maintained independently of the source code for other objects.
Modularity
By interacting only with an object’s methods, the details of its internal implementation remain hidden from the outside world.
Information-hiding
If an object already exists (perhaps written by another software developer), you can use that object in your program.
Code re-use
If a particular object turns out to be problematic, you can simply remove it from your application and plug in a different object as its replacement
Pluggability and debugging ease
your bicycle is an ______ of the ____of ____known as bicycles
your bicycle is an instance of the class of objects known as bicycles
Object-oriented programming allows classes to ______ commonly used state and behavior from other classes.
inherit
each class is allowed to have one direct ________, and each ________has the potential for an unlimited number of ________:
each class is allowed to have one direct superclass, and each superclass has the potential for an unlimited number of subclasses:
to inherit from a class, we use the keyword
extends
____________ is a group of related methods with empty bodies
an interface
to declare the use of an interface, we use the keyword
implements
When is the interface contract forced?
At compile time
The _____________________ contains the complete listing for all packages, interfaces, classes, fields, and methods supplied by the Java SE platform.
Java Platform API Specification