Discover the importance of learning C++ with Diane Zak's popular AN INTRODUCTION TO PROGRAMMING WITH C++, 8E. This book's distinctive emphasis clarifies how mastering C++ programming skills will benefit you now and throughout your career. This unique text incorporates a student-focused approach that continually highlights the importance and relevance of the programming concepts you are learning. Memorable new examples portray concepts in action, while abundant new hands-on exercises, including mini-quizzes, Labs, and "Try This" features, guide you in absorbing, practicing, and applying concepts as you progress. Trust AN INTRODUCTION TO PROGRAMMING WITH C++, 8E to keep you enthusiastic about learning as you master the skills of C++.
Author(s): Diane Zak
Edition: 8
Publisher: Cengage Learning
Year: 2015
Language: English
Pages: 768
Brief Contents
Contents
Preface
Read This before You Begin
Ch 1: An Introduction to Programming
Programming a Computer
A Brief History of Programming Languages
Control Structures
Chapter Summary
Key Terms
Review Questions
Exercises
Ch 2: Beginning the Problem-Solving Process
Problem Solving
Solving Everyday Problems
Creating Computer Solutions to Problems
Step 1-Analyze the Problem
Step 2-Plan the Algorithm
Step 3-Desk-Check the Algorithm
The Gas Mileage Problem
Chapter Summary
Key Terms
Review Questions
Exercises
Ch 3: Variables and Constants
Beginning Step 4 in the Problem-Solving Process
Selecting a Name for a Memory Location
Selecting a Data Type for a Memory Location
Selecting an Initial Value for a Memory Location
Declaring a Memory Location
Chapter Summary
Key Terms
Review Questions
Exercises
Ch 4: Completing the Problem-Solving Process
Finishing Step 4 in the Problem-Solving Process
Getting Data from the Keyboard
Displaying Messages on the Computer Screen
Arithmetic Operators in C++
Assignment Statements
Step 5-Desk-Check the Program
Step 6-Evaluate and Modify the Program
Chapter Summary
Key Terms
Review Questions
Exercises
Ch 5: The Selection Structure
Making Decisions
Flowcharting a Selection Structure
Coding Selection Structures in C++
Comparison Operators
Swapping Numeric Values
Displaying the Area or Circumference
Logical Operators
Using the Truth Tables
A Different Version of the Area or Circumference Program
Summary of Operators
Converting a Character to Uppercase or Lowercase
Formatting Numeric Output
Chapter Summary
Key Terms
Review Questions
Exercises
Ch 6: More on the Selection Structure
Nested Selection Structures
Flowcharting a Nested Selection Structure
Coding a Nested Selection Structure
Logic Errors in Selection Structures
Multiple-Alternative Selection Structures
Chapter Summary
Key Terms
Review Questions
Exercises
Ch 7: The Repetition Structure
Repeating Program Instructions
Using a Pretest Loop to Solve a Real-World Problem
The while Statement
Using Counters and Accumulators
Counter-Controlled Pretest Loops
The for Statement
Chapter Summary
Key Terms
Review Questions
Exercises
Ch 8: More on the Repetition Structure
Posttest Loops
Flowcharting a Posttest Loop
The do while Statement
Nested Repetition Structures
The Clock Program
The Car Depreciation Program
Chapter Summary
Key Terms
Review Questions
Exercises
Ch 9: Value-Returning Functions
Functions
Value-Returning Functions
The rand, srand, and time Functions
Creating Program-Defined Value-Returning Functions
Calling a Function
Function Prototypes
The Scope and Lifetime of a Variable
Chapter Summary
Key Terms
Review Questions
Exercises
Ch 10: Void Functions
Functions
Creating Program-Defined Void Functions
Passing Variables to a Function
Chapter Summary
Key Terms
Review Questions
Exercises
Ch 11: One-Dimensional Arrays
Arrays
One-Dimensional Arrays
The Calories Program
Passing a One-Dimensional Array to a Function
Calculating a Total and an Average
The Social Media Program-Searching an Array
The Currency Converter Program-Accessing an Individual Element
The Highest Number Program-Finding the Highest Value
Parallel One-Dimensional Arrays
Sorting the Data Stored in a One-Dimensional Array
Chapter Summary
Key Terms
Review Questions
Exercises
Ch 12: Two-Dimensional Arrays
Using Two-Dimensional Arrays
Accumulating the Values Stored in a Two-Dimensional Array
Searching a Two-Dimensional Array
Passing a Two-Dimensional Array to a Function
Chapter Summary
Key Term
Review Questions
Exercises
Ch 13: Strings
The string Data Type
Getting String Input from the Keyboard
The Primrose Auction House Program
Determining the Number of Characters in a string Variable
Accessing the Characters in a string Variable
Searching the Contents of a string Variable
Removing Characters from a string Variable
Replacing Characters in a string Variable
Inserting Characters within a string Variable
Duplicating a Character within a string Variable
Concatenating Strings
Chapter Summary
Key Terms
Review Questions
Exercises
Ch 14: Sequential Access Files
File Types
Creating File Objects
Opening a Sequential Access File
Writing Data to a Sequential Access File
Reading Information from a Sequential Access File
Closing a Sequential Access File
The eBook Collection Program
Chapter Summary
Key Terms
Review Questions
Exercises
Ch 15: Classes and Objects
Object-Oriented Terminology
Defining a Class in C++
Instantiating an Object and Referring to a Public Member
Example 1-A Class That Contains a Private Data Member and Public Member Methods
Example 2-A Class That Contains a Parameterized Constructor
Example 3-Reusing a Class
Example 4-A Class That Contains Overloaded Methods
Chapter Summary
Key Terms
Review Questions
Exercises
Appendix A: C++ Keywords
Appendix B: ASCII Codes
Appendix C: Common Syntax Errors
Appendix D: How to Boxes
Index