Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Interface, implementation?

Dikenal juga sebagai: interface · implementation · interface (of a module) · implementation (of a module)

Definition 20.2 High School Computer Science · Bab 20 — Modules, Interfaces and Libraries

The interface of a module is what its users may rely on: the names it offers and, for each, a specification. The implementation is the code that keeps these promises, and everything else in the module: helpers, data structures, imported modules.

The interface as a wall. Above it, five names with their specifications, the same in the three modules; below it, three ways of keeping the dates, which users never see.
The interface as a wall. Above it, five names with their specifications, the same in the three modules; below it, three ways of keeping the dates, which users never see.
Baca dalam konteks →
Definition 7.2 University Computer Science — Year 1 · Bab 7 — Modular Programs, Makefiles and Tests

The interface of a module is what its users may rely on: in C, the declarations of its header and the comments that state their contracts. Its implementation is everything else: the definitions in its .c file, which may change without any user changing.

Baca dalam konteks →