Shared Flashcard Set

Details

CMSC Final Vocab
for beginning java
45
Computer Science
Undergraduate 1
06/01/2013

Additional Computer Science Flashcards

 


 

Cards

Term
object oriented programming
Definition
places data and operations that pertain to them in an object
data=state(status), methods=behavior
Term
Class
Definition
can be thought of as a user-defined type
Term
instantiation
Definition
object creation
instance of class=object of class
to make, use new with constructor
Term
reference
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
constructors
Definition
special kind of methods invoked to construct an object of a certain class
Term
default constructor
Definition
a constructor without any parameters, if no constructors are defined a default will be implicitly defined by Java
Term
data abstraction
Definition
separation between client and developer, logical operations/properties of data from implementation of such
ex: public construcots b. private instance variables
Term
client
Definition
program that uses a class by either referencing its data or calling its methods
Term
info hiding
Definition
restrict access to data and methods
ex: declare and instance variable as private
Term
access modifiers
Definition
default, public, private
Term
default access
Definition
class/variable/method can be accessed by any class in the same package
Term
public
Definition
class/variable/method is visible to any class in any package
Term
private
Definition
variables/methods can only be accessed by the declaring class, doesn't apply to the class itself
Term
get method
Definition
getter/accessor
Term
set method
Definition
setter.mutator
Term
array of objects
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
API
Definition
Application Programmin Interface
Application Public Interface
Advanced Programming Interface
Term
members
Definition
variables +methods
the set of variables and methods for a given object
Term
class level members
Definition
if a variable or method doesn't depend on a specific instance of the class
static==class level
Term
hidden variables
Definition
if the local variable has the same name as the class variable then the class variable is hidden/shadowed
Term
inheritance
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
overriding
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
class abstraction
Definition
separate implementation of class from use/interface
Term
class access
Definition
who can construct objects of this class/who can import the class
Term
dot operator
Definition
accesses variables/methods of a particular instance of a class
Term
abstraction
Definition
extract essential info relevant for a particular purpose and ignore the rest
ex: platos forms
Term
encapsulation
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
polymorphism
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
how to make a class
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
arrays get passed by
Definition
reference, others are pass-by-value
Term
toString();
Definition
returns a string representation
Term
equals();
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
public
Term
Access Rules: classes
Definition
one or zero per file
only public if has main method
Term
Access Rules: instance variables
Definition
private
Term
Access Rules: constructors
Definition
public
Term
Access Rules: class level members
Definition
static
Term
methods
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
Supporting users have an ad free experience!