9780321531346

Problem Solving with C++

by
  • ISBN13:

    9780321531346

  • ISBN10:

    0321531345

  • Edition: 7th
  • Format: Paperback w/CD
  • Copyright: 1/1/2009
  • Publisher: Addison Wesley
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping On Orders Over $59!
    Your order must be $59 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $128.00

Summary

Now featuring new Video Notes, theSeventh EditionofProblem Solving with C++continues to be the most widely used textbook by students and instructors in the introduction to programming and C++ language course.Through each edition, hundreds and thousands of students have valued Walt Savitchrs"s approach to programming, which emphasizes active reading through the use of well-placed examples and self-test examples. Created for the beginner, this book focuses on cultivating strong problem-solving and programming techniques while introducing students to the C++ programming language. For all readers interested in the C++ programming language.

Table of Contents

Introduction to Computers and C++ Programmingp. 1
Computer Systemsp. 2
Hardwarep. 2
Softwarep. 7
High-Level Languagesp. 8
Compilersp. 9
History Notep. 12
Programming and Problem-Solvingp. 12
Algorithmsp. 12
Program Designp. 15
Object-Oriented Programmingp. 17
The Software Life Cyclep. 17
Introduction to C++p. 19
Origins of the C++ Languagep. 19
A Sample C++ Programp. 20
Pitfall: Using the Wrong Slash in \np. 24
Programming Tip: Input and Output Syntaxp. 24
Layout of a Simple C++ Programp. 24
Pitfall: Putting a Space before the include File Namep. 26
Compiling and Running a C++ Programp. 27
Programming Tip: Getting Your Program to Runp. 27
Testing and Debuggingp. 30
Kinds of Program Errorsp. 30
Pitfall: Assuming Your Program Is Correctp. 31
Chapter Summaryp. 32
Answers to Self-Test Exercisesp. 33
Programming Projectsp. 36
C++ Basicsp. 39
Variables and Assignmentsp. 40
Variablesp. 40
Names: Identifiersp. 42
Variable Declarationsp. 44
Assignment Statementsp. 45
Pitfall: Uninitialized Variablesp. 47
Programming Tip: Use Meaningful Namesp. 49
Input and Output 50 Output Using coutp. 50
Include Directives and Namespacesp. 52
Escape Sequencesp. 53
Programming Tip: End Each Program with a \n or endlp. 55
Formatting for Numbers with a Decimal Pointp. 55
Input Using cinp. 56
Designing Input and Outputp. 58
Programming Tip: Line Breaks in I/Op. 58
Data types and Expressionsp. 60
The Types int and doublep. 60
Other Number Typesp. 62
The Type charp. 63
The Type boolp. 64
Introduction to the Class stringp. 65
Type Compatibilitiesp. 66
Arithmetic Operators and Expressionsp. 69
Pitfall: Whole Numbers in Divisionp. 71
More Assignment Statementsp. 73
Simple flow of Controlp. 74
A Simple Branching Mechanismp. 74
Pitfall: Strings of Inequalitiesp. 80
Pitfall: Using = in place of ==p. 81
Compound Statementsp. 82
Simple Loop Mechanismsp. 84
Increment and Decrement Operatorsp. 87
Programming Example: Charge Card Balancep. 89
Pitfall: Infinite Loopsp. 90
Program Stylep. 93
Indentingp. 93
Commentsp. 94
Naming Constantsp. 96
Chapter Summaryp. 98
Answers to Self-Test Exercisesp. 99
Programming Projectsp. 104
More Flow of Controlp. 111
Using Boolean Expressionsp. 112
Evaluating Boolean Expressionsp. 112
Pitfall: Boolean Expressions Convert to int Valuesp. 116
Enumeration Types (Optional)p. 119
Multiway Branchesp. 120
Nested Statementsp. 120
Programming Tip: Use Braces in Nested Statementsp. 121
Multiway if-else Statementsp. 123
Programming Example: State Income Taxp. 125
The switch Statementp. 129
Pitfall: Forgetting a break in a switch Statementp. 133
Using switch Statements for Menusp. 134
Blocksp. 134
Pitfall: Inadvertent Local Variablesp. 139
More About C++ Loop Statementsp. 140
The while Statements Reviewedp. 141
Increment and Decrement Operators Revisitedp. 142
The for Statementp. 145
Pitfall: Extra Semicolon in a for Statementp. 150
What Kind of Loop to Usep. 151
Pitfall: Uninitialized Variables and Infinite Loopsp. 153
The break Statementp. 153
Pitfall: The break Statement in Nested Loopsp. 155
Designing Loopsp. 156
Loops for Sums and Productsp. 156
Ending a Loopp. 157
Nested Loopsp. 161
Debugging L
Table of Contents provided by Publisher. All Rights Reserved.

Rewards Program

Write a Review