🗊Презентация Programming Logic and Design, Seventh Edition

Нажмите для полного просмотра!
Programming Logic and Design, Seventh Edition, слайд №1Programming Logic and Design, Seventh Edition, слайд №2Programming Logic and Design, Seventh Edition, слайд №3Programming Logic and Design, Seventh Edition, слайд №4Programming Logic and Design, Seventh Edition, слайд №5Programming Logic and Design, Seventh Edition, слайд №6Programming Logic and Design, Seventh Edition, слайд №7Programming Logic and Design, Seventh Edition, слайд №8Programming Logic and Design, Seventh Edition, слайд №9Programming Logic and Design, Seventh Edition, слайд №10Programming Logic and Design, Seventh Edition, слайд №11Programming Logic and Design, Seventh Edition, слайд №12Programming Logic and Design, Seventh Edition, слайд №13Programming Logic and Design, Seventh Edition, слайд №14Programming Logic and Design, Seventh Edition, слайд №15Programming Logic and Design, Seventh Edition, слайд №16Programming Logic and Design, Seventh Edition, слайд №17Programming Logic and Design, Seventh Edition, слайд №18Programming Logic and Design, Seventh Edition, слайд №19Programming Logic and Design, Seventh Edition, слайд №20Programming Logic and Design, Seventh Edition, слайд №21Programming Logic and Design, Seventh Edition, слайд №22Programming Logic and Design, Seventh Edition, слайд №23Programming Logic and Design, Seventh Edition, слайд №24Programming Logic and Design, Seventh Edition, слайд №25Programming Logic and Design, Seventh Edition, слайд №26Programming Logic and Design, Seventh Edition, слайд №27Programming Logic and Design, Seventh Edition, слайд №28Programming Logic and Design, Seventh Edition, слайд №29Programming Logic and Design, Seventh Edition, слайд №30Programming Logic and Design, Seventh Edition, слайд №31Programming Logic and Design, Seventh Edition, слайд №32

Вы можете ознакомиться и скачать презентацию на тему Programming Logic and Design, Seventh Edition. Доклад-сообщение содержит 32 слайдов. Презентации для любого класса можно скачать бесплатно. Если материал и наш сайт презентаций Mypresentation Вам понравились – поделитесь им с друзьями с помощью социальных кнопок и добавьте в закладки в своем браузере.

Слайды и текст этой презентации


Слайд 1





Programming Logic and Design
Seventh Edition
Chapter 3
Understanding Structure
Описание слайда:
Programming Logic and Design Seventh Edition Chapter 3 Understanding Structure

Слайд 2





Objectives
In this chapter, you will learn about:
The disadvantages of unstructured spaghetti code
The three basic structures—sequence, selection, and loop
Using a priming input to structure a program
The need for structure
Recognizing structure
Structuring and modularizing unstructured logic
Описание слайда:
Objectives In this chapter, you will learn about: The disadvantages of unstructured spaghetti code The three basic structures—sequence, selection, and loop Using a priming input to structure a program The need for structure Recognizing structure Structuring and modularizing unstructured logic

Слайд 3





The Disadvantages of Unstructured 
Spaghetti Code
Spaghetti code
Logically snarled program statements
Often a complicated mess
Programs often work but are difficult to read and maintain
Confusing and prone to error
Unstructured programs
Do not follow the rules of structured logic
Structured programs 
Follow the rules of structured logic
Описание слайда:
The Disadvantages of Unstructured Spaghetti Code Spaghetti code Logically snarled program statements Often a complicated mess Programs often work but are difficult to read and maintain Confusing and prone to error Unstructured programs Do not follow the rules of structured logic Structured programs Follow the rules of structured logic

Слайд 4


Programming Logic and Design, Seventh Edition, слайд №4
Описание слайда:

Слайд 5





Understanding the Three Basic Structures
Structure
Basic unit of programming logic 
Sequence structure
Perform actions in order
No branching or skipping any task
Selection structure (decision structure)
Ask a question, take one of two actions
Dual-alternative ifs or single-alternative ifs
Loop structure
Repeat actions while a condition remains true
Описание слайда:
Understanding the Three Basic Structures Structure Basic unit of programming logic Sequence structure Perform actions in order No branching or skipping any task Selection structure (decision structure) Ask a question, take one of two actions Dual-alternative ifs or single-alternative ifs Loop structure Repeat actions while a condition remains true

Слайд 6





Understanding the Three Basic Structures (continued)
Описание слайда:
Understanding the Three Basic Structures (continued)

Слайд 7





Understanding the Three Basic Structures (continued)
Описание слайда:
Understanding the Three Basic Structures (continued)

Слайд 8





Understanding the Three Basic Structures (continued)
Dual-alternative ifs
Contain two alternatives
The if-then-else structure
Описание слайда:
Understanding the Three Basic Structures (continued) Dual-alternative ifs Contain two alternatives The if-then-else structure

Слайд 9





Understanding the Three Basic Structures (continued)
Single-alternative ifs
An else clause is not required
null case
Situation where nothing is done
Описание слайда:
Understanding the Three Basic Structures (continued) Single-alternative ifs An else clause is not required null case Situation where nothing is done

Слайд 10





Understanding the Three Basic Structures (continued)
Описание слайда:
Understanding the Three Basic Structures (continued)

Слайд 11





Understanding the Three Basic Structures (continued)
Loop structure
Repeats a set of actions while a condition remains true
Loop body
Also called repetition or iteration
Condition is tested first in the most common form of loop
The while…do or while loop
Описание слайда:
Understanding the Three Basic Structures (continued) Loop structure Repeats a set of actions while a condition remains true Loop body Also called repetition or iteration Condition is tested first in the most common form of loop The while…do or while loop

