The real flavour of Ada lies in the package mechanism which is the base for reuse technology. The package mechanism in Ada allows the designer to define abstract data types, and it is an abstraction over group of declarations [Sommerville 87]. In other words, it consists of groups of logically related declarations of functions and procedures, and types. It consists of two main parts, package specification, and body. The specification consists of two parts, directly visible part, and private part. The declarations appeared in the private part is not visible outside the package itself. Packaging in Ada is a powerful mechanism to support reuse.
The following are the some of the design for reuse guidelines. See the following general layout of a package.
Package Table_Manager is
type Item is ....;
type Table is limited private;
procedure Insert ( X : in Item; T : in out Table);
procedure Retrieve ( X : in Item; T in out Table);
Private
type Table_pointer;
type Table is access Table_pointer;
end Table_Manager;
The detailed implementation of the private type, Table can be done in the package body of Table_Manager. The package specification and body can be compiled separately which is the main support for software development, and reuse.