CART

(0) items

Absolute C++,9780201709278
This item qualifies for
FREE SHIPPING!

FREE SHIPPING OVER $59!

Your order must be $59 or more, you must select US Postal Service Shipping as your shipping preference, and the "Group my items into as few shipments as possible" option when you place your order.

Bulk sales, PO's, Marketplace Items, eBooks, Apparel, and DVDs not included.

Absolute C++

by
Edition:
CD
ISBN13:

9780201709278

ISBN10:
0201709279
Format:
Paperback
Pub. Date:
1/1/2002
Publisher(s):
Pearson College Div
List Price: $99.60
More New and Used
from Private Sellers
Starting at $1.19
See Prices

Rent Textbook

We're Sorry
Sold Out

Used Textbook

We're Sorry
Sold Out

eTextbook

We're Sorry
Not Available

New Textbook

We're Sorry
Sold Out

Related Products


  • Absolute C++ CodeMate Enhanced Edition
    Absolute C++ CodeMate Enhanced Edition




Summary

Absolute C++ , offers complete coverage of the C++ programming language. It provides all the tools necessary for experienced and novice programmers to master C++, including: thorough coverage of the Standard Template Library; complete and fully executable code throughout; sections highlighting programming tips and common pitfalls; and a logical order of coverage of C++ topics in order for students to better understand the language. This book is appropriate for introductory courses covering the C++ language, intermediate programming courses introducing C++ to students familiar with another language and will act as a total reference beyond a student's coursework.

Author Biography

Walter Savitch is a professor of computer science of the University of California, San Diego.

Table of Contents

