did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780763732349

Programming in C++

by ;
  • ISBN13:

    9780763732349

  • ISBN10:

    0763732346

  • Edition: 3rd
  • Format: Paperback
  • Copyright: 2004-10-14
  • Publisher: Jones & Bartlett Learning
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $280.94 Save up to $1.40
  • Buy New
    $279.54
    Add to Cart Free Shipping Icon Free Shipping

    PRINT ON DEMAND: 2-4 WEEKS. THIS ITEM CANNOT BE CANCELLED OR RETURNED.

Supplemental Materials

What is included with this book?

Summary

Programming in C++, Third Edition  offers a focused, syntax intensive introduction to programming. Concise and straightforward, Programming in C++ is adapted from Programming and Problem Solving with C++, Fourth Edition, and retains the essential content of its parent book. The text provides students with a clear, accessible introduction to C++, object-oriented programming, And The fundamentals of software development. The authors have completely revamped the chapter goals and programming examples throughout, And The book includes a full set of new programming exercises in each chapter. Programming in C++, Third Edition is the ideal text for programming courses with an emphasis on science and engineering, As well as those seeking to cover all the fundamentals of programming in one semester.  

Table of Contents

Preface v
Overview of Programming and Problem Solving
1(24)
Overview of Programming
2(4)
How Do We Write a Program?
2(4)
What is a Programming Language?
6(5)
What is a Computer?
11(3)
Problem-Solving Techniques
14(11)
Ask Questions
15(1)
Look For Things That Are Familiar
15(1)
Solve by Analogy
15(1)
Means-Ends Analysis
16(1)
Divide and Conquer
17(1)
The Building-Block Approach
18(1)
Merging Solutions
18(1)
Mental Blocks: The Fear of Starting
19(1)
Algorithmic Problem Solving
19(1)
Summary
20(1)
Quick Check
21(1)
Exam Preparation Exercises
21(2)
Programming Warm-Up Exercises
23(2)
C++ Syntax and Semantics, and the Program Development Process
25(45)
The Elements of C++ Programs
26(19)
Syntax and Semantics
28(2)
Syntax Templates
30(2)
Naming Program Elements: Identifiers
32(1)
Data and Data Types
33(1)
Data Storage
34(1)
The char Data Type
34(1)
The string Data Type
34(1)
Naming Elements: Declarations
35(5)
Taking Action: Executable Statements
40(4)
Beyond Minimalism: Adding Comments to a Program
44(1)
Program Construction
45(7)
Blocks (Compound Statements)
47(2)
The C++ Preprocessor
49(1)
An Introduction to Namespaces
50(2)
More About Output
52(18)
Creating Blank Lines
52(1)
Inserting Blanks Within a Line
53(1)
Programming Example
54(5)
Testing and Debugging
59(1)
Summary
60(1)
Quick Check
60(2)
Exam Preparation Exercises
62(2)
Programming Warm-Up Exercises
64(2)
Programming Problems
66(1)
Programming Example Follow-Up
67(3)
Numeric Types, Expressions, and Output
70(39)
Numeric Data Types
70(1)
Integral Types
70(1)
Floating-Point Types
71(1)
Declarations for Numeric Types
71(2)
Named Constant Declarations
72(1)
Variable Declarations
73(1)
Simple Arithmetic Expressions
73(4)
Arithmetic Operators
73(3)
Increment and Decrement Operators
76(1)
Compound Arithmetic Expressions
77(5)
Precedence Rules
77(2)
Type Coercion and Type Casting
79(3)
Function Calls and Library Functions
82(4)
Value-Returning Functions
82(2)
Library Functions
84(1)
Void Functions
85(1)
Formatting the Output
86(6)
Additional string Operations
92(17)
The length and size Functions
92(2)
The find Function
94(1)
The substr Function
95(2)
Programming Example
97(3)
Testing and Debugging
100(1)
Summary
100(1)
Quick Check
101(1)
Exam Preparation Exercises
102(2)
Programming Warm-Up Exercises
104(1)
Programming Problems
105(2)
Programming Example Follow-Up
107(2)
Program Input and the Software Design Process
109(44)
Getting Data into Programs
110(8)
Input Streams and the Extraction Operator (>>)
110(3)
The Reading Marker and the Newline Character
113(1)
Reading Character Data with the get Function
114(2)
Skipping Characters with the ignore Function
116(1)
Reading String Data
117(1)
Interactive Input/Output
118(2)
Noninteractive Input/Output
120(1)
File Input and Output
121(7)
Files
121(1)
Using Files
122(3)
An Example Program Using Files
125(2)
Run-Time Input of File Names
127(1)
Input Failure
128(2)
Software Design Methodologies
130(1)
What Are Objects
131(1)
Object-Oriented Design
132(1)
Functional Decomposition
133(20)
Modules
135(2)
Programming Example
137(4)
Testing and Debugging
141(1)
Testing and Debugging Hints
142(1)
Summary
143(1)
Quick Check
144(1)
Exam Preparation Exercises
144(3)
Programming Warm-Up Exercises
147(2)
Programming Problems
149(2)
Programming Example Follow-Up
151(2)
Conditions, Logical Expressions, and Selection Control Structures
153(48)
Flow of Control
154(1)
Selection
155(1)
Conditions and Logical Expressions
155(10)
The bool Data Type
156(1)
Logical Expressions
156(7)
Precedence of Operators
163(1)
Relational Operators with Floating-Point Types
164(1)
The If Statement
165(6)
The If-Then-Else Statement
165(3)
Blocks (Compound Statements)
168(1)
The If-Then Statement
169(1)
A Common Mistake
170(1)
Nested If Statements
171(4)
The Dangling else
174(1)
Testing the State of an I/O System
175(26)
Programming Example
177(5)
Testing and Debugging
182(1)
Testing in the Problem-Solving Phase: The Algorithm Walk-Through
182(3)
Testing in the Implementation Phase
185(4)
Tests Performed Automatically During Compilation and Execution
189(1)
Testing and Debugging Hints
189(2)
Summary
191(1)
Quick Check
191(1)
Exam Preparation Exercises
192(2)
Programming Warm-Up Exercises
194(2)
Programming Problems
196(3)
Programming Example Follow-Up
199(2)
Looping
201(36)
The While Statement
202(1)
Phases of Loop Execution
203(1)
Loops Using the While Statement
204(7)
Count-Controlled Loops
204(1)
Event-Controlled Loops
205(4)
Looping Subtasks
209(2)
How to Design Loops
211(3)
Designing the Flow of Control
212(1)
Designing the Process Within the loop
213(1)
The Loop Exit
213(1)
Nested Logic
214(23)
Designing Nested Loops
215(1)
Programming Example
216(8)
Testing and Debugging
224(1)
Loop-Testing Strategy
224(1)
Testing and Debugging Hints
225(1)
Summary
226(1)
Quick Check
227(1)
Exam Preparation Exercises
228(3)
Programming Warm-Up Exercises
231(2)
Programming Problems
233(3)
Programming Example Follow Up
236(1)
Functions
237(42)
Functional Decomposition with Void Functions
238(3)
Writing Modules as Void Functions
238(3)
An Overview of User-Defined Functions
241(3)
Flow of Control in Function Calls
242(1)
Function Parameters
242(2)
Syntax and Semantics of Void Functions
244(5)
Function Call (Invocation)
244(1)
Function Declarations and Definitions
244(2)
Local Variables
246(1)
The Return Statement
247(1)
Header Files
248(1)
Parameters
249(5)
Value Parameters
249(2)
Reference Parameters
251(1)
Matching Arguments with Parameters
251(3)
Designing Functions
254(25)
Writing Assertions as Program Comments
256(1)
Documenting the Direction of Data Flow
257(3)
Programming Example
260(4)
Testing and Debugging
264(1)
The assert Library Function
265(2)
Testing and Debugging Hints
267(1)
Summary
268(1)
Quick Check
268(1)
Exam Preparation Exercises
269(2)
Programming Warm-Up Exercises
271(2)
Programming Problems
273(4)
Programming Example Follow-Up
277(2)
Scope, Lifetime, and More on Functions
279(40)
Scope of Identifiers
280(9)
Scope Rules
282(3)
Variable Declarations and Definitions
285(1)
Namespaces
286(3)
Lifetime of a Variable
289(2)
Initializations in Declarations
290(1)
Interface Design
291(2)
Side Effects
291(2)
Global Constants
293(1)
Value-Returning Functions
293(26)
Boolean Functions
296(2)
Interface Design and Side Effects
298(1)
When to Use Value-Returning Functions
298(2)
Programming Example
300(7)
Testing and Debugging
307(1)
Stubs and Drivers
308(1)
Testing and Debugging Hints
308(1)
Summary
309(1)
Quick Check
310(1)
Exam Preparation Exercises
311(2)
Programming Warm-Up Exercises
313(2)
Programming Problems
315(3)
Programming Example Follow-Up
318(1)
Additional Control Structures
319(28)
The Switch Statement
320(4)
The Do-While Statement
324(1)
The For Statement
325(4)
The Break and Continue Statements
329(3)
Guidelines for Choosing a Looping Statement
332(15)
Programming Example
333(5)
Testing and Debugging
338(1)
Testing and Debugging Hints
338(1)
Summary
339(1)
Quick Check
339(1)
Exam Preparation Exercises
340(2)
Programming Warm-Up Exercises
342(1)
Programming Problems
343(3)
Programming Example Follow-Up
346(1)
Simple Data Types: Built-In and User-Defined
347(54)
Built-In Simple Types
348(4)
Integral Types
350(1)
Floating-Point Types
351(1)
Additional C++ Operators
352(7)
Assignment Operators and Assignment Expressions
354(1)
Increment and Decrement Operators
354(1)
Bitwise Operators
355(1)
The Cast Operation
356(1)
The sizeof Operator
356(1)
The ?: Operator
357(1)
Operator Precedence
357(2)
Working With Character Data
359(8)
Character Sets
359(1)
C++ char Constants
360(1)
Programming Techniques
361(6)
More on Floating-Point Numbers
367(6)
Representation of Floating-Point Numbers
368(2)
Arithmetic with Floating-Point Numbers
370(3)
User-Defined Simple Types
373(7)
The Typedef Statement
373(1)
Enumeration Types
373(6)
Named and Anonymous Data Types
379(1)
User-Written Header Files
379(1)
More on Type Coercion
380(12)
Type Coercion in Arithmetic and Relational Expressions
381(1)
Type Coercion in Assignments, Argument Passing, and Return of a Functional Value
382(1)
Programming Example
383(7)
Testing and Debugging
390(1)
Floating-Point Data
390(1)
Coping with Input Errors
391(1)
Testing and Debugging Hints
391(1)
Summary
392(9)
Quick Check
393(1)
Exam Preparation Exercises
394(1)
Programming Warm-Up Exercises
395(1)
Programming Problems
396(3)
Programming Example Follow-Up
399(2)
Structured Types, Data Abstraction, and Classes
401(56)
Structured Data Types
402(1)
Records (Structs)
403(7)
Accessing Individual Components
405(1)
Aggregate Operations on Structs
406(2)
Hierarchical Records
408(2)
Unions
410(1)
Data Abstraction
411(1)
Abstract Data Types
411(3)
C++ Classes
414(7)
Classes, Class Objects, and Class Members
416(1)
Built-In Operations on Class Objects
416(3)
Class Scope
419(1)
Information Hiding
419(2)
Specification and Implementation Files
421(9)
The Specification File
421(2)
The Implementation File
423(5)
Compiling and Linking a Multifile Program
428(2)
Guaranteed Initialization with Class Constructors
430(27)
Invoking a Constructor
431(1)
Revised Specification and Implementation Files for Time
432(4)
Guidelines for Using Class Constructors
436(1)
Programming Example
437(7)
Testing and Debugging
444(3)
Testing and Debugging Hints
447(1)
Summary
448(1)
Quick Check
449(1)
Exam Preparation Exercises
450(2)
Programming Warm-Up Exercises
452(1)
Programming Problems
453(3)
Programming Example Follow-Up
456(1)
Arrays
457(54)
One-Dimensional Arrays
458(13)
Declaring Arrays
460(1)
Accessing Individual Components
460(2)
Out-of-Bounds Array Indexes
462(2)
Initializing Arrays in Declarations
464(1)
Examples of Declaring and Accessing Arrays
464(5)
Passing Arrays as Arguments
469(2)
Assertions About Arrays
471(1)
Using Typedef with Arrays
471(1)
Arrays of Records and Objects
471(3)
Arrays of Records
472(1)
Arrays of Class Objects
473(1)
Special Kinds of Array Processing
474(1)
Subarray Processing
474(1)
Indexes with Semantic Content
475(1)
Two-Dimensional Arrays
475(3)
Processing Two-Dimensional Arrays
478(6)
Sum the Rows
479(2)
Sum the Columns
481(1)
Initialize the Array
481(2)
Print the Array
483(1)
Passing Two-Dimensional Arrays as Arguments
484(2)
Another Way of Defining Two-Dimensional Arrays
486(2)
Multidimensional Arrays
488(23)
Programming Example
491(7)
Testing and Debugging
498(1)
One-Dimensional Arrays
498(1)
Multidimensional Arrays
499(1)
Testing and Debugging Hints
500(1)
Summary
501(1)
Quick Check
502(1)
Exam Preparation Exercises
503(3)
Programming Warm-Up Exercises
506(2)
Programming Problems
508(2)
Programming Example Follow-Up
510(1)
Array-Based Lists
511(56)
The List as an Abstract Data Type
512(7)
Unsorted Lists
519(12)
Basic Operations
519(3)
Insertion and Deletion
522(1)
Sequential Search
523(3)
Iterators
526(2)
Sorting
528(3)
Sorted Lists
531(13)
Basic Operations
534(1)
Insertion
534(3)
Sequential Search
537(1)
Binary Search
537(6)
Deletion
543(1)
Understanding Character Strings
544(23)
Initializing C Strings
547(1)
C String Input and Output
547(3)
C String Library Routines
550(2)
Programming Example
552(7)
Testing and Debugging
559(1)
Testing and Debugging Hints
560(1)
Summary
560(1)
Quick Check
561(1)
Exam Preparation Exercises
561(1)
Programming Warm-Up Exercises
562(2)
Programming Problems
564(1)
Programming Example Follow-Up
565(2)
Object-Oriented Software Development
567(52)
Object-Oriented Programming
568(1)
Objects
568(5)
Inheritance
573(11)
Deriving One Class from Another
574(2)
Specification of the ExtTime Class
576(3)
Implementation of the ExtTime Class
579(4)
Avoiding Multiple Inclusion of Header Files
583(1)
Composition
584(7)
Design of an Entry Class
584(6)
Constructor Initializer
590(1)
Dynamic Binding and Virtual Functions
591(5)
The Slicing Problem
592(2)
Virtual Functions
594(2)
Object-Oriented Design
596(1)
Step 1: Identify the Objects and Operations
596(1)
Step 2: Determine the Relationships Among Objects
597(1)
Step 3: Design the Driver
597(1)
Implementing the Design
597(22)
Programming Example
598(10)
Testing and Debugging
608(1)
Testing and Debugging Hints
609(1)
Summary
610(1)
Quick Check
610(1)
Exam Preparation Exercises
611(3)
Programming Warm-Up Exercises
614(2)
Programming Problems
616(2)
Programming Example Follow-Up
618(1)
Recursion
619(24)
What Is Recursion
620(6)
Recursive Algorithms with Sample Variables
Towers of Hanoi
626(5)
Recursive Algorithms with Structured Variables
631(1)
Recursion or Iteration?
632(11)
Testing and Debugging
634(1)
Testing and Debugging Hints
634(1)
Summary
635(1)
Quick Check
635(1)
Exam Preparation Exercises
635(2)
Programming Warm-Up Exercises
637(3)
Programming Problems
640(3)
Glossary 643(8)
Answers to Selected Exercises 651(32)
Appendices 683(22)
Index 705

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program