Shared Flashcard Set

Details

chapt6 2
stephb
30
Computer Science
08/16/2006

Additional Computer Science Flashcards

 


 

Cards

Term
data in an object are known as
Definition
fields
Term
procedures in an object are known as
Definition
methods
Term
an object created from a class is called an __________ of a class
Definition
instance
Term
class ___________ normally have methods that perform useful operations on their data
Definition
objects
Term
________ variables can only store data and have no methods
Definition
primative
Term
Each ______ of the class string contains different data
Definition
instance

the instances aer all share the same design
Term
each instance has all of the atributes and methods that were defined in the _______ class
Definition
string class
Term
rectangle object will have the following fields
Definition
length
width
Term
Rectangle box = new Rectangle ();

the box variable holds the ______ of the recangle object
Definition
adress
Term
methods that retrive the data of the fields are called
Definition
accessors
Term
methods that modify the data of the fields are called
Definition
mutators

setlength
setwidth
Term
each field that the programmer wishes to be viewed by other classes needs an ________
Definition
accessor

getlength
getwidth
Term
each feild that the programer wishes to be modifed by other classes needs a
Definition
mutator
Term
________ fields and ______ methods require an object to be created in order to be used
Definition
instance
instance
Term
classes can have special methods called
Definition
constructors
Term
classes can have special methods called
Definition
constructors
Term
a __________ is a method that is automatatically called when an object is created
Definition
constructor
Term
________ are used to perform operations at the time an object is created
Definition
constructors
Term
constructors typically ______ instance fields and perform other object initialization tasks
Definition
initialize
Term
constructors have the same name as the _____
Definition
class
Term
__________have no return types, not even void
Definition
constructors
Term
constructors are typically private or public
Definition
public
Term
______ variables can be declared with out being initialized

rectangle box;
this statement does not create a rectangle object. so it is an uninitialzed local _______ variable
Definition
Reference
Term
when an object is created, its constructor is ______ called
Definition
always
Term
if u do not write a constructor, java provides one when the class is compiled
this is known as _____

it sets all the objects numeric fields to___
all boolean fields to _____
it sets all the objects reference variables to the special value ______
Definition
default constructor



o

false

null
Term
constructor that does not accept an argument is knwon as a
Definition
no arg constructor
this is what the default constructor is
Term
a string literal is used to initialze a string_________
Definition
object
Term
a string literal is used to _____ a string object
Definition
initialize

for instance
string name= new String ("michal long");
string name= "michal long"
Term
two or more methods in a class may have the same name as long as their _______ lists are diff.
Definition
parameter
Term
a method ______ consisst of the methods name and the data types of the methods parameters, in the order they appear
Definition
signature