Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Computer program
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Program modules=== [[Modular programming]] is a technique to refine ''imperative language'' programs. Refined programs may reduce the software size, separate responsibilities, and thereby mitigate [[software aging]]. A ''program module'' is a sequence of statements that are bounded within a [[Block (programming)|block]] and together identified by a name.<ref name="se-ch8-216">{{cite book | last = Schach | first = Stephen R. | title = Software Engineering | publisher = Aksen Associates Incorporated Publishers | year = 1990 | page = 216 | isbn = 0-256-08515-3 }}</ref> Modules have a ''function'', ''context'', and ''logic'':<ref name="se-ch8-219">{{cite book | last = Schach | first = Stephen R. | title = Software Engineering | publisher = Aksen Associates Incorporated Publishers | year = 1990 | page = 219 | isbn = 0-256-08515-3 }}</ref> * The ''function'' of a module is what it does. * The ''context'' of a module are the elements being performed upon. * The ''logic'' of a module is how it performs the function. The module's name should be derived first by its ''function'', then by its ''context''. Its ''logic'' should not be part of the name.<ref name="se-ch8-219"/> For example, <code>function compute_square_root( x )</code> or <code>function compute_square_root_integer( i : integer )</code> are appropriate module names. However, <code>function compute_square_root_by_division( x )</code> is not. The degree of interaction ''within'' a module is its level of [[Cohesion (computer science)|cohesion]].<ref name="se-ch8-219"/> ''Cohesion'' is a judgment of the relationship between a module's name and its ''function''. The degree of interaction ''between'' modules is the level of [[Coupling (computer science)|coupling]].<ref name="se-ch8-226">{{cite book | last = Schach | first = Stephen R. | title = Software Engineering | publisher = Aksen Associates Incorporated Publishers | year = 1990 | page = 226 | isbn = 0-256-08515-3 }}</ref> ''Coupling'' is a judgement of the relationship between a module's ''context'' and the elements being performed upon.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)