text.skipToContent text.skipToNavigation
  1. Home
  2. Computer Science & IT
  3. C++ for Programmers

C++ for Programmers, 1st edition

  • Paul J. Deitel
  • Harvey M. Deitel

Published by Prentice Hall (January 23rd 2009) - Copyright © 2009

1st edition

C++ for Programmers

ISBN-13: 9780137001309

Includes: Paperback
Free delivery
$59.99

What's included

  • Paperback

    You'll get a bound printed text.

Overview

Table of contents

Preface      xxi
Before You Begin      xli


Chapter 1: Introduction      1
1.1   Introduction 2
1.2   History of C and C++ 3
1.3   C++ Standard Library 4
1.4   Key Software Trend: Object Technology 5
1.5   Typical C++ Development Environment 6
1.6   Notes About C++ and C++ for Programmers 8
1.7   Test-Driving a C++ Application 9
1.8   Software Technologies 15
1.9   Future of C++: Open Source Boost Libraries, TR1 and C++0x 16
1.10  Software Engineering Case Study: Introduction to Object Technology and the UML 16
1.11  Wrap-Up 21
1.12  Web Resources 22

Chapter 2: Introduction to C++ Programming      24
2.1   Introduction 25
2.2   First Program in C++: Printing a Line of Text 25
2.3   Modifying Our First C++ Program 28
2.4   Another C++ Program: Adding Integers 29
2.5   Arithmetic 33
2.6   Decision Making: Equality and Relational Operators 35
2.7   (Optional) Software Engineering Case Study: Examining the ATM Requirements Specification 38
2.8   Wrap-Up 47

Chapter 3: Introduction to Classes and Objects      48
3.1   Introduction 49
3.2   Classes, Objects, Member Functions and Data Members 49
3.3   Overview of the Chapter Examples 51
3.4   Defining a Class with a Member Function 52
3.5   Defining a Member Function with a Parameter 55
3.6   Data Members, set Functions and get Functions 58
3.7   Initializing Objects with Constructors 65
3.8   Placing a Class in a Separate File for Reusability 69
3.9   Separating Interface from Implementation 73
3.10  Validating Data with set Functions 79
3.11  (Optional) Software Engineering Case Study: Identifying the Classes in the ATM Requirements Specification 84
3.12  Wrap-Up 92

Chapter 4: Control Statements: Part 1      93
4.1   Introduction 94
4.2   Control Structures 94
4.3   if Selection Statement 97
4.4   if…else Double-Selection Statement 98
4.5   while Repetition Statement 102
4.6   Counter-Controlled Repetition 104
4.7   Sentinel-Controlled Repetition 108
4.8   Nested Control Statements 115
4.9    Assignment Operators 118
4.10  Increment and Decrement Operators 119
4.11  (Optional) Software Engineering Case Study: Identifying Class Attributes in the ATM System 122
4.12  Wrap-Up 127

Chapter 5: Control Statements: Part 2      128
5.1   Introduction 129
5.2   Essentials of Counter-Controlled Repetition 129
5.3   for Repetition Statement 131
5.4   Examples Using the for Statement 134
5.5   do…while Repetition Statement 139
5.6   switch Multiple-Selection Statement 141
5.7   break and continue Statements 151
5.8   Logical Operators 153
5.9   Confusing the Equality (==) and Assignment (=) Operators 158
5.10 (Optional) Software Engineering Case Study: Identifying Objects’ States and Activities in the ATM System 159
5.11 Wrap-Up 163

Chapter 6: Functions and an Introduction to Recursion      165
6.1   Introduction 166
6.2   Program Components in C++ 167
6.3   Math Library Functions 167
6.4   Function Definitions with Multiple Parameters 168
6.5   Function Prototypes and Argument Coercion 17

For teachers

All the material you need to teach your courses.

Discover teaching material