Page 59 - Introduction to Programming with Java: A Problem Solving Approach
P. 59
0.0 Last A-Head 25
CHAPTER 2
Algorithms and Design
Objectives
• Learn how to write an informal text description of what you want a computer program to do. • Understand how a flowchart describes what a computer program does.
• Become familiar with the standard well-structured control patterns.
• Learn how to structure conditional executions.
• Learn how to structure and terminate looping operations, including nested loops. • Learn how to “trace through” a program’s sequence of operation.
• See how you can describe program operation at different levels of detail.
Outline
Apago PDF Enhancer
2.1 Introduction
2.2 Output
2.3 Variables
2.4 OperatorsandAssignmentStatements
2.5 Input
2.6 FlowofControlandFlowcharts
2.7 ifStatements
2.8 Loops
2.9 LoopTerminationTechniques
2.10 NestedLooping
2.11 Tracing
2.12 Other Pseudocode Formats and Applications
2.13 ProblemSolving:AssetManagement(Optional)
2.1 Introduction
As indicated in Chapter 1, writing a computer program involves two basic activities: (1) figuring out what you want to do and (2) writing code to do it. You might be tempted to skip the first step and jump imme- diately to the second step—writing code. Try to resist that urge. Jumping immediately into the code often
25