Chapter 6 Flashcards
What is a class?
It is the template that describes characteristics of similar objects; blueprint to create objects of that class
What is an object?
it is an instance of its’ class
What kind of entity is an object?
It is a run time entity that contains date and responds to messages.
what is encapsulation?
combining data and behavior into a single software package
name the three characteristics of objects
state, behavior, identity
What is the state of an object?
instance variables
What goes into the behavior of an object?
Methods! which define an object’s behavior in response to messages. there are two types: mutators and accessors
What’s the difference between mutators and accessors?
mutators change an object’s state. accessors access the object’s state
what does a computer’s memory hold during execution?
variables that refer to objects, class templates, and objects
Objects appear and occupy memory when instantiated and disappear when no longer need, through a process called ______.
Garbage collection, which is the JVM’s automated method for removing unused objects.
What else does the garbage collection do?
it also tracks whether objects are referenced by any variables.
describe the client and server relationship
Client is the message sender, server is the message receiver. Client only needs to know the interface, server implements and supports the interface
What is an interface?
list of methods
What is information hiding?
server’s data requirements and methods implementation hidden from THE CLIENT
Name the two types of visibility modifiers
private and public.