Chapter 11 Flashcards

1
Q

What is abstraction?

A

A representation of an entity with only most significant attributes

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

What is process abstraction

A

Emphaize logical structure but hide low level detail ( increase readability)

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

What is data abstraction?

A

Abstract data types

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

What are the 2 conditions for ADTs?

A

Representation + operations is defined in a single place (class)

Encapsulation. Only operations is those provided in the “class”

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

What is an advantage of classes?

A

Organization, modifiability, each ADT can be compiled in own file

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

Advantage of encapsulation?

A

Reliability ( cant access objects of the type)
Name conflicts are less likely

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

What is the requirements for ADTs?

A

Syntactic unit ( encapsulation definition )
Methods to make parts of ADT visible but hide definitions

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

What are some design issues for ADTs?

A

Can abstract parameters be parameterized?
What access controls are provided
Is the Type physically separate from its implementation?

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

On what is ADT support based in C++?

A

Simula 67 classes + C structs

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

What do all class instances share in C++?

A

A single copy of the member function

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

What does instance of a class have?

A

Own copy of the class data members.

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

What is the file extension of compiled Java code?

A

.class files

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

What are Parameterized ADTs also known as?

A

Generic classes (template classes)

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