Chapter 4 Flashcards
State
what does the object know?
behaviors
what does it do?
Methods define
behaviors
class
blueprint of an object
ex: s.toUppercase();
string class is provided, but we can
make our own classes
constructor method instantiates
an object EX: new Scanner(System.in)
face variable in the Coin class
is called instance data or instance variable
___ variables point directly at its values in memory
primitive
ex: int, double, boolean
____ variables point to the object’s address
reference variables
ex: string
abstraction
can use object without knowing how they work
Encapsulation
seperates external from internal,
the plastic of the black box
Encapsulation internal
variables object holds and the methods that make the object useful
Encapsulation external
the service that an object provides and how it interacts
Self governing
change to and object’s state should be made through the methods
Two visibilty modifiers
public and private