Object-Oriented Programming Concepts Flashcards

1
Q

Real-world objects share two characteristics: state and …

A

behaviour

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

… objects are conceptually similar to real-world objects

A

Software

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

Where does An object store its state?

A

in fields

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

How does An object exposes its behavior?

A

through methods

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

What does An object operate?

A

object’s internal state

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

What for does object serve as the primary mechanism?

A

for object-to-object communication

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

Hiding internal state and requiring all interaction to be performed through an object’s methods is known as …

A

data encapsulation

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

The source code for an object can be written and maintained independently of the source code for other objects

A

Modularity

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

By interacting only with an object’s methods, the details of its internal implementation remain hidden from the outside world

A

Information-hiding

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

If a particular object turns out to be problematic, you can simply remove it from your application and plug in a different object as its replacement.

A

Pluggability

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

… is a blueprint or prototype from which objects are created

A

Class

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

each class is allowed to have … direct superclass

A

one

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

each superclass has the potential for an … of subclasses

A

unlimited number

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

At the end of your subclass declaration, use the … keyword

A

extends

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

… makes code for your subclasses easy to read

A

Inheritance

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

You must take care to … the state and behavior that each superclass defines

A

properly document

17
Q

Superclass code … in the source file of each subclass

A

will not appear

18
Q

What do methods form ?

A

the object’s interface with the outside world

19
Q

… is a group of related methods with empty bodies.

A

interface

20
Q

What is an interface?

A

A group of related methods with empty bodies.

21
Q

To implement this interface you have to …

A

change new class name and use implements keyword

22
Q

Which keyword do you use to implement interface?

A

implements

23
Q

What do interfaces form?

A

a contract between the class and the outside world

24
Q

When must all methods defined by that interface appear in class source code?

A

before the class will successfully compile

25
Q

What Is a Package?

A

namespace that organizes a set of related classes and interfaces

26
Q

… namespace that organizes a set of related classes and interfaces

A

package

27
Q

Java platform provides an enormous class library (…)

A

a set of packages

28
Q

What does Java API allow programmer?

A

focus on the design of your particular application