Starting Out with C++: Early Objects, 6/e (Paperback)
暫譯: C++ 程式設計入門:早期物件,第 6 版 (平裝本)

Tony Gaddis, Judy Walters, Godfrey Muganda

  • 出版商: Addison Wesley
  • 出版日期: 2007-08-09
  • 售價: $4,820
  • 貴賓價: 9.5$4,579
  • 語言: 英文
  • 頁數: 1152
  • 裝訂: Paperback
  • ISBN: 0321512383
  • ISBN-13: 9780321512383
  • 相關分類: C++ 程式語言
  • 已絕版

買這商品的人也買了...

相關主題

商品描述

Description

Tony Gaddis’s accessible, step-by-step presentation helps beginning students understand the important details necessary to become skilled programmers at an introductory level. Gaddis motivates the study of both programming skills and the C++ programming language by presenting all the details needed to understand the “how” and the “why”—but never losing sight of the fact that most beginners struggle with this material. His approach is both gradual and highly accessible, ensuring that students understand the logic behind developing high-quality programs.

In Starting Out with C++: Early Objects, Gaddis covers objects and classes early after functions and before arrays and pointers. As with all Gaddis texts, clear and easy-to-read code listings, concise and practical real-world examples, and an abundance of exercises appear in every chapter. This text is intended for either a one-semester accelerated introductory course or a traditional two-semester sequence covering C++ programming

Table of Contents

Chapter 1 Introduction to Computers and Programming
1.1 Why Program?
1.2 Computer Systems: Hardware and Software
1.3 Programs and Programming Languages
1.4 What Is a Program Made of?
1.5 Input, Processing, and Output
1.6 The Programming Process
1.7 Procedural and Object-Oriented Programming
1.8 Case Studies
 
Chapter 2 Introduction to C++
2.1 The Parts of a C++ Program
2.2 The cout Object
2.3 The #include Directive
2.4 Standard and Prestandard C++
2.5 Variables, Constants, and the Assignment Statement
2.6 Identifiers
2.7 Integer Data Types
2.8 The char Data Type
2.9 The C++ string Class
2.10 Floating-Point Data Types
2.11 The bool Data Type
2.12 Determining the Size of a Data Type
2.13 More on Variable Assignments and Initialization
2.14 Scope
2.15 Arithmetic Operators
2.16 Comments
2.17 Focus on Software Engineering: Programming Style
2.18 Case Studies
 
Chapter 3 Expressions and Interactivity
3.1 The cin Object
3.2 Mathematical Expressions
3.3 Implicit Type Conversion
3.4 Explicit Type Conversion
3.5 Overflow and Underflow
3.6 Named Constants
3.7 Multiple and Combined Assignment
3.8 Formatting Output
3.9 Working with Characters and String Objects
3.10 Using C-Strings
3.11 More Mathematical Library Functions
3.12 Introduction to Files
3.13 Focus on Object-Oriented Programming: Member Functions
3.14 Focus on Debugging: Hand Tracing a Program
3.15 Green Fields Landscaping Case Study—Part 1

Chapter 4 Making Decisions
4.1 Relational Operators
4.2 The if Statement
4.3 The if/else Statement
4.4 The if/else if Statement
4.5 Menus
4.6 Nested if Statements
4.7 Logical Operators
4.8 Validating User Input
4.9 More About Variable Definitions and Scope
4.10 Comparing Characters and Strings
4.11 The Conditional Operator
4.12 The switch Statement
4.13 Enumerated Data Types
4.14 Testing for File Open Errors
4.15 Focus on Testing and Debugging: Validating Output Results
4.16 Green Fields Landscaping Case Study—Part 2
4.17 Additional Case Studies

Chapter 5 Looping
5.1 The Increment and Decrement Operators
5.2 Introduction to Loops: The while Loop
5.3 Using the while Loop for Input Validation
5.4 Counters
5.5 The do-while Loop
5.6 The for Loop
5.7 Keeping a Running Total
5.8 Sentinels
5.9 Using a Loop to Read Data From a File
5.10 Focus on Software Engineering: Deciding Which Loop to Use
5.11 Nested Loops
5.12 Breaking Out of a Loop
5.13 The continue Statement
5.14 Focus on Testing and Debugging: Creating Good Test Data
5.15 Central Mountain Credit Union Case Study
5.16 Additional Case Studies

