Term
| object oriented programming |
|
Definition
places data and operations that pertain to them in an object data=state(status), methods=behavior |
|
|
Term
|
Definition
| can be thought of as a user-defined type |
|
|
Term
|
Definition
object creation instance of class=object of class to make, use new with constructor |
|
|
Term
|
Definition
| like pointers, variables that refer to objects (like arrays) but really only hold a reference |
|
|
Term
| instance variable & instance method |
|
Definition
| methods and variables in a class specific to each object |
|
|
Term
|
Definition
| special kind of methods invoked to construct an object of a certain class |
|
|
Term
|
Definition
| a constructor without any parameters, if no constructors are defined a default will be implicitly defined by Java |
|
|
Term
|
Definition
separation between client and developer, logical operations/properties of data from implementation of such ex: public construcots b. private instance variables |
|
|
Term
|
Definition
| program that uses a class by either referencing its data or calling its methods |
|
|
Term
|
Definition
restrict access to data and methods ex: declare and instance variable as private |
|
|
Term
|
Definition
|
|
Term
|
Definition
| class/variable/method can be accessed by any class in the same package |
|
|
Term
|
Definition
| class/variable/method is visible to any class in any package |
|
|
Term
|
Definition
| variables/methods can only be accessed by the declaring class, doesn't apply to the class itself |
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
| essentially an array of reference variables |
|
|
Term
| public interface (to a class) |
|
Definition
| the collection of constructors, accessors, methods, and other public methods |
|
|
Term
|
Definition
Application Programmin Interface Application Public Interface Advanced Programming Interface |
|
|
Term
|
Definition
variables +methods the set of variables and methods for a given object |
|
|
Term
|
Definition
if a variable or method doesn't depend on a specific instance of the class static==class level |
|
|
Term
|
Definition
| if the local variable has the same name as the class variable then the class variable is hidden/shadowed |
|
|
Term
|
Definition
| different kinds/levels of objects (highest is object itself), methods below inherit those from above unless overridden (which can be useful to make more specific) |
|
|
Term
|
Definition
define an instance method to override the method that would otherwise be inherited (this method has the same parameter profile as the inherited one) |
|
|
Term
|
Definition
| separate implementation of class from use/interface |
|
|
Term
|
Definition
| who can construct objects of this class/who can import the class |
|
|
Term
|
Definition
| accesses variables/methods of a particular instance of a class |
|
|
Term
|
Definition
extract essential info relevant for a particular purpose and ignore the rest ex: platos forms |
|
|
Term
|
Definition
build a conceptual barrier around a related collection of things, controls both hiding and visibility of hid in ex: packing data/methods into objects |
|
|
Term
|
Definition
many shapes the property of a method to be interpreted differently depending on the context ex: overriding default methods |
|
|
Term
| how to instantiate an object |
|
Definition
| Circle myCircle = new Circle(); |
|
|
Term
|
Definition
Class Circle { data fields; methods; } |
|
|
Term
| how to make a constructor |
|
Definition
Circle (double r) { radius=r; } |
|
|
Term
| making an array of objects actually makes |
|
Definition
| an array of null pointers, need to fill in individual objects |
|
|
Term
|
Definition
| reference, others are pass-by-value |
|
|
Term
|
Definition
| returns a string representation |
|
|
Term
|
Definition
| returns true if the calling method is the same object as the passed object |
|
|
Term
| overriding v. overloading |
|
Definition
overriding=define method to override inheritance overloading=no hierarchy involved |
|
|
Term
| Access Rules: accessors and mutators |
|
Definition
|
|
Term
|
Definition
one or zero per file only public if has main method |
|
|
Term
| Access Rules: instance variables |
|
Definition
|
|
Term
| Access Rules: constructors |
|
Definition
|
|
Term
| Access Rules: class level members |
|
Definition
|
|
Term
|
Definition
at least one method of each class should be public often default or public |
|
|
Term
| Types of Access: method, variable, class |
|
Definition
Method: who can call a method Variable: who can refer directly to a variable Class: who can construct objects of this class or import the class |
|
|