Object Oriented Programming with C++, 2/e (Paperback)

Sourav Sahay

  • 出版商: Oxford University
  • 出版日期: 2012-11-09
  • 售價: $1,000
  • 貴賓價: 9.8$980
  • 語言: 英文
  • 頁數: 512
  • 裝訂: Paperback
  • ISBN: 0198065302
  • ISBN-13: 9780198065302
  • 相關分類: C++ 程式語言
  • 下單後立即進貨 (約5~7天)

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

商品描述

<內容簡介>

* New chapter on data structures containing new and original algorithms, especially an elegant and simple recursive algorithm for inserting nodes into trees. The explanations are elaborate and full of diagrams.
* New sections on explicit constructors, command line arguments, and re-throwing exceptions
* Expanded glossary

Beginning with an explanation of the procedure-oriented programming system, the role played by structures in this system, and the reasons that led to the creation of OOPS, the book provides a systematic discussion of features such as classes, objects, dynamic memory management, constructors, destructors, inheritance, dynamic polymorphism, and operator overloading. The concepts of stream handling, templates (including the Standard Template Library), and exception handling have been covered in detail to provide more control and convenience to programmers.

<章節目錄>


1. Introduction to C++
1.1 A Review of Structures
1.1.1 The need for structures
1.1.2 Creating a new data type using structures
1.1.3 Using Structures in Application Programs
1.2 Procedure-Oriented Programming Systems
1.3 Object-Oriented Programming Systems
1.4 Comparison of C++ with C
1.5 Console Input/Output in C++
1.5.1 Console output
1.5.2 Console input
1.6 Variables in C++
1.7 Reference Variables in C++
1.8 Function Prototyping
1.9 Function Overloading
1.10 Default Values for Formal Arguments of Functions
1.11 Inline Functions
2. Classes and Objects
2.1 Introduction to Classes and Objects
2.1.1 Private and Public Members
2.1.2 Objects
2.1.3 The Scope resolution Operator
2.1.4 Creating Libraries using the Scope Resolution Operator
2.1.5 Using Classes in Application Programs
2.1.6 The 'this' pointer
2.1.7 Data Abstraction
2.1.8 Explicit Address manipulation
2.1.9 The arrow operator
2.1.10 Calling one member function from another
2.2 Member Functions and Member Data
2.2.1 Overloaded member functions
2.2.2 Default values for formal arguments of member functions
2.2.3 Inline member functions
2.2.4 Constant member functions
2.2.5 Mutable data members
2.2.6 Friends
2.2.7 Static members
2.3 Objects and Functions
2.4 Objects and Arrays
2.4.1 Arrays of Objects
2.4.2 Arrays inside objects
2.5 Namespaces
2.6 Nested/Inner Classes
3. Dynamic Memory Management
3.1 Introduction
3.2 Dynamic Memory Allocation
3.3 Dynamic Memory Deallocation
3.4 The set_new_handler() function
4. Constructors and Destructors
4.1 Constructors
4.1.1 The zero-argument constructor
4.1.2 Parameterized constructors
4.1.3 Explicit constructors
4.1.4 Copy constructor
4.2 Destructors
4.3 The Philosophy of OOPS
5. Inheritance 151
5.1 Introduction to Inheritance
5.1.1 Effects of inheritance
5.1.2 Benefits of inheritance
5.1.3 Inheritance in actual practice
5.1.4 Base class and derived class objects
5.1.5 Accessing members of the base class in the derived class
5.2 Base Class and Derived Class Pointers
5.3 Function Overriding
5.4 Base Class Initialization
5.5 The Protected Access Specifier
5.6 Deriving by Different Access Specifiers
5.6.1 Deriving by the 'public' access specifier
5.6.2 Deriving by the 'protected' access specifier
5.6.3 Deriving by the 'private' access specifier
5.7 Different Kinds of Inheritance
5.7.1 Multiple inheritance
5.7.2 Ambiguities in Multiple inheritance
5.7.3 Multi-level inheritance
5.7.4 Hierarchical inheritance
5.7.5 Hybrid inheritance
5.8 Order of Invocation of Constructors and Destructors
6. Virtual Functions and Dynamic Polymorphism
6.1 The Need for Virtual Functions
6.2 Virtual Functions
6.3 The Mechanism of Virtual Functions
6.4 Pure Virtual Functions
6.5 Virtual Destructors and Virtual Constructors
6.5.1 Virtual Destructors
6.5.2 Virtual Constructors
7. Stream and File Handling
7.1 Streams
7.2 The Class Hierarchy for Handling Streams
7.3 Text and Binary Input/Output
7.3.1 Data Storage in memory
7.3.2 Input/output of character data
7.3.3 Input/output of numeric data
7.3.4 A note on opening disk files for I/O
7.4 Text Versus Binary Files
7.5 Text Input/Output
7.5.1 Text output
7.5.2 Text input
7.6 Binary Input/Output
7.6.1 Binary output-The write() function
7.6.2 Binary input-The read() function
7.7 Opening and Closing Files
7.7.1 The open() function
7.7.2 The close() function
7.8 Files as Objects of the fstream Class
7.9 File Pointers
7.9.1 The seekp() function
7.9.2 The tellp() function
7.9.3 The seekg() function
7.9.4 The tellg() function
7.10 Random Access to Files
7.11 Object Input/Output through Member Functions
7.12 Error Handling
7.12.1 The eof() function
7.12.2 The fail() function
7.12.3 The bad() function
7.12.4 The clear() function
7.13 Manipulators
7.13.1 Pre-defined manipulators
7.13.2 User-defined manipulators
7.14 Command line arguments
8. Operator Overloading, Type Conversion, New Style Casts, and RTTI
8.1 Operator Overloading
8.1.1 Overloading operators-The Syntax
8.1.2 Compiler interpretation of operator-overloading functions
8.1.3 Overview of overloading unary and binary operators
8.1.4 Operator overloading
8.1.5 Rules for operator overloading
8.2 Overloading the Various Operators
8.2.1 Overloading the increment and decrement operators (prefix and postfix)
8.2.2 Overloading the unary minus and unary plus operator
8.2.3 Overloading the arithmetic operators
8.2.4 Overloading the relational operators
8.2.5 Overloading the assignment operator
8.2.6 Overloading the insertion and extraction operators
8.2.7 Overloading the new and delete operators
8.2.8 Overloading the subscript operator
8.2.9 Overloading the pointer-to-member (->) operator (smart pointer)
8.3 Type Conversion 338
8.3.1 Basic type to class type
8.3.2 Class type to basic type
8.3.3 Class type to class type
8.4 New Style Casts and the typeid Operator
8.4.1 The dynamic_cast operator
8.4.2 The static_cast operator
8.4.3 The reinterpret_cast operator
8.4.4 The const_cast operator
8.4.5 The typeid operator
9. Data Structures
9.1 Introduction
9.2 Linked Lists
9.3 Stacks
9.4 Queues
9.5 Trees
9.5.1 Binary Trees
9.5.2 Binary Search Trees
10. Templates
10.1 Introduction
10.2 Function Templates
10.3 Class Templates
10.3.1 Nested class templates
10.4 The Standard Template Library (STL)
10.4.1 The list class
10.4.2 The vector class
10.4.3 The pair class
10.4.4 The map class
10.4.5 The set class
10.4.6 The multimap class
10.4.7 The multiset class
11. Exception Handling
11.1 Introduction
11.2 C-Style Handling of Error-generating Code
11.2.1 Terminate the program
11.2.2 Check the parameters before function call
11.2.3 Return a value representing an error
11.3 C++-Style Solution-the try/throw/catch Construct
11.3.1 It is necessary to catch exceptions
11.3.2 Unwinding of the stack
11.3.3 Need to throw class objects
11.3.4 Accessing the thrown object in the catch block
11.3.5 Throwing parameterized objects of a nested exception class
11.3.6 Catching uncaught exceptions
11.3.7 Rethrowing Exceptions
11.4 Limitation of Exception Handling
Appendix A-Case Study
Appendix B-Comparison of C++ with C
Appendix C-Comparison of C++ with Java
Appendix D-Object-Oriented Analysis and Design
Appendix E-Glossary
Appendix F-Self Tests
References
Index