Chapter 6 Functions
6.1 Modular Programming
6.2 Defining and Calling Functions
6.3 Function Prototypes
6.4 Sending Data into a Function
6.5 Passing Data by Value
6.6 The return Statement
6.7 Returning a Value from a Function
6.8 Returning a Boolean Value
6.9 Using Functions in a Menu-Driven Program
6.10 Local and Global Variables
6.11 Static Local Variables
6.12 Default Arguments
6.13 Using Reference Variables as Parameters
6.14 Overloading Functions
6.15 The exit() Function
6.16 Stubs and Drivers
6.17 Case Study: Little Lotto
6.18 Additional Case Studies
 
Chapter 7 Introduction to Classes and Objects
7.1 Combining Data into Structures
7.2 Accessing Structure Members
7.3 Initializing a Structure
7.4 Nested Structures
7.5 Structures as Function Arguments
7.6 Returning a Structure from a Function
7.7 Unions
7.8 Abstract Data Types
7.9 Object-Oriented Programming
7.10 Introduction to Classes
7.11 Introduction to Objects
7.12 Defining Member Functions
7.13 Focus on Software Engineering: Separating Class Specification from Implementation
7.14 Using a Constructor with a Class
7.15 Overloading Constructors
7.16 Destructors
7.17 Input Validation Objects
7.18 Using Private Member Functions
7.19 Home Software Company OOP Case Study
7.20 Introduction to Object-Oriented Analysis
7.21 Focus on Object-Oriented Design: Finding the Classes and their Responsibilities
7.22 Additional Case Studies

Chapter 8 Arrays
8.1 Arrays Hold Multiple Values
8.2 Accessing Array Elements
8.3 Inputting and Displaying Array Contents
8.4 Array Initialization
8.5 Processing Array Contents
8.6 Using Parallel Arrays
8.7 The typedef Statement
8.8 Arrays as Function Arguments
8.9 Two-Dimensional Arrays
8.10 Arrays with Three or More Dimensions
8.11 Vectors
8.12 National Commerce Bank Case Study
8.13 Arrays of Structures
8.14 Arrays of Class Objects
8.15 Additional Case Studies
 
Chapter 9 Searching, Sorting, and Algorithm Analysis
9.1 Introduction to Search Algorithms
9.2 Searching an Array of Objects or Structures
9.3 Introduction to Sorting Algorithms
9.4 Sorting an Array of Objects or Structures
9.5 Sorting and Searching Vectors
9.6 Introduction to Analysis of Algorithms
9.7 Case Studies

Chapter 10 Pointers
10.1 Pointers and the Address Operator
10.2 Pointer Variables
10.3 The Relationship Between Arrays and Pointers
10.4 Pointer Arithmetic
10.5 Initializing Pointers
10.6 Comparing Pointers
10.7 Pointers as Function Parameters
10.8 Focus on Software Engineering: Dynamic Memory Allocation
10.9 Focus on Software Engineering: Returning Pointers from Functions
10.10 Pointers to Structures and Class Objects
10.11 Focus on Software Engineering: Selecting Members of Objects
10.12 United Cause Relief Agency Case Study
10.13 Additional Case Studies
 
Chapter 11 More About Classes and Object-Oriented Programming
11.1 The this Pointer and Constant Member Functions
11.2 Static Members
11.3 Friends of Classes
11.4 Memberwise Assignment
11.5 Copy Constructors
11.6 Operator Overloading
11.7 Type Conversion Operators
11.8 Convert Constructors
11.9 Object Composition
11.10 Inheritance
11.11 Protected Members and Class Access
11.12 Constructors, Destructors, and Inheritance
11.13 Overriding Base Class Functions
11.14 Case Studies
 
Chapter 12 More About Characters, Strings, and the string Class
12.1 C-strings
12.2 Library Functions for Working with C-Strings
12.3 String/Numeric Conversion Functions
12.4 Character Testing
12.5 Character Case Conversion
12.6 Writing Your Own C-String Handling Functions
12.7 More About the C++ string Class
12.8 Creating Your Own String Class
12.9 Advanced Software Enterprises Case Study
12.10 Additional Case Studies
 
