9. Control Structures

 

 

 

 

 

 

 

 

OBJECTIVES

After studying this chapter, you will

Be able to solve problems involving repetition.

Understand the differences among various loop structures.

Know the principles used to design effective loops.

Improve your algorithm design skills.

Understand the goals and principles of structured programming.

OUTLINE

Introduction

Flow of Control: Repetition Structures

Counting Loops

Example: Car Loan

Graphics Example: Drawing a Checkerboard

Conditional Loops

Example: Computing Averages

Example: Data Validation

Principles of Loop Design

The switch Multiway Selection Structure

Object-Oriented Design: Structured Programming Special Topic: What Can Be Computed?

Chapter Summary

Solutions to Self-Study Exercises Exercises

 

241