A module has been defined as a section of an algorithm which is
dedicated to the performance of a single function. It contains a single
entry and a single exit and the name chosen for the module should
describe its function.
Beginner programmers often need guidance in determining what
makes a
good
module.
Common queries are 'How big should a module
be?',
Is this module too small?' or 'Should I put all the read statements
in one module?'
There is a method which programmers can use to remove some of
the guesswork when establishing modules. The programmer can look
at the
cohesion
of the module.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.