Chapter 13 Advanced File and I/O Operations
13.1 Files
13.2 Output Formatting
13.3 Passing File Stream Objects to Functions
13.4 More Detailed Error Testing
13.5 Member Functions for Reading and Writing Files
13.6 Working with Multiple Files
13.7 Binary Files
13.8 Creating Records with Structures
13.9 Random-Access Files
13.10 Opening a File for Both Input and Output
13.11 Online Friendship Connections Case Study: Object Serialization
13.12 Additional Case Studies
 
Chapter 14 Recursion
14.1 Introduction to Recursion
14.2 The Recursive Factorial Function
14.3 The Recursive gcd Function
14.4 Solving Recursively Defined Problems
14.5 A Recursive Binary Search Function
14.6 Focus on Problem Solving and Program Design: The QuickSort Algorithm
14.7 Recursion Example: The Towers of Hanol
14.8 Focus on Problem Solving: Exhaustive and Enumeration Algorithms
14.9 Focus on Software Engineering: Recursion Versus Iteration
14.10 Case Studies

Chapter 15 Polymorphism, Virtual Functions, and Multiple Inheritance
15.1 Type Compatibility in Inheritance Hierarchies
15.2 Polymorphism and Virtual Member Functions
15.3 Abstract Base Classes and Pure Virtual Functions
15.4 Multiple and Virtual Inheritance
15.5 Focus on Object-Oriented Programming: Composition Versus Inheritance
15.6 Secure Encryption Systems, Inc. Case Study
 
Chapter 16 Exceptions, Templates, and the Standard Template Library (STL)
16.1 Exceptions
16.2 Function Templates
16.3 Class Templates
16.4 Class Templates and Inheritance
16.5 Introduction to the Standard Template Library
16.6 Case Studies
 
Chapter 17 Linked Lists
17.1 Introduction to the Linked List ADT
17.2 Linked List Operations
17.3 A Linked List Template
17.4 Recursive Linked List Operations
17.5 Variations of the Linked List
17.6 The STL list Container
17.7 Reliable Software Systems, Inc. Case Study
17.8 Additional Case Studies
 
Chapter 18 Stacks and Queues
18.1 Introduction to the Stack ADT
18.2 Dynamic Stacks
18.3 The STL stack Container
18.4 Introduction to the Queue ADT
18.5 Dynamic Queues
18.6 The STL deque and queue Containers
18.7 Focus on Problem Solving and Program Design: Eliminating Recursion
 
Chapter 19 Binary Trees
19.1 Definition and Applications of Binary Trees
19.2 Binary Search Tree Operations
19.3 Template Considerations for Binary Search Trees
19.4 Case Studies

Appendix A The ASCII Character Set
Appendix B Operator Precedence and Associativity

Index
 
Appendices on the accompanying student CD:
Appendix C An Object-Oriented System Development Primer
Appendix D Using UML in Class Design
Appendix E Namespaces
Appendix F Passing Command Line Arguments
Appendix G Header File and Library Function Reference
Appendix H Binary Numbers and Bitwise Operations
Appendix I C++ Casts and Run-Time Type Identification
Appendix J Multi-Source File Programs
Appendix K Introduction to Microsoft Visual C++ 2005
Appendix L Introduction to Borland C++ Builder 6.0
Appendix M Introduction to Microsoft Visual C++ 2003
Appendix N .NET and Managed C++
Appendix O Introduction to Flowcharting
Appendix P Answers to Checkpoints
Appendix Q Answers to Odd-Numbered Review Questions 

商品描述(中文翻譯)

**描述**
Tony Gaddis 的易懂、逐步介紹幫助初學者理解成為熟練程式設計師所需的重要細節。Gaddis 透過呈現理解「如何」和「為什麼」所需的所有細節,來激勵學習程式設計技能和 C++ 程式語言,但始終不忘大多數初學者在這些材料上會遇到困難。他的教學方法既漸進又非常易於理解,確保學生能理解開發高品質程式的邏輯。
在《Starting Out with C++: Early Objects》中,Gaddis 在介紹函數後、陣列和指標之前,早早地涵蓋了物件和類別。與所有 Gaddis 的教材一樣,每一章都包含清晰易讀的程式碼清單、簡潔且實用的現實世界範例,以及大量的練習題。本書適合用於一學期的加速入門課程或傳統的兩學期 C++ 程式設計課程。

**目錄**
**第 1 章 電腦與程式設計簡介**
1.1 為什麼要程式設計?
1.2 電腦系統:硬體與軟體
1.3 程式與程式語言
1.4 程式由什麼組成?
1.5 輸入、處理與輸出
1.6 程式設計過程
1.7 程序式與物件導向程式設計
1.8 案例研究

