Problem Solving with C++
by Savitch, Walter-
This Item Qualifies for Free Shipping!*
*Excludes marketplace orders.
Rent Textbook
New Textbook
We're Sorry
Sold Out
Used Textbook
We're Sorry
Sold Out
eTextbook
We're Sorry
Not Available
How Marketplace Works:
- This item is offered by an independent seller and not shipped from our warehouse
- Item details like edition and cover design may differ from our description; see seller's comments before ordering.
- Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
- Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
- Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.
Summary
Table of Contents
| Introduction to Computers and C++ Programming | p. 1 |
| Computer Systems | p. 2 |
| Hardware | p. 2 |
| Software | p. 7 |
| High-Level Languages | p. 8 |
| Compilers | p. 9 |
| History Note | p. 12 |
| Programming and Problem-Solving | p. 12 |
| Algorithms | p. 12 |
| Program Design | p. 15 |
| Object-Oriented Programming | p. 17 |
| The Software Life Cycle | p. 17 |
| Introduction to C++ | p. 19 |
| Origins of the C++ Language | p. 19 |
| A Sample C++ Program | p. 20 |
| Pitfall: Using the Wrong Slash in \n | p. 24 |
| Programming Tip: Input and Output Syntax | p. 24 |
| Layout of a Simple C++ Program | p. 24 |
| Pitfall: Putting a Space before the include File Name | p. 26 |
| Compiling and Running a C++ Program | p. 27 |
| Programming Tip: Getting Your Program to Run | p. 27 |
| Testing and Debugging | p. 30 |
| Kinds of Program Errors | p. 30 |
| Pitfall: Assuming Your Program Is Correct | p. 31 |
| Chapter Summary | p. 32 |
| Answers to Self-Test Exercises | p. 33 |
| Programming Projects | p. 36 |
| C++ Basics | p. 39 |
| Variables and Assignments | p. 40 |
| Variables | p. 40 |
| Names: Identifiers | p. 42 |
| Variable Declarations | p. 44 |
| Assignment Statements | p. 45 |
| Pitfall: Uninitialized Variables | p. 47 |
| Programming Tip: Use Meaningful Names | p. 49 |
| Input and Output 50 Output Using cout | p. 50 |
| Include Directives and Namespaces | p. 52 |
| Escape Sequences | p. 53 |
| Programming Tip: End Each Program with a \n or endl | p. 55 |
| Formatting for Numbers with a Decimal Point | p. 55 |
| Input Using cin | p. 56 |
| Designing Input and Output | p. 58 |
| Programming Tip: Line Breaks in I/O | p. 58 |
| Data types and Expressions | p. 60 |
| The Types int and double | p. 60 |
| Other Number Types | p. 62 |
| The Type char | p. 63 |
| The Type bool | p. 64 |
| Introduction to the Class string | p. 65 |
| Type Compatibilities | p. 66 |
| Arithmetic Operators and Expressions | p. 69 |
| Pitfall: Whole Numbers in Division | p. 71 |
| More Assignment Statements | p. 73 |
| Simple flow of Control | p. 74 |
| A Simple Branching Mechanism | p. 74 |
| Pitfall: Strings of Inequalities | p. 80 |
| Pitfall: Using = in place of == | p. 81 |
| Compound Statements | p. 82 |
| Simple Loop Mechanisms | p. 84 |
| Increment and Decrement Operators | p. 87 |
| Programming Example: Charge Card Balance | p. 89 |
| Pitfall: Infinite Loops | p. 90 |
| Program Style | p. 93 |
| Indenting | p. 93 |
| Comments | p. 94 |
| Naming Constants | p. 96 |
| Chapter Summary | p. 98 |
| Answers to Self-Test Exercises | p. 99 |
| Programming Projects | p. 104 |
| More Flow of Control | p. 111 |
| Using Boolean Expressions | p. 112 |
| Evaluating Boolean Expressions | p. 112 |
| Pitfall: Boolean Expressions Convert to int Values | p. 116 |
| Enumeration Types (Optional) | p. 119 |
| Multiway Branches | p. 120 |
| Nested Statements | p. 120 |
| Programming Tip: Use Braces in Nested Statements | p. 121 |
| Multiway if-else Statements | p. 123 |
| Programming Example: State Income Tax | p. 125 |
| The switch Statement | p. 129 |
| Pitfall: Forgetting a break in a switch Statement | p. 133 |
| Using switch Statements for Menus | p. 134 |
| Blocks | p. 134 |
| Pitfall: Inadvertent Local Variables | p. 139 |
| More About C++ Loop Statements | p. 140 |
| The while Statements Reviewed | p. 141 |
| Increment and Decrement Operators Revisited | p. 142 |
| The for Statement | p. 145 |
| Pitfall: Extra Semicolon in a for Statement | p. 150 |
| What Kind of Loop to Use | p. 151 |
| Pitfall: Uninitialized Variables and Infinite Loops | p. 153 |
| The break Statement | p. 153 |
| Pitfall: The break Statement in Nested Loops | p. 155 |
| Designing Loops | p. 156 |
| Loops for Sums and Products | p. 156 |
| Ending a Loop | p. 157 |
| Nested Loops | p. 161 |
| Debugging L | |
| Table of Contents provided by Publisher. All Rights Reserved. |
An electronic version of this book is available through VitalSource.
This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.
By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.
Digital License
You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.
More details can be found here.
A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.
Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.
Please view the compatibility matrix prior to purchase.