Слайд 12





Understanding the Three Basic Structures (continued)
Описание слайда:
Understanding the Three Basic Structures (continued)

Слайд 13





Understanding the Three Basic Structures (continued)
Loop structure
Описание слайда:
Understanding the Three Basic Structures (continued) Loop structure

Слайд 14





Understanding the Three Basic Structures (continued)
All logic problems can be solved using only sequence, selection, and loop
Structures can be combined in an infinite number of ways
Stacking structures
Attaching structures end-to-end
End-structure statement
Indicates the end of a structure
The endif statement ends an if-then-else structure
The endwhile statement ends a loop structure
Описание слайда:
Understanding the Three Basic Structures (continued) All logic problems can be solved using only sequence, selection, and loop Structures can be combined in an infinite number of ways Stacking structures Attaching structures end-to-end End-structure statement Indicates the end of a structure The endif statement ends an if-then-else structure The endwhile statement ends a loop structure

Слайд 15





Understanding the Three Basic Structures (continued)
Описание слайда:
Understanding the Three Basic Structures (continued)

Слайд 16





Understanding the Three Basic Structures (continued)
Any individual task or step in a structure can be replaced by a structure
Nesting structures
Placing one structure within another
Indent the nested structure’s statements
Block
A group of statements that execute as a single unit
Описание слайда:
Understanding the Three Basic Structures (continued) Any individual task or step in a structure can be replaced by a structure Nesting structures Placing one structure within another Indent the nested structure’s statements Block A group of statements that execute as a single unit

Слайд 17





Understanding the Three Basic Structures (continued)
Описание слайда:
Understanding the Three Basic Structures (continued)

Слайд 18





Understanding the Three Basic Structures (continued)
Описание слайда:
Understanding the Three Basic Structures (continued)

Слайд 19





Understanding the Three Basic Structures (continued)
Описание слайда:
Understanding the Three Basic Structures (continued)

Слайд 20





Understanding the Three Basic Structures (continued)
Structured programs have the following characteristics:
Include only combinations of the three basic structures
Each structure has a single entry point and a single exit point
Structures can be stacked or connected to one another only at their entry or exit points
Any structure can be nested within another structure
Описание слайда:
Understanding the Three Basic Structures (continued) Structured programs have the following characteristics: Include only combinations of the three basic structures Each structure has a single entry point and a single exit point Structures can be stacked or connected to one another only at their entry or exit points Any structure can be nested within another structure

Слайд 21





Using a Priming Input to Structure
a Program
Priming input (or priming read)
Reads the first input data record
Is outside the loop that reads the rest of the records
Helps keep the program structured
Analyze a flowchart for structure one step at a time
Watch for unstructured loops that do not follow this order
First ask a question
Take action based on the answer
Return to ask the question again
Описание слайда:
Using a Priming Input to Structure a Program Priming input (or priming read) Reads the first input data record Is outside the loop that reads the rest of the records Helps keep the program structured Analyze a flowchart for structure one step at a time Watch for unstructured loops that do not follow this order First ask a question Take action based on the answer Return to ask the question again

Слайд 22





Using a Priming Input to Structure
a Program (continued)
Описание слайда:
Using a Priming Input to Structure a Program (continued)

Слайд 23





Using a Priming Input to Structure
a Program (continued)
Описание слайда:
Using a Priming Input to Structure a Program (continued)

Слайд 24


Programming Logic and Design, Seventh Edition, слайд №24
Описание слайда:

Слайд 25


Programming Logic and Design, Seventh Edition, слайд №25
Описание слайда:

Слайд 26





Understanding the Reasons for Structure
Clarity—unstructured programs are confusing
Professionalism—other programmers expect it
Efficiency—most languages support it
Ease of maintenance—other programmers find it easier to read
Supports modularity—easily broken down into modules
It can be difficult to detect whether a flowchart is structured
Описание слайда:
Understanding the Reasons for Structure Clarity—unstructured programs are confusing Professionalism—other programmers expect it Efficiency—most languages support it Ease of maintenance—other programmers find it easier to read Supports modularity—easily broken down into modules It can be difficult to detect whether a flowchart is structured

Слайд 27


Programming Logic and Design, Seventh Edition, слайд №27
Описание слайда:

Слайд 28





Recognizing Structure (continued)
Описание слайда:
Recognizing Structure (continued)

Слайд 29


Programming Logic and Design, Seventh Edition, слайд №29
Описание слайда:

Слайд 30


Programming Logic and Design, Seventh Edition, слайд №30
Описание слайда:

Слайд 31





Summary
Spaghetti code
Statements that do not follow rules of structured logic
Three basic structures
Sequence, selection, and loop
Combined by stacking and nesting
Priming input
Statement that reads the first input value prior to starting a structured loop
Описание слайда:
Summary Spaghetti code Statements that do not follow rules of structured logic Three basic structures Sequence, selection, and loop Combined by stacking and nesting Priming input Statement that reads the first input value prior to starting a structured loop

Слайд 32





Summary (continued)
Structured techniques promote: 
Clarity
Professionalism
Efficiency
Modularity
Flowcharts can be made structured by untangling
Logical steps can be rewritten to conform to the three structures
Описание слайда:
Summary (continued) Structured techniques promote: Clarity Professionalism Efficiency Modularity Flowcharts can be made structured by untangling Logical steps can be rewritten to conform to the three structures



Похожие презентации
Mypresentation.ru
Загрузить презентацию