This part of the chapter will attempt to explain why there are so many different representations and which representation is most useful under which circumstances. The most obvious difference between the representations is that two, subprogram declarations and package specifications, are expressed in Ada, and two, object diagrams and data flow diagrams, are expressed using a visual notation. The visual notations are more suitable for a rapid visual inspection to obtain an overall indication of the facilities of a package or a subprogram. The Ada representations are required for compilation and, when the associated comments are also considered, give the most detailed information concerning the facilities.
Data flow diagrams and subprogram declarations give information concerning a single subprogram.
Object diagrams and package specifications also give a more complete indication of the contents of a package. In addition to subprograms they will include information concerning data types, and other facilities yet to be introduced, which may be provided by a package. The discussion on the various representations has so far concentrated upon using them to gain an understanding of the contents of a pre-supplied package. They can also be used when a developer declared package is being produced. The two visual notations are useful for sketching and refining a design, which could start with an object diagram whose actions do not have the data flow specified.