Alice chap 4 - 4 THE LOGICAL STRUCTURE OF ALGORITHMS After...

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

View Full Document Right Arrow Icon
After finishing this chapter, you should be able to: o Provide a brief definition of the following terms: binary branching, binary bypass, binary choice, branch, concurrency, control variable, count-controlled loop, flowchart, linear sequence, loop, multiple branching, parallel algorithm, post-test loop, pre-test loop, pseudo-code, repetition sequence, selection sequence, sentinel loop, thread o List and describe the three major elements of logical structure found in algorithms and describe how they relate to one another o List several criteria that should be met by each linear sequence o Describe how binary bypass and binary choice branching routines work, create simple flowchart segments for each, pseudo-code for each, and implement each in at least one Alice method o Describe how count-controlled and sentinel loops work, create simple flowchart seg- ments for each, pseudo-code for each, and implement each in at least one Alice method o Describe what is meant by concurrent execution of instructions in an algorithm, and how to implement concurrent execution in Alice THE LOGICAL STRUCTURE OF ALGORITHMS 1 4
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Chapter 4 • The Logical Structure of Algorithms This chapter includes readings about the logical structure of algorithms—including linear sequences, selection sequences, repetition sequences, and concurrent execution of instruc- tions in an algorithm—followed by four tutorials that will provide you with experience implementing these in Alice. ELEMENTS OF LOGICAL STRUCTURE Algorithms contain the steps necessary to complete a particular task or solve a particular problem. A recipe for baking a cake will have a list of all the ingredients needed, as well as step-by-step instructions on what to do with those ingredients. The recipe provides an algo- rithm for baking a cake. When young children learn to perform long division, they are learning an algorithm. Professionals, such as engineers, architects, and doctors, apply many different algorithms in the course of their daily work. Some algorithms are simple; some can be quite long and complex. The Holtrop and Mennen Algorithm, which is used by naval architects to design the optimum propellers for an ocean going ship, involves several thousand steps and must be run on a computer. Algorithms are sequential in nature. There are examples where several instructions in an algorithm are executed at the same time, but generally, we can think of the instructions in an algorithm as being executed one at time. They form a kind of sequential logic. Modern approaches to developing software recognize that this is only part of the story, but program- mers still need to be able to design, manipulate, and implement sequential algorithms. They need to understand sequential logic. There are certain patterns that exist in the design of sequential logic. These patterns fall
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/17/2011 for the course CIS 106 taught by Professor Alice during the Spring '11 term at Community College of Philadelphia.

Page1 / 32

Alice chap 4 - 4 THE LOGICAL STRUCTURE OF ALGORITHMS After...

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

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