Two fundamental concepts in object-oriented programming are that of classes and
objects. A
class
can be regarded as an object template: it describes how an object looks and
operates. We may have a bank account class that holds details such as account number, account
name, and balance. These are defined by member variables that are said to define the
state
of
the class. Examples of operations associated with the bank account class are making a deposit
or a withdrawal.
Operations,
or methods in object-oriented terminology, are said to define the
behavior of a class. An
object
is an instance of a class. Corresponding to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.