Unit 10 - Modules Flashcards
A program unit (such as a library) should specify
an application programming interface (API)
ie the minimum information that application programmers need to know in order to use it successfully.
Subprograms and declarations are usually the
smallest program units.
Module (or, equivalently, a package or a namespace), which is a
named group of subprograms and declarations
Java classes can be made private or protected, this is an example of an
encapsulation defined by program blocks because the private or protected components can be referred to only within the scope of certain class definitions.
An abstract data type (ADT) is a
type whose values are not directly accessible — their form is private and invisible to any user of the type.
The only way and abstract data type (ADT) values can be created, inspected and modified is via
a set of subprograms bundled together with the type.
Give an example of a generic unit in Java
ArrayList<E> - E can be whatever object type you require. Arraylist behaves the same whatever object type E is.</E>