Week 8 note (Abstract Data Types) Flashcards
Encapsulation
is a grouping of subprograms and the data that they manipulate
Two kinds of abstractions in programming languages are
process abstraction and data abstraction.
process abstraction
All subprograms are process abstractions because they provide a way for a program to specify that some process is to be done, without providing the details of how it is to be done.
All subprograms, including concurrent subprograms, and exception handlers, are process abstractions
An abstract data type is
adalah sebuah enkapsulasi yang didalamnya terdapat representasi data dari satu tipe data dan subprogram yang menyediakan operasi pada tipe data tersebut.
An instance of an abstract data type is called
object
An abstract data type is a data type that satisfies two conditions
- The representation, or definition, of the type and the operations are contained in a single syntactic unit
- The representation of objects of the type is hidden from the program units that use the type, so only direct operations possible on those objects are those provided in the type’s definition
Program units that use a specific abstract data type are called
clients
Benefit of information hiding is
increased reliability, because clients cannot change the underlying representations of objects directly.
data members is?
the data defined in a class
member functions is?
the functions defined in a class
What is Inheritance?
adalah suatu teknik untuk mendefinisikan sebuah kelas baru yang dapat memiliki properti dari kelas lain, sehingga dapat memudahkan untuk membuat dan mengatur sebuah aplikasi.