**第 2 章 C++ 簡介**
2.1 C++ 程式的組成部分
2.2 cout 物件
2.3 #include 指令
2.4 標準與預標準 C++
2.5 變數、常數與賦值語句
2.6 識別符
2.7 整數資料類型
2.8 char 資料類型
2.9 C++ string 類別
2.10 浮點數資料類型
2.11 bool 資料類型
2.12 確定資料類型的大小
2.13 變數賦值與初始化的更多內容
2.14 範圍
2.15 算術運算符
2.16 註解
2.17 專注於軟體工程:程式設計風格
2.18 案例研究

**第 3 章 表達式與互動性**
3.1 cin 物件
3.2 數學表達式
3.3 隱式類型轉換
3.4 顯式類型轉換
3.5 溢出與下溢
3.6 命名常數
3.7 多重與組合賦值
3.8 格式化輸出
3.9 處理字元與字串物件
3.10 使用 C 字串
3.11 更多數學庫函數
3.12 檔案簡介
3.13 專注於物件導向程式設計:成員函數
3.14 專注於除錯:手動追蹤程式
3.15 Green Fields Landscaping 案例研究—第 1 部分

**第 4 章 做出決策**
4.1 關係運算符
4.2 if 語句
4.3 if/else 語句
4.4 if/else if 語句
4.5 菜單
4.6 嵌套 if 語句
4.7 邏輯運算符
4.8 驗證使用者輸入
4.9 變數定義與範圍的更多內容
4.10 比較字元與字串
4.11 條件運算符
4.12 switch 語句
4.13 列舉資料類型
4.14 測試檔案開啟錯誤
4.15 專注於測試與除錯:驗證輸出結果
4.16 Green Fields Landscaping 案例研究—第 2 部分
4.17 其他案例研究

**第 5 章 迴圈**
5.1 增量與減量運算符
5.2 迴圈簡介:while 迴圈
5.3 使用 while 迴圈進行輸入驗證
5.4 計數器
5.5 do-while 迴圈
5.6 for 迴圈
5.7 保持累計總和
5.8 哨兵
5.9 使用迴圈從檔案讀取資料
5.10 專注於軟體工程:決定使用哪種迴圈
5.11 嵌套迴圈
5.12 跳出迴圈
5.13 continue 語句
5.14 專注於測試與除錯:創建良好的測試資料
5.15 Central Mountain Credit Union 案例研究
5.16 其他案例研究

**第 6 章 函數**
6.1 模組化程式設計
6.2 定義與呼叫函數
6.3 函數原型
6.4 將資料傳入函數
6.5 按值傳遞資料
6.6 return 語句
6.7 從函數返回值
6.8 返回布林值
6.9 在菜單驅動程式中使用函數
6.10 本地與全域變數
6.11 靜態本地變數
6.12 預設參數
6.13 使用參考變數作為參數
6.14 函數重載
6.15 exit() 函數
6.16 存根與驅動程式
6.17 案例研究:Little Lotto
6.18 其他案例研究

**第 7 章 類別與物件簡介**
7.1 將資料組合成結構
7.2 訪問結構成員
7.3 初始化結構
7.4 嵌套結構
7.5 結構作為函數參數
7.6 從函數返回結構
7.7 聯合
7.8 抽象資料類型
7.9 物件導向程式設計
7.10 類別簡介
7.11 物件簡介
7.12 定義成員函數
7.13 專注於軟體工程:將類別規範與實作分開
7.14 使用建構函數與類別
7.15 重載建構函數
7.16 解構函數
7.17 輸入驗證物件
7.18 使用私有成員函數
7.19 家庭軟體公司 OOP 案例研究
7.20 物件導向分析簡介
7.21 專注於物件導向設計:尋找類別及其責任
7.22 其他案例研究

**第 8 章 陣列**
8.1 陣列持有多個值
8.2 訪問陣列元素
8.3 輸入與顯示陣列內容
8.4 陣列初始化
8.5 處理陣列內容
8.6 使用平行陣列
8.7 typedef 語句
8.8 陣列作為函數參數
8.9 二維陣列
8.10 三維或更多維的陣列
8.11 向量
8.12 National Commerce Bank 案例研究
8.13 結構的陣列
8.14 類別物件的陣列
8.15 其他案例研究

