Abstraction Flashcards

1
Q

Denotes the essential characteristics
of an object that distinguish it from
all other kinds of objects providing
well-defined boundaries, relative to
the perspective of the viewer

A

Abstraction

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

Benefits of Abstraction:

A

Simplifies the process: Helps us deal with
complexity

Defined scope: Provides a basis for deciding
which features are important and which are
not (depending on the context)

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

A set of objects that share
common attributes and
common methods (collectively known as ‘features’) and these features are defined in the class specification

A

Class

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

a document that serves as a
template or blueprint that
dictates how to create new
object instances of a class

A

Class Specifications

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

The process of creating an object based on
a class

A

Instantiation

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

A specialized method for instantiating an
object of a class as well as initializing its
state

A

Constructor

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

TRUE or FALSE:

There can be more than one constructor in
a class specification

A

TRUE

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

The keyword _____ is a reference to the current
object.

A

this

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

A specialized method for destroying an instance of a class

A

Destructor

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

TRUE or FALSE:

You can create destructors in Java

A

FALSE

Java does not support destructors; it is the job of the
garbage collector present in the Java Virtual Machine to free
up memory allocated to instances that are no longer in use

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

are software self-contained programming unit packaged with an enclosed data/data structure and methods that operate on the data

A

Objects

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

Abstraction Design Tips:

A

1) Find the Main Actors in the problem domain
2) Class names should reflect their responsibilities
3) Break up classes that have too many responsibilities

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

TRUE or FALSE:

If no constructor is specified, the compiler creates the default constructor.

A

TRUE

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