商品描述(中文翻譯)

內容簡介:
* 新增了關於資料結構的章節,包含了新的和原創的演算法,特別是一個優雅且簡單的遞迴演算法,用於將節點插入樹中。解釋詳細並附有圖表。
* 新增了關於明確構造函數、命令行參數和重新拋出異常的部分。
* 擴充了詞彙表。

從對程序導向編程系統的解釋開始,介紹了結構在該系統中的作用以及導致面向對象編程系統(OOPS)創建的原因,本書系統地討論了類、對象、動態內存管理、構造函數、析構函數、繼承、動態多態和運算符重載等特性。詳細介紹了流處理、模板(包括標準模板庫)和異常處理的概念,以提供更多控制和便利性給程序員。

章節目錄:
1. C++簡介
1.1 結構的回顧
1.1.1 結構的需求
1.1.2 使用結構創建新的數據類型
1.1.3 在應用程序中使用結構
1.2 面向過程的編程系統
1.3 面向對象的編程系統
1.4 C++與C的比較
1.5 C++中的控制台輸入/輸出
1.5.1 控制台輸出
1.5.2 控制台輸入
1.6 C++中的變量
1.7 C++中的引用變量
1.8 函數原型
1.9 函數重載
1.10 函數形式參數的默認值
1.11 內聯函數
2. 類和對象
2.1 類和對象簡介
2.1.1 私有和公有成員
2.1.2 對象
2.1.3 作用域解析運算符
2.1.4 使用作用域解析運算符創建庫
2.1.5 在應用程序中使用類
2.1.6 'this'指針
2.1.7 數據抽象
2.1.8 明確地址操作
2.1.9 箭頭運算符
2.1.10 從一個成員函數調用另一個成員函數
2.2 成員函數和成員數據
2.2.1 重載成員函數
2.2.2 成員函數形式參數的默認值
2.2.3 內聯成員函數
2.2.4 常量成員函數
2.2.5 可變數據成員
2.2.6 友元
2.2.7 靜態成員
2.3 對象和函數
2.4 對象和數組
2.4.1 對象數組
2.4.2 對象內部的數組
2.5 命名空間
2.6 嵌套/內部類
3. 動態內存管理
3.1 簡介
3.2 動態內存分配
3.3 動態內存釋放
3.4 set_new_handler()函數
4. 構造函數和析構函數
4.1 構造函數
4.1.1 零參數構造函數
4.1.2 帶參數的構造函數
4.1.3 明確構造函數
4.1.4 拷貝構造函數
4.2 析構函數
4.3 OOPS的哲學
5. 繼承
5.1 繼承簡介