Sections


Main-Menu

header image

Programming Style: Structuredness


Structuredness

  • Decomposing a software system with the goal of mastering its complexity through abstraction and striving for comprehensibility (Structuring in the large.)
  • Selecting appropriate program components in the algorithmic formulation of subsolutions (Structuring in the small.)

Structuring in the large

  • Classes and methods for object-oriented decomposition
  • Modules and procedures assigned to the modules.
  • During implementation the components defined in the design must be realized in such a way that they are executable on a computer. The medium for this translation process is the programming language.
  • For the implementation of a software system, it is important that the decomposition defined in the design be expressible in the programming language; i.e. that all components can be represented in the chosen language.

Structuring in the small

  • The understanding and testing of algorithms require that the algorithms be easy to read.
  • Many complexity problems ensure from the freedom taken in the use of GOTO statements, i.e., from the design of unlimited control flow structures.
  • The fundamental ideal behind structured programming is to use only control flow structures with one input and one output in the formulation of algorithms. This leads to a correspondence between the static written form of an algorithm and its dynamic behavior. What the source code lists sequentially tends to be executed chronologically. This makes algorithms comprehensible and easier to verify, modify or extend.
  • Every algorithm can be represented by a combination of the control elements sequence, branch and loop (all of which have one input and one output) ([Böhm 1996]).
  • D-diagrams (named after Dijkstra): Diagrams for algorithm consisting of only elements sequence, branch and loop.

Note: If we describe algorithms by a combination of these elements, no GOTO statement is necessary. However, programming without GOTO statements alone cannot guarantee structuredness. Choosing inappropriate program components produces poorly structured programs even if they contain no GOTO statements.


Related Articles :



Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Shaadi.com Matrimony - Register for FREE