60 likes | 107 Views
Modules. Programmers break programming problems down into smaller, reasonable units called modules, subroutines, procedures, functions, or methods When you create a module or subroutine, you give the module a name that a calling program uses when the module is about to execute
E N D
Modules • Programmers break programming problems down into smaller, reasonable units called modules, subroutines, procedures, functions, or methods • When you create a module or subroutine, you give the module a name that a calling program uses when the module is about to execute • A module can call other modules • Functions are a type of module
Creating Hierarchy Charts • A hierarchy chart illustrates module relationships • Does not tell you what tasks are to be performed within a module and thus does not show control flow. • Does not tell you when or how a module executes • Rather, identifies which routines exist within a program and which routines call which other routines • A hierarchy chart shows hierarchy, that is, subordinate-superordinate relationships. In particular, it shows which modules (functions) call which others.
Module Listing Order • 0 • 1 • 2 • 2.1 • 2.2 • 2.3 • 2.1.1 • 2.1.2 • 2.1.2.1 • 2.1.2.2