Download presentation
Presentation is loading. Please wait.
1
Topics discussed in this section:
4-6 Scope Scope determines the region of the program in which a defined object is visible. Scope pertains to any object that can be declared, such as a variable or a function declaration. Topics discussed in this section: Global Scope Local Scope Computer Science: A Structured Programming Approach Using C
2
FIGURE 4-32 Scope for Global and Block Areas
Computer Science: A Structured Programming Approach Using C
3
Variables are in scope from declaration until the end of their block.
Note Variables are in scope from declaration until the end of their block. Computer Science: A Structured Programming Approach Using C
4
Note It is poor programming style to reuse identifiers within the same scope. Computer Science: A Structured Programming Approach Using C
5
Topics discussed in this section:
4-7 Programming Example— Incremental Development Top–down development, a concept inherent to modular programming, allows us to develop programs incrementally. By writing and debugging each function separately, we are able to solve the program in smaller steps, making the whole process easier. Topics discussed in this section: First Increment: main and getData Second Increment: add Final Increment: Print ResultsThe Computer Science: A Structured Programming Approach Using C
6
FIGURE 4-33 Calculator Program Design
Computer Science: A Structured Programming Approach Using C
7
Calculator Program—First Increment
Computer Science: A Structured Programming Approach Using C
8
Calculator Program—First Increment
Computer Science: A Structured Programming Approach Using C
9
Calculator Program—First Increment
Computer Science: A Structured Programming Approach Using C
10
Calculator Program—Second Increment
Computer Science: A Structured Programming Approach Using C
11
Calculator Program—Second Increment
Computer Science: A Structured Programming Approach Using C
12
Calculator Program—Second Increment
Computer Science: A Structured Programming Approach Using C
13
Calculator Program—Second Increment
Computer Science: A Structured Programming Approach Using C
14
Calculator Program—Final Increment
Computer Science: A Structured Programming Approach Using C
15
Calculator Program—Final Increment
Computer Science: A Structured Programming Approach Using C
16
Calculator Program—Final Increment
Computer Science: A Structured Programming Approach Using C
17
Calculator Program—Final Increment
Computer Science: A Structured Programming Approach Using C
18
Topics discussed in this section:
4-8 Software Engineering In this section we discuss three different but related aspects of software engineering design: the structure chart, functional cohesion, and top–down development. Topics discussed in this section: Structure Charts Structure Chart Rules Functional Cohesion Top–Down Development Computer Science: A Structured Programming Approach Using C
19
FIGURE 4-34 Structure Chart Symbols
Computer Science: A Structured Programming Approach Using C
20
FIGURE 4-35 Structure Chart Design
Computer Science: A Structured Programming Approach Using C
21
Structure charts show only function flow; they contain no code.
Note Structure charts show only function flow; they contain no code. Computer Science: A Structured Programming Approach Using C
22
FIGURE 4-36 Common Functions in a Structure Chart
Computer Science: A Structured Programming Approach Using C
23
Table 4-1 Structure Chart Rules
Computer Science: A Structured Programming Approach Using C
24
FIGURE 4-37 Calculate Taxes Design
Computer Science: A Structured Programming Approach Using C
25
FIGURE 4-38 Design For Print Report
Computer Science: A Structured Programming Approach Using C
26
Top–down Development Example
PROGRAM 4-16 Top–down Development Example Computer Science: A Structured Programming Approach Using C
27
Top–down Development Example
PROGRAM 4-16 Top–down Development Example Computer Science: A Structured Programming Approach Using C
28
Top–down Development Example
PROGRAM 4-16 Top–down Development Example Computer Science: A Structured Programming Approach Using C
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.