1 Overview of Programming and Problem Solving
1.1 Overview of Programming
What Is Programming?
How Do We Write a Program?
What Is an Algorithm?
What Is a Programming Language?
1.2 How Does a Computer Run a Program?
What Kinds of Instructions Can Be Written in a Program ming Language?
What Is Software Maintenance?
Software Maintenance Case Study: An Introduction to Software Maintenance
1.3 What's Inside the Computer?
1.4 Ethics and Responsibilities in the Computing Profession
Software Piracy
Privacy of Data
Use of Computer Resources
Software Engineering
1.5 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
Problem-Solving Case Study: Leap Year Algorithm
Summary
Quick Check Answers
Exam Preparation Exercises
Programming Warm-Up Exercises
Case Study Follow-Up
Line Number
2 C++ Syntax and Semantics, and the Program Development Process
2.1 The Elements of C++ Programs
C++ Program Structure
Syntax and Semantics
Syntax Templates
Naming Program Elements: Identifiers
Data and Data Types
Naming Elements: Declarations
Taking Action: Executable Statements
Beyond Minimalism: Adding Comments to a Program
2.2 Program Construction
Blocks (Compound Statements)
The C++ Preprocessor
Software Maintenance Case Study: Adding Titles to Names
2.3 More About Output
Creating Blank Lines
Inserting Blanks Within a Line