Preface 1 Overview of Programming and Problem Solving 1.1 Overview of Programming How Do We Write a Program? 1.2 What is a Programming Language? 1.3 What is a Computer? 1.4 Problem-Solving Techniques Ask Questions Look For Things That Are Familiar Solve by Analogy Means-Ends Analysis Divide and Conquer The Building-Block Approach Merging Solutions Mental Blocks: The Fear of Starting Algorithmic Problem Solving Summary Quick Check Exam Preparation Exercises Programming Warm-Up Exercises 2 C++ Syntax and Semantics,and the Program Development Process 2.1 The Elements of C++ Programs Syntax and Semantics Syntax Templates Naming Program Elements: Identifiers Data and Data Types Data Storage The char Data Type The string Data Type Naming Elements: Declarations Taking Action: Executable Statements Beyond Minimalism: Adding Comments to a Program 2.2 Program Construction Blocks (Compound Statements) The C++ Preprocessor An Introduction to Namespaces 2.3 More About Output Creating Blank Lines Inserting Blanks Within a Line Programming Example Testing and Debugging Summary Quick Check Exam Preparation Exercises Programming Warm-Up Exercises Programming Problems Programming Example Follow-Up 3 Numeric Types, Expressions, and Output 4 Program Input and the Software Design Process 5 Conditions, Logical Expressions, and Selection Control Structures 6 Looping 7 Functions 8 Scope, Lifetime, and More on Functions 9 Additional Control Structures 10 Simple Data Types: Built-In and User-Defined 11 Structured Types, Data Abstraction, and Classes 12 Arrays 13 Array-Based Lists 14 Object-Oriented Software Development 15 Recursion Glossary Answers to Selected Exercises Appendices Index