CSC/ECE 517 Fall 2009/wiki3 17 VR
Single-Choice Principle
This article explains in detail about the single choice principle which is one of the five modularity principles.
Modularity
Modular Programming is used to break up a large program into small sub programs like functions and subroutines. These broken up pieces are called as modules.
Concept
The various modules designed by use of modular programming must satisfy five fundamental requirements as follows:
- Decomposability
- Composability
- Understandability
- Continuity
- Protection
In order to ensure modularity the following five rules must be followed:
- Direct mapping
- Small interfaces(weak coupling)
- Explicit interfaces
- Information Hiding
- Few interfaces
There are five principles of software construction which are to be followed along with the above stated requirements and rules. They are:
The Linguistic Modular Units principle | : |
This principle states that modules must correspond to syntactic units in the language used. |
|
The self-documentation principle |
: |
This principle states that the designer of a module should strive to make all information about the module part of the module itself. |
|
The uniform access principle |
: |
This principle states that all services offered by a module should be available through a uniform notation, which does not betray whether they are implemented through storage or through computation. |
|
The open-closed principle |
: |
This principle states that the modules should be both open and closed. |
|
The single choice principle |
: |
This principle states that whenever a software system must support a set of alternatives, one and only one module in the system should know their exhaustive list. |
In detail
Characteristics
Conclusion
References
1. Object Oriented Software Construction by Bertrand Meyer, Second Edition.