CSC/ECE 517 Fall 2009/wiki3 17 VR

From Expertiza_Wiki
Revision as of 06:17, 18 November 2009 by Ncsuangel (talk | contribs) (→‎Concept)
Jump to navigation Jump to search

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: o Decomposability o Composability o Understandability o Continuity o Protection

In order to ensure modularity the following five rules must be followed: o Direct mapping o Small interfaces(weak coupling) o Explicit interfaces o Information Hiding o Few interfaces

There are five principles of software construction which are to be followed along with the above stated requirements and rules. They are: o The Linguistic Modular Units principle: This principle states that modules must correspond to syntactic units in the language used. o 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. o 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. o The open-closed principle: This principle states that the modules should be both open and closed. o 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.