Based on the tenet that good habits are formed early, authors Behrouz Forouzan and Richard Gilberg consistently emphasize the principles of structured programming and software engineering. Every complete program uses a consistent style. As programs are analyzed, styles and standards are further explained. Whenever possible, the authors develop the principle of a subject before they introduce the language implementation so the student understands the concept before dealing with the nuances of C++. Also, the vast array of figures and tables connects visually with students. By integrating software engineering principles and encouraging the student to resist the temptation to immediately code, the text builds a solid foundation in problem solving.
Table of Contents
1. INTRODUCTION TO COMPUTERS.
Computer Systems. Computer Hardware.
Computer Software. Computing Environments. Computer Languages. Writing, Editing,
Compiling, and Linking Programs. Program Execution. System Development. Tips and
Common Programming Errors. Key Terms. Summary. Practice Sets.
2. INTRODUCTION
TO THE C++ LANGUAGE.
Background. C++ Programs. Identifiers. Data Types.
Variables. Constants. Coding Constants. Reading and Writing Data. Programming
Examples. Tips and Common Programming Errors. Key Terms. Summary. Practice
Sets.
3. STRUCTURE OF A C++ PROGRAM.
Expressions. Precedence and
Associativity. Side Effects. Evaluating Expressions. Mixed Type Expressions.
Statements. Sample Programs. Tips and Common Programming Errors. Key Terms.
Summary. Practice Sets.
4. FUNCTIONS.
Designing Structured Programs.
Functions in C++. User-Defined Functions. Default Parameter Arguments. Standard
Library Functions. Scope. A Programming Example--Calculator Program. Tips and
Common Programming Errors. Key Terms. Summary. Practice Sets.
5.
SELECTION--MAKING DECISIONS.
Logical Data and Operators. Two-Way Selection.
Multiway Selection. More Standard Library Functions. A Menu Program. Tips and
Common Programming Errors. Key Terms. Summary. Practice Sets.
6.
REPETITION.
Concept of a Loop. Pretest and Post-Test Loops. Initialization
and Updating. Event-Controlled and Counter-Controlled Loops. Loops in C++. Loop
Examples. Other Statements Related to Looping. Looping Applications. Recursion.
A Programming Example--The Calculator Program. Tips and Common Programming
Errors. Key Terms. Summary. Practice Sets.
7. TEXT FILES.
Concept of a
File. Files and Streams. Standard Library Input/Output Functions. Formatting
Input and Output. File Example. Character Input/Output Functions. Character
Input/Output Examples. Detecting File Errors. Tips and Common Programming
Errors. Key Terms. Summary. Practice Sets.
8. ARRAYS.
Concepts. Using
Arrays in C++. Arrays and Functions. Array Applications. Sorting. Searching.
Two-Dimensional Arrays. Multidimensional Arrays. Programming Example--Calculate
Row and Column Averages. Tips and Common Programming Errors. Key Terms. Summary.
Practice Sets.
9. POINTERS.
Concepts. Pointer Variables. Accessing
Variables Through Pointers. Pointer Declaration and Definition. Initialization
of Pointer Variables. Pointers and Functions. Pointers to Pointers.
Compatibility. lvalue and rvalue. Pointer Applications. Arrays and Pointers.
Pointer Arithmetic and Arrays. Passing an Array to a Function. Understanding
Complicated Declarations. Memory Allocation Functions. Array of Pointers.
Programming Application. Tips and Common Programming Errors. Key Terms. Summary.
Practice Sets.
10. DERIVED TYPES--ENUMERATION, STRUCTURE, AND UNION.
The
Type Definition (typedef). Enumerated Types. Structure. Accessing Structures.
Complex Structures. Array of Structures. Unions. Tips and Common Programming
Errors. Key Terms. Summary. Practice Sets.
11. CLASSES.
Basic Class
Concepts. Defining a Class Object. Constructors and Destructors. Complex Class
Functions. Programming Applications. Tips and Common Programming Errors. Key
Terms. Summary. Practice Sets.
12. MORE CLASS FEATURES.
Inline Functions.
Initialization List. Overloading. Static Members. Tips and Common Programming
Errors. Key Terms. Summary. Practice Sets.
13. INHERITANCE.
Inheritance.
Static and Dynamic Binding: Polymorphism. Abstract Classes. Composition. Tips
and Common Programming Errors. Key Terms. Summary. Practice Sets.
14.
STRINGS.
String Concepts. C++ Strings. String Input/Output. Arrays of
Strings. String Manipulation Functions. A Programming Example--Morse Code. C
Strings. Tips and Common Programming Errors. Key Terms. Summary. Practice
Sets.
15. BINARY FILES.
Classification of Files. Using Binary Files.
Standard Library Functions for Files. Converting File Type. File Program
Examples. Tips and Common Programming Errors. Key Terms. Summary. Practice
Sets.
16. LINKED LISTS.
Linked List Structure. Basic Linked List
Functions. Linked List Design. Programming Example--Linked List Average. Tips
and Common Programming Errors. Key Terms. Summary. Practice Sets.
17.
TEMPLATES.
Function Template. Class Template. Tips and Common Programming
Errors. Key Terms. Summary. Practice Sets.
18. EXCEPTIONS.
User Defined
Exceptions. Standard Exceptions. Tips and Common Programming Errors. Key Terms.
Summary. Practice Sets.
Features
Updates strings coverage with a completely revised chapter that reflects the
ISO string class.
Includes new coverage of class templates and exception
handling.