chap 6 Flashcards

1
Q

True or false: Instance methods do not have the key word static in their headers

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A reference variable stores a ________

A

memory address

ex:
// Creating an object of the class
MyClass myObject = new MyClass();

// The reference variable ‘myObject’ stores the memory address of the object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

data hiding (which means that critical data stored inside the object is protected from code outside the object) is accomplished in java by _____.

a) using the private access specifier on the class methods
b) using the private access specifier on the class definition
c) using the private access specifier on the class fields
d) using the public access specifier on the class methods

A

c) using the private access specifier on the class fields

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Overloading means that multiple methods in the same class _____

a) perform the same function
b) have different names but the same parameter list
c) have the same name but different return types
d) have the same name but different parameter lists

A

d) have the same name but different parameter lists

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When you work with a ____. you are using a storage location that holds a piece of data.

a) primitive variable
b) numeric literal
c) binary number
d) reference variable

A

a) primitive variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

True or False, a class is not an object. It is a description of an object.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is involved in identifying the classes to be used when developing an object-oriented application

A

Writing a description of the problem domain

Identifying all of the nouns

Refining the list of Nouns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly