Ch.11 slides exam 2

Ch.11 slides exam 2 - Introductionto ProgrammingStructures

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style  Programming Logic  Introduction to  Programming Structures Selected Topic from  Chapter 7
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
 Programming Logic  “Structured” programming means that all program code is written using one of 3 programming “control” structures. S Sequence S Decision S Loop/Iteration 2 “Structured” Programming
Background image of page 2
 Programming Logic  The simplest structure to write in that each  instruction is written one after another in the order  you wish the instructions to execute. The steps are executed exactly as written.  No alternate program paths exist. No lines of instructions are repeated.  Disadvantage: inflexible, program cannot adapt to  circumstances in the program as they occur. Example: a recorded macro is written using only  3 Sequence Control Structure
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
 Programming Logic  The most powerful programming structure! It is the only way a program can take an alternate  set of steps depending on something that happens  as the program runs. Uses the keywords IF, THEN, ELSE, END IF The structure begins with IF, ends with END IF. The instructions to execute if the condition is met  (TRUE) are written after the THEN keyword. 4 Decision Control Structure
Background image of page 4
 Programming Logic  Also called a “Loop” structure Allows the program to execute a set of steps a  number of time, depending on some condition  being met while the program runs Includes an implicit decision structure as a part of  the loop structure The loop condition performs a test each time the  loop iterates to determine if the set of steps needs  5 Iterative Control Structure
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
We will cover  Decision  and  Loop structures  in  more detail as separate topics.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 25

Ch.11 slides exam 2 - Introductionto ProgrammingStructures

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online