**第 9 章 搜尋、排序與演算法分析**
9.1 搜尋演算法簡介
9.2 搜尋物件或結構的陣列
9.3 排序演算法簡介
9.4 排序物件或結構的陣列
9.5 排序與搜尋向量
9.6 演算法分析簡介
9.7 案例研究

**第 10 章 指標**
10.1 指標與地址運算符
10.2 指標變數
10.3 陣列與指標之間的關係
10.4 指標運算
10.5 初始化指標
10.6 比較指標
10.7 指標作為函數參數
10.8 專注於軟體工程:動態記憶體分配
10.9 專注於軟體工程:從函數返回指標
10.10 指向結構和類別物件的指標
10.11 專注於軟體工程:選擇物件的成員
10.12 United Cause Relief Agency 案例研究
10.13 其他案例研究

**第 11 章 類別與物件導向程式設計的更多內容**
11.1 this 指標與常數成員函數
11.2 靜態成員
11.3 類別的朋友
11.4 成員間的賦值
11.5 複製建構函數
11.6 運算符重載
11.7 類型轉換運算符
11.8 轉換建構函數
11.9 物件組合
11.10 繼承
11.11 受保護成員與類別訪問
11.12 建構函數、解構函數與繼承
11.13 重寫基類函數
11.14 案例研究

**第 12 章 字元、字串與 string 類別的更多內容**
12.1 C 字串
12.2 處理 C 字串的庫函數
12.3 字串/數字轉換函數
12.4 字元測試
12.5 字元大小寫轉換
12.6 編寫自己的 C 字串處理函數
12.7 C++ string 類別的更多內容
12.8 創建自己的字串類別
12.9 Advanced Software Enterprises 案例研究
12.10 其他案例研究

**第 13 章 進階檔案與 I/O 操作**
13.1 檔案
13.2 輸出格式化
13.3 將檔案流物件傳遞給函數
13.4 更詳細的錯誤測試
13.5 讀取與寫入檔案的成員函數
13.6 處理多個檔案
13.7 二進位檔案
13.8 使用結構創建記錄
13.9 隨機存取檔案
13.10 同時開啟檔案進行輸入與輸出
13.11 Online Friendship Connections 案例研究:物件序列化
13.12 其他案例研究

**第 14 章 遞迴**
14.1 遞迴簡介
14.2 遞迴階乘函數
14.3 遞迴 gcd 函數
14.4 解決遞迴定義的問題
14.5 遞迴二元搜尋函數
14.6 專注於問題解決與程式設計:快速排序演算法
14.7 遞迴範例:漢諾塔
14.8 專注於問題解決:穷举与枚举算法
14.9 專注於軟體工程:遞迴與迭代的比較
14.10 案例研究

**第 15 章 多型、虛擬函數與多重繼承**
15.1 繼承層次中的類型相容性
15.2 多型與虛擬成員函數
15.3 抽象基類與純虛擬函數
15.4 多重與虛擬繼承
15.5 專注於物件導向程式設計:組合與繼承的比較
15.6 Secure Encryption Systems, Inc. 案例研究

**第 16 章 異常、模板與標準模板庫 (STL)**
16.1 異常
16.2 函數模板
16.3 類別模板
16.4 類別模板與繼承
16.5 標準模板庫簡介
16.6 案例研究

**第 17 章 鏈結串列**
17.1 鏈結串列 ADT 簡介
17.2 鏈結串列操作
17.3 鏈結串列模板
17.4 遞迴鏈結串列操作
17.5 鏈結串列的變體
17.6 STL list 容器
17.7 Reliable Software Systems, Inc. 案例研究
17.8 其他案例研究

**第 18 章 堆疊與佇列**
18.1 堆疊 ADT 簡介
18.2 動態堆疊
18.3 STL stack 容器
18.4 佇列 ADT 簡介
18.5 動態佇列
18.6 STL deque 與 queue 容器
18.7 專注於問題解決與程式設計:消除遞迴

**第 19 章 二元樹**
19.1 二元樹的定義與應用
19.2 二元搜尋樹操作
19.3 二元搜尋樹的模板考量
19.4 案例研究

附錄 A ASCII 字元集
附錄 B 運算符優先順序與結合性

索引

**附錄在隨附的學生 CD 上:**
附錄 C 物件導向系統開發入門
附錄 D 使用 UML