Big C++

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Serving as an ideal introduction to C++ programming, this updated edition balances ease of learning the latest thinking on cognitive processes, current theoretical approaches, and innovative research techniques Shares additional guidance in the form of how-tos and walkthroughs throughout the chapters

Author(s): Cay S. Horstmann; Timothy A. Budd
Edition: 2
Publisher: Wiley
Year: 2008

Language: English
Pages: 1056

Copyright
Preface
Contents
Chapter 1: Introduction
What Is a Computer?
What Is Programming?
The Anatomy of a Computer
Translating Human-Readable Programs to Machine Code
Programming Languages
The Evolution of C++
Becoming Familiar with Your Computer
Compiling a Simple Program
Errors
The Compilation Process
Algorithms
Chapter 2: Numbers and Objects
Number Types
Input
Assignment
Constants
Arithmetic
Strings
Using Objects
Displaying Graphical Shapes (Optional)
Chapter 3: Control Flow
The if Statement
Relational Operators
Multiple Alternatives
Nested Branches
Boolean Operations
The while Loop
The for Loop
The do Loop
Nested Loops
Processing Inputs
Simulations
Chapter 4: Functions
Functions as Black Boxes
Implementing Functions
Function Comments
Return Values
Parameters
Side Effects
Procedures
Reference Parameters
Variable Scope and Global Variables
Stepwise Refinement
Case Study: From Pseudocode to Code
Walkthroughs
Preconditions
Unit Testing
The Debugger
Chapter 5: Classes
Discovering Classes
Interfaces
Encapsulation
Member Functions
Default Constructors
Constructors with Parameters
Accessing Data Fields
Comparing Member Functions with Nonmember Functions
Separate Compilation
Chapter 6: Vectors and Arrays
Using Vectors to Collect Data Items
Working with Vectors
Vector Parameters and Return Values
Removing and Inserting Vector Elements
Arrays
Chapter 7: Pointers
Pointers and Memory Allocation
Deallocating Dynamic Memory
Common Uses for Pointers
Arrays and Pointers
Pointers to Character Strings
Pointers to Functions
Chapter 8: Inheritance
Derived Classes
Calling the Base-Class Constructor
Overriding Member Functions
Polymorphism
Chapter 9: Streams
Reading and Writing Text Files
The Inheritance Hierarchy of Stream Classes
Stream Manipulators
String Streams
Command Line Arguments
Random Access
Chapter 10: Recursion
Triangle Numbers
Permutations
Thinking Recursively
Recursive Helper Functions
Mutual Recursion
The Efficiency of Recursion
Chapter 11: Sorting and Searching
Selection Sort
Profiling the Selection Sort Algorithm
Analyzing the Performance of the Selection Sort Algorithm
Merge Sort
Analyzing the Merge Sort Algorithm
Searching
Library Functions for Sorting and Binary Search
Chapter 12: Lists, Queues, and Stacks
Linked Lists
Implementing Linked LIsts
The Efficiency of List and Vector Operations
Queues and Stacks
Chapter 13: Sets, Maps, and Priority Queues
Sets
Binary Search Trees
Tree Traversal
Maps
Priority Queues
Heaps
Chapter 14: Operator Overloading
Operator Overloading
Case Study: Fractional Numbers
Overloading Simple Arithmetic Operators
Overloading Comparison Operators
Overloading Input and Output
Overloading Increment and Decrement Operators
Overloading the Assignment Operators
Overloading Conversion Operators
Overloading the Subscript Operator
Overloading the Function Call Operator
Case Study: Matrices
Chapter 15: Memory Management
Categories of Memory
Common Memory Errors
Constructors
Destructors
Reference Counting
Case Study: Matrices, Continued
Chapter 16: Templates
Template Functions
Compile-Time Polymorphism
Template Classes
Turning a Class into a Template
Nontype Template Parameters
Setting Behavior Using Template Parameters
Case Study: Matrices, Continued
Chapter 17: Exception Handling
Handling Exceptional Situations
Alternative Mechanisms for Handling Exceptions
Exceptions
Case Study: Matrices, Continued
Chapter 18: Name Scope Management
Encapsulation
Name Scopes
Protected Scope
Friends
Nested Classes
Private Inheritance
Name Spaces
Case Study: Matrices, Continued
Chapter 19: Class Hierarchies
Class Inheritance Hierarchies
Abstract Classes
Obtaining Run-Time Type Information
Multiple Inheritance
Software Frameworks
Chapter 20: The Standard Template Library
The STL
Iterators
The Fundamental Containers
Container Adapters
Associative Containers
Case Study: Dijkstra’s Shortest Algorithm
Functions, Generators, and Predicates
Generic Algorithms
Iterator Adapters
Case Study: File Merge Sort
Chapter 21: Features of the C++0x Standard
C++0x Design Objectives
Automatic Type Inference
Range-based for Loop
New Constructor Features
Regular Expressions
Lambda Functions
Controlling Default Implementations
Hash Tables
Concepts
Other Minor Changes
Chapter 22: Object-Oriented Design
The Software Life Cycle
CRC Cards
Cohesion
Coupling
Relationships Between Classes
Implementing Aggregations
Case Study: Printing an Invoice
Case Study: An Educational Game
Chapter 23: The Unified Modeling Language
The Unified Modeling Language
Use Cases
Sequence Diagrams
State Diagrams
Case Study: A Voice Mail System
Chapter 24: An Introduction to Design Patterns
Iterators
The Pattern Concept
The ADAPTER Pattern
The TEMPLATE METHOD Pattern
Function Objects and the STRATEGY Pattern
The COMPOSITE Pattern
Case Study: Putting Patterns to Work
Appendix A: C++ Language Coding Guidelines
Appendix B: Keyword Summary
Appendix C: Operator Summary
Appendix D: Character Codes
Appendix E: C++ Library Summary
Appendix F: Number Systems
Appendix G: Bit and Shift Operations
Appendix H: UML Summary
Appendix I: A C++ / Java Comparison
Glossary
Index
Illustration Credits