C++ Basics
1(42)
Introduction to C++
2(4)
Origins of the C++ Language
2(1)
C++ and Object-Oriented Programming
3(1)
The Character of C++
3(1)
C++ Terminology
4(1)
A Sample C++ Program
4(2)
Variables, Expressions, and Assignment Statements
6(22)
Identifiers
6(2)
Variables
8(2)
Assignment Statements
10(2)
Pitfall Uninitialized Variables
12(1)
Tip Use Meaningful Names
13(1)
More Assignment Statements
13(1)
Assignment Compatibility
14(1)
Literals
15(2)
Escape Sequences
17(1)
Naming Constants
17(2)
Arithmetic Operators and Expressions
19(2)
Integer and Floating-Point Division
21(1)
PITFALL Division with Whole Numbers
22(1)
Type Casting
23(2)
Increment and Decrement Operators
25(2)
PITFALL Order of Evaluation
27(1)
Console Input/Output
28(7)
Output Using cout
28(1)
New Lines in Output
29(1)
TIP End Each Program with \n or end
30(1)
Formatting for Numbers with a Decimal Point
30(2)
Output with cerr
32(1)
Input Using cin
32(2)
TIP Line Breaks in I/O
34(1)
Program Style
35(1)
Comments
35(1)
Libraries and Namespaces
36(7)
Libraries and include Directives
36(1)
Namespaces
37(1)
PITFALL Problems with Library Names
38(1)
Chapter Summary
38(1)
Answers to Self-Test Exercises
39(2)
Programming Projects
41(2)
Flow of Control
43(48)
Boolean Expressions
44(10)
Building Boolean Expressions
44(1)
PITFALL Strings of Inequalities
45(1)
Evaluating Boolean Expressions
46(2)
Precedence Rules
48(4)
PITFALL Integer Values Can Be Used as Boolean Values
52(2)
Branching Mechanisms
54(12)
if-else Statements
54(2)
Compound Statements
56(1)
PITFALL Using = in Place of ==
57(1)
Omitting the else
58(1)
Nested Statements
59(1)
Multiway if-else Statement
59(2)
The switch Statement
61(2)
PITFALL Forgetting a break in a switch Statement
63(1)
TIP Use switch Statements for Menus
63(1)
Enumeration Types
64(1)
The Conditional Operator
64(2)
LOOPS
66(25)
The while and do-while Statements
66(3)
Increment and Decrement Operators Revisited
69(3)
The Comma Operator
72(1)
The for Statement
73(3)
TIP Repeat-N-Times Loops
76(1)
PITFALL Extra Semicolon in a for Statement
76(1)
PITFALL Infinite Loops
77(3)
The break and continue Statements
80(3)
Nested Loops
83(1)
Chapter Summary
83(1)
Answers to Self-Test Exercises
84(5)
Programming Projects
89(2)
Function Basics
91(42)
Predefined Functions
92(11)
Predefined Functions That Return a Value
92(5)
Predefined void Functions
97(2)
A Random Number Generator
99(4)
Programmer-Defined Functions
103(14)
Defining Functions That Return a Value
103(3)
Alternate Form for Function Declarations
106(1)
PITFALL Arguments in the Wrong Order
107(1)
PITFALL Use of the Terms Parameter and Argument
107(1)
Functions Calling Functions
107(1)
EXAMPLE A Rounding Function
107(3)
Functions That Return a Boolean Value
110(1)
Defining void Functions
111(1)
return Statements in void Functions
112(1)
Preconditions and Postconditions
113(2)
main Is a Function
115(1)
Recursive Functions
116(1)
Scope Rules
117(16)
Local Variables
117(3)
Procedural Abstraction
120(1)
Global Constants and Global Variables
121(3)
Blocks
124(1)
Nested Scopes
124(1)
TIP Use Function Calls in Branching and Loop Statements
125(1)
Variables Declared in a for Loop
125(1)
Chapter Summary
126(1)
Answers to Self-Test Exercises
127(3)
Programming Projects
130(3)
Parameters and Overloading
133(38)
Parameters
134(17)
Call-by-Value Parameters
134(3)
A First Look at Call-by-Reference Parameters
137(2)
Call-by-Reference Mechanism in Detail
139(2)
EXAMPLE The swapValues Function
141(1)
Constant Reference Parameters
142(1)
TIP Think of Actions, Not Code
143(1)
Mixed Parameter Lists
144(1)
TIP What Kind of Parameter to Use
145(1)
PITFALL Inadvertent Local Variables
146(1)
TIP Choosing Formal Parameter Names
147(1)
EXAMPLE Buying Pizza
147(4)
Overloading and Default Arguments
151(10)
Introduction to Overloading
151(3)
PITFALL Automatic Type Conversion and Overloading
154(2)
Rules for Resolving Overloading
156(1)
EXAMPLE Revised Pizza-Buying Program
157(2)
Default Arguments
159(2)
Testing and Debugging Functions
161(10)
The assert Macro
161(1)
Stubs and Drivers
162(3)
Chapter Summary
165(1)
Answers to Self-Test Exercises
166(2)
Programming Projects
168(3)
Arrays
171(52)
Introduction to Arrays
172(9)
Declaring and Referencing Arrays
172(3)
TIP Use for Loops with Arrays
175(1)
PITFALL Array Indexes Always Start with Zero
175(1)
TIP Use a Defined Constant for the Size of an Array
175(1)
Arrays in Memory
176(1)
PITFALL Array Index Out of Range
177(1)
Initializing Arrays
178(3)
Arrays in Functions
181(13)
Indexed Variables as Function Arguments
181(1)
Entire Arrays as Function Arguments
182(3)
The const Parameter Modifier
185(2)
PITFALL Inconsistent Use of const Parameters
187(1)
Functions That Return an Array
188(1)
EXAMPLE Production Graph
188(6)
Programming with Arrays
194(10)
Partially Filled Arrays
194(1)
TIP Do Not Skimp on Formal Parameters
194(3)
EXAMPLE Searching an Array
197(2)
EXAMPLE Sorting an Array
199(5)
Multidimensional Arrays
204(19)
Multidimensional Array Basics
204(1)
Multidimensional Array Parameters
205(2)
EXAMPLE Two-Dimensional Grading Program
207(4)
Chapter Summary
211(1)
Answers to Self-Test Exercises
212(4)
Programming Projects
216(7)
Structures and Classes
223(34)
Structures
224(12)
Structure Types
226(4)
PITFALL Forgetting a Semicolon in a Structure Definition
230(1)
Structures as Function Arguments
230(1)
TIP Use Hierarchical Structures
231(3)
Initializing Structures
234(2)
Classes
236(21)
Defining Classes and Member Functions
236(6)
Encapsulation
242(1)
Public and Private Members
243(4)
Accessor and Mutator Functions
247(1)
TIP Separate Interface and Implementation
248(1)
TIP A Test for Encapsulation
249(1)
Structures versus Classes
250(2)
TIP Thinking Objects
252(1)
Chapter Summary
252(1)
Answes to Self-Test Exercises
253(2)
Programming Projects
255(2)
Constructors and Other Tools
257(44)
Constructors
258(19)
Constructor Definitions
258(5)
PITFALL Constructors with No Arguments
263(2)
Explicit Constructor Calls
265(1)
TIP Always Include a Default Constructor
265(3)
EXAMPLE BankAccount Class
268(6)
Class Type Member Variables
274(3)
More Tools
277(13)
The const Parameter Modifier
277(2)
PITFALL Inconsistent Use of const
279(5)
Inline Functions
284(2)
Static Members
286(3)
Nested and Local Class Definitions
289(1)
Vectors---A Preview of the Standard Template Library
290(11)
Vector Basics
290(3)
PITFALL Using Square Brackets beyond the Vector Size
293(1)
TIP Vector Assignment Is Well Behaved
294(1)
Efficiency Issues
294(2)
Chapter Summary
296(1)
Answers to Self-Test Exercises
296(2)
Programming Projects
298(3)
Operator Overloading, Friends, and References
301(48)
Basic Operator Overloading
302(16)
Overloading Basics
303(5)
TIP A Constructor Can Return an Object
308(1)
Returning by const Value
309(3)
TIP Returning Member Variables of a Class Type
312(1)
Overloading Unary Operators
313(1)
Overloading as Member Functions
314(2)
TIP A Class Has Access to All Its Objects
316(1)
Overloading Function Application ( )
317(1)
PITFALL Overloading &&, II, and the Comma Operator
317(1)
Friend Functions and Automatic Type Conversion
318(6)
Constructors for Automatic Type Conversion
318(1)
PITFALL Member Operators and Automatic Type Conversion
319(1)
Friend Functions
320(3)
PITFALL Compilers without Friends
323(1)
Friend Classes
323(1)
References and More Overloaded Operators
324(25)
References
325(2)
PITFALL Returning a Reference to Certain Member Variables
327(1)
Overloading >> and <<
327(8)
TIP What Mode of Returned Value to Use
335(1)
The Assignment Operator
336(1)
Overloading the Increment and Decrement Operators
337(1)
Overloading the Array Operator []
337(4)
Overloading Based on L-Value versus R-Value
341(1)
Chapter Summary
342(1)
Answers to Self-Test Exercises
342(3)
Programming Projects
345(4)
Strings
349(54)
An Array Type for Strings
351(12)
C-String Values and C-String Variables
351(4)
PITFALL Using = and == with C-strings
355(2)
Other Functions in <cstring>
357(3)
C-String Input and Output
360(3)
Character Manipulation Tools
363(12)
Character I/O
363(1)
The Member Functions get and put
364(2)
EXAMPLE Checking Input Using a Newline Function
366(2)
PITFALL Unexpected '\n' in Input
368(1)
The putback, peek, and ignore Member Functions
369(3)
Character-Manipulating Functions
372(2)
PITFALL toupper and tolower Return int Values
374(1)
The Standard Class string
375(28)
Introduction to the Standard Class string
376(3)
I/O with the Class string
379(3)
TIP More Versions of getline
382(1)
PITFALL Mixing cin >> variable; and getline
383(1)
String Processing with the Class string
384(4)
EXAMPLE Palindrome Testing
388(4)
Converting between string Objects and C-Strings
392(1)
Chapter Summary
393(1)
Answers to Self-Test Exercises
393(4)
Programming Projects
397(6)
Pointers and Dynamic Arrays
403(54)
Pointers
404(18)
Pointer Variables
405(9)
Basic Memory Management
414(2)
PITFALL Dangling Pointers
416(1)
Dynamic Variables and Automatic Variables
416(1)
TIP Define Pointer Types
417(2)
PITFALL Pointers as Call-by-Value Parameters
419(2)
Uses for Pointers
421(1)
Dynamic Arrays
422(11)
Array Variables and Pointer Variables
422(1)
Creating and Using Dynamic Arrays
423(4)
EXAMPLE A Function That Returns an Array
427(2)
Pointer Arithmetic
429(1)
Multidimensional Dynamic Arrays
430(3)
Classes, Pointers, and Dynamic Arrays
433(24)
The -> Operator
433(1)
The this Pointer
434(1)
Overloading the Assignment Operator
435(2)
EXAMPLE A Class for Partially Filled Arrays
437(8)
Destructors
445(1)
Copy Constructors
446(5)
Chapter Summary
451(1)
Answers to Self-Test Exercises
452(2)
Programming Projects
454(3)
Separate Compilation and Namespaces
457(42)
Separate Compilation
458(15)
Encapsulation Reviewed
459(1)
Header Files and Implementation Files
460(8)
EXAMPLE DigitalTime Class
468(1)
TIP Reusable Components
469(1)
Using #ifndef
469(3)
TIP Defining Other Libraries
472(1)
Namespaces
473(26)
Namespaces and using Directives
473(2)
Creating a Namespace
475(3)
Using Declarations
478(2)
Qualifying Names
480(2)
EXAMPLE A Class Definition in a Namespace
482(1)
TIP Choosing a Name for a Namespace
482(2)
Unnamed Namespaces
484(6)
PITFALL Confusing the Global Namespace and the Unnamed Namespace
490(1)
TIP Unnamed Namespaces Replace the static Qualifier
491(1)
TIP Hiding Helping Functions
491(1)
Nested Namespaces
491(1)
TIP What Namespace Specification Should You Use?
492(3)
Chapter Summary
495(1)
Answers to Self-Test Exercises
495(2)
Programming Projects
497(2)
Streams and File I/O
499(48)
I/O Streams
501(16)
File I/O
501(5)
PITFALL Restrictions on Stream Variables
506(1)
Appending to a File
506(2)
TIP Another Syntax for Opening a File
508(1)
TIP Check That a File Was Opened Successfully
509(3)
Character I/O
512(1)
Checking for the End of a File
513(4)
Tools for Stream I/O
517(11)
File Names as Input
517(1)
Formatting Output with Stream Functions
518(3)
Manipulators
521(2)
Saving Flag Settings
523(1)
More Output Stream Member Functions
524(1)
EXAMPLE Cleaning Up a File Format
525(3)
EXAMPLE Editing a Text File
528(1)
Stream Hierarchies: A Preview of Inheritance
528(8)
Inheritance among Stream Classes
528(5)
EXAMPLE Another newLine Function
533(3)
Random Access to Files
536(11)
Chapter Summary
538(1)
Answers to Self-Test Exercises
539(2)
Programming Projects
541(6)
Recursion
547(36)
Recursive Void Functions
549(12)
EXAMPLE Vertical Numbers
549(3)
Tracing a Recursive Call
552(3)
A Closer Look at Recursion
555(1)
PITFALL Infinite Recursion
556(2)
Stacks for Recursion
558(1)
PITFALL Stack Overflow
559(1)
Recursion versus lteration
559(2)
Recursive Functions That Return a Value
561(5)
General Form for a Recursive Function That Returns a Value
561(1)
EXAMPLE Another Powers Function
561(5)
Thinking Recursively
566(17)
Recursive Design Techniques
566(2)
Binary Search
568(8)
Chapter Summary
576(1)
Answers to Self-Test Exercises
576(5)
Programming Projects
581(2)
Inheritance
583(44)
Inheritance Basics
584(22)
Derived Classes
584(10)
Constructors in Derived Classes
594(2)
PITFALL Use of Private Member Variables from the Base Class
596(2)
PITFALL Private Member Functions Are Effectively Not Inherited
598(1)
The Protected Qualifier
598(3)
Redefinition of Member Functions
601(2)
Redefining versus Overloading
603(1)
Access to a Redefined Base Function
604(1)
Functions That Are Not Inherited
605(1)
Programming with Inheritance
606(21)
Assignment Operators and Copy Constructors in Derived Classes
606(1)
Destructors in Derived Classes
607(1)
EXAMPLE Partially Filled Array with Backup
608(9)
PITFALL Same Object on Both Sides of the Assignment Operator
617(1)
EXAMPLE Alternate Implementation of PFArayDBak
617(1)
TIP A Class Has Access to Private Members of All Objects of the Class
618(2)
TIP ``Is a'' versus ``Has a''
620(1)
Protected and Private Inheritance
621(1)
Multiple Inheritance
622(1)
Chapter Summary
623(1)
Answers to Self-Test Exercises
623(2)
Programming Projects
625(2)
Polymorphism and Virtual Functions
627(26)
Virtual Function Basics
628(13)
Late Binding
628(1)
Virtual Functions in C++
629(7)
TIP The Virtual Property Is Inherited
636(1)
TIP When to Use a Virtual Function
636(1)
PITFALL Omitting the Definition of a Virtual Member Function
637(1)
Abstract Classes and Pure Virtual Functions
637(1)
EXAMPLE An Abstract Class
638(3)
Pointers and Virtual Functions
641(12)
Virtual Functions and Extended Type Compatibility
641(4)
PITFALL The Slicing Problem
645(1)
TIP Make Destructors Virtual
646(1)
Downcasting and Upcasting
647(2)
How C++ Implements Virtual Functions
649(1)
Chapter Summary
650(1)
Answers to Self-Test Exercises
651(1)
Programming Projects
651(2)
Templates
653(36)
Function Templates
654(13)
Syntax for Function Templates
656(3)
PITFALL Compiler Complications
659(2)
EXAMPLE A Generic Sorting Function
661(4)
TIP How to Define Templates
665(1)
PITFALL USing a Template with an Inappropriate Type
665(2)
Class Templates
667(11)
Syntax for Class Templates
667(4)
EXAMPLE An Array Template Class
671(6)
The vector and basic_string Templates
677(1)
Templates and Inheritance
678(11)
EXAMPLE Template Class for a Partially Filled Array with Backup
678(6)
Chapter Summary
684(1)
Answers to Self-Test Exercises
684(4)
Programming Projects
688(1)
Linked Data Structures
689(68)
Nodes and Linked Lists
691(24)
Nodes
691(5)
Linked Lists
696(2)
Inserting a Node at the Head of a List
698(2)
PITFALL Losing Nodes
700(2)
Inserting and Removing Nodes Inside a List
702(4)
PITFALL Using the Assignment Operator with Dynamic Data Structures
706(1)
Searching a Linked List
706(5)
EXAMPLE Template Version of Linked List Tools
711(4)
Linked List Applications
715(14)
EXAMPLE A Stack Template Class
715(7)
EXAMPLE A Queue Template Class
722(3)
TIP A Comment on Namespaces
725(1)
Friend Classes and Similar Alternatives
726(3)
Iterators
729(9)
Pointers as Iterators
729(1)
Iterator Classes
730(1)
EXAMPLE An Iterator Class
731(7)
Trees
738(19)
Tree Properties
739(3)
EXAMPLE A Tree Template Class
742(7)
Chapter Summary
749
Answers to Self-Test Exercises
747(7)
Programming Projects
754(3)
Exception Handling
757(30)
Exception Handling Basics
759(20)
A Toy Example of Exception Handling
759(9)
Defining Your Own Exception Classes
768(1)
Multiple Throws and Catches
768(4)
PITFALL Catch the More Specific Exception First
772(1)
TIP Exception Classes Can Be Trivial
773(1)
Throwing an Exception in a Function
773(2)
Exception Specification
775(2)
PITFALL Exception Specification in Derived Classes
777(2)
Programming Techniques for Exception Handling
779(8)
When to Throw an Exception
779(2)
PITFALL Uncaught Exceptions
781(1)
PITFALL Nested try--catch Blocks
781(1)
PITFALL Overuse of Exceptions
782(1)
Exception Class Hierarchies
782(1)
Testing for Available Memory
782(1)
Rethrowing an Exception
783(1)
Chapter Summary
784(1)
Answers to Self-Test Exercises
784(1)
Programming Projects
785(2)
Standard Template Library
787(50)
Iterators
789(14)
Iterator Basics
789(6)
Kinds of Iterators
795(3)
Constant and Mutable Iterators
798(2)
Reverse Iterators
800(2)
PITFALL Compiler Problems
802(1)
Other Kinds of Iterators
802(1)
Containers
803(14)
Sequential Containers
803(5)
PITFALL Iterators and Removing Elements
808(1)
TIP Type Definitions in Containers
808(1)
The Container Adapters stack and queue
809(1)
The Associative Containers set and map
810(5)
Efficiency
815(2)
Generic Algorithms
817(20)
Running Times and Big-O Notations
818(4)
Container Access Running Times
822(1)
Nonmodifying Sequence Algorithms
823(5)
Modifying Sequence Algorithms
828(1)
Set Algorithms
828(1)
Sorting Algorithms
829(2)
Chapter Summary
831(1)
Answers to Self-Test Exercises
832(1)
Programming Projects
833(4)
Patterns and UML
837(18)
Patterns
838(11)
Adapter Pattern
839(1)
The Model-View-Controller Pattern
839(2)
EXAMPLE A Sorting Pattern
841(4)
Efficiency of the Sorting Pattern
845(2)
TIP Pragmatics and Patterns
847(1)
Pattern Formalism
848(1)
UML
849(6)
History of UML
849(1)
UML Class Diagrams
850(1)
Class Interactions
850(1)
Chapter Summary
851(1)
Answers to Self-Test Exercises
851(2)
Programming Projects
853(2)
Appendix 1 C++ Keywords 855(2)
Appendix 2 Precedence of Operators 857(2)
Appendix 3 The ASCII Character Set 859(2)
Appendix 4 Some Library Functions 861(8)
Arithmetic Functions
861(1)
Input and Output Member Functions
862(1)
Character Functions
863(1)
C-String Functions
864(2)
string Class Functions
866(1)
Random Number Generator
867(1)
Trigonometric Functions
868(1)
Appendix 5 Old and New Header Files 869(2)
Further Reading 871(2)
Index 873


Please wait while the item is added to your cart...