Unit 10 - Modules Flashcards

1
Q

A program unit (such as a library) should specify

A

an application programming interface (API)

ie the minimum information that application programmers need to know in order to use it successfully.

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

Subprograms and declarations are usually the

A

smallest program units.

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

Module (or, equivalently, a package or a namespace), which is a

A

named group of subprograms and declarations

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

Java classes can be made private or protected, this is an example of an

A

encapsulation defined by program blocks because the private or protected components can be referred to only within the scope of certain class definitions.

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

An abstract data type (ADT) is a

A

type whose values are not directly accessible — their form is private and invisible to any user of the type.

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

The only way and abstract data type (ADT) values can be created, inspected and modified is via

A

a set of subprograms bundled together with the type.

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

Give an example of a generic unit in Java

A

ArrayList<E> - E can be whatever object type you require. Arraylist behaves the same whatever object type E is.</E>

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