Save
Computer
Save
Share
Learn
Content
Leaderboard
Learn
Created by
Janice Dorimon
Visit profile
Subdecks (2)
Subjects
Computer
43 cards
02 Handouts 1
Computer
33 cards
Cards (82)
Object-Oriented
Programming
(OOP) is a
programming
methodology
that defines objects whose behaviors and interactions accomplish a given task
Object:
An object has
characteristics
or
attributes
The values of an object's
attributes
give the object a
state
The actions that an object can take are
called
behaviors
, defined by
methods
Class
:
Objects of the same kind have the
same
data
type
and belong to the
same
class
A
class
defines
a kind of object; it is a
blueprint
for defining objects
The
data type
of an object is the
name
of its class
Inheritance:
Organizing
classes through inheritance
Allows objects of a class to take on the properties of objects from another class
Used to avoid
repetition
of programming
instructions
for each class
To apply inheritance between classes, the
extends
keyword is used
Interface
:
A program component containing the
heading
for a number of
public methods
Some interfaces describe
all
public
methods
in a class, while others specify only
certain methods
Used by another
class
through the
implements
keyword
Package
:
A collection of related classes and interfaces
grouped
together
into a
folder
The
name
of
the
folder
is the name of the package
Classes in the package are placed in
separate
files
, with the file name beginning with the class name
All
classes
in a package can be used within any program or class definition by placing an
import
statement
The class does not need to be in the same folder as the classes in the
package
Syntax
for importing: import
package
_
name.class
_
name
_or_
asterisk
See all 82 cards