Ch. 11 Flashcards
Class
A collection of related methods, but also a template for a new type of object
Instance
A member of a class. Every object is an instance of some class
Instantiate
Create new instance of a class in a computer’s memory
Instance Variable
An attribute of an object; a non-static variable defined at the class level
Information Hiding
The practice of making instance variables private to limit dependencies between classes
Constructor
A special method to that initializes instance variables of a newly-constructed object
Shadow
Defining a local variable or parameter with the same name and type of an instance variable
Client
A class that uses objects defined in another class
Getter
A method that returns the value of an instance variable
Setter
A method that assigns a value to an instance variable
Override
Replacing a default implementation of a method, such as toString
Instance Method
A non-static method that has access to “this” and the instance variables
Identical
Two values that are the same; in the case of objects, two variables that refer to the same object
Equivalent
Two objects that are “equal” but not necessarily identical, as defined by the equals method
Pure Method
A static method that depends only on its parameters and no other data