Object-Oriented Programming with ANSI and Turbo C++
A student-friendly, practical and example-driven book, Object-Oriented Programming with ANSI and Turbo C++ gives you a solid background in the fundamentals of C++ which has emerged as a standard object-oriented programming language. This comprehensive book, enriched with illustrations and a number o...
Otros Autores: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
[Place of publication not identified]
Pearson Education Canada
2009
|
Edición: | 1st edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009629628006719 |
Tabla de Contenidos:
- Cover
- Preface
- Contents
- Chapter 1: Introduction to C++
- 1.1 Evolution of C++
- 1.2 ANSI Standard
- 1.3 Object-Oriented Technology
- 1.4 Disadvantage of Conventional Programming
- 1.5 Programming Paradigms
- (1) Monolithic Programming
- (2) Procedural Programming
- (3) Structured Programming
- 1.6 Preface to Object-Oriented Programming
- 1.7 Key Concepts of Object-Oriented Programming
- (1) Objects
- (2) Classes
- (3) Method
- (4) Data Abstraction
- (5) Encapsulation
- (6) Inheritance
- (7) Polymorphism
- (8) Dynamic Binding
- (9) Message Passing
- (10) Reusability
- (11) Delegation
- (12) Genericity
- 1.8 Advantages of OOP
- 1.9 Object-Oriented Languages
- 1.10 Usage of OOP
- 1.11 Usage of C++
- Summary
- Exercises
- Chapter 2: Input and Output in C++
- 2.1 Introduction
- 2.2 Streams in C++
- 2.3 Pre-Defined Streams
- 2.4 Buffering
- 2.5 Stream Classes
- 2.6 Formatted and Unformatted Data
- 2.7 Unformatted Console I/O Operations
- Input and Output Streams
- 2.8 Typecasting with cout Statement
- Difference in Using C and C++ I/O Functions
- 2.9 Member Functions of Istream Class
- 2.10 Formatted Console I/O Operations
- 2.11 Bit Fields
- 2.12 Flags Without Bit Field
- 2.13 Manipulators
- 2.14 User-Defined Manipulators
- 2.15 Manipulator with One Parameter
- 2.16 Manipulators with Multiple Parameters
- 2.17 Custom Built I/O Objects
- (1) Creating Output Object
- (2) Creating Input Object
- Summary
- Exercises
- Chapter 3: C++ Declarations
- 3.1 Introduction
- 3.2 Parts of C++ Program
- (1) Include Files Section
- (2) Class Declaration or Definition
- (3) Class Function Definitions
- (4) The main () Function
- 3.3 Types of Tokens
- 3.4 Keywords
- 3.5 Identifiers
- (1) Variable Declaration and Initialization
- 3.6 Dynamic Initialization
- 3.7 Data Types in C++.
- 3.8 Basic Data Type
- 3.9 Derived Data Type
- (1) Pointers
- (2) Functions
- (3) Arrays
- (4) References
- 3.10 User-Defined Data Type
- (1) Structure and Classes
- (2) Union
- (3) Enumarated Data Type
- 3.11 The void Data Type
- 3.12 Type Modifiers
- 3.13 Wrapping Around
- 3.14 Typecasting
- (1) Explicit Typecasting
- (2) Implicit Type Conversion
- 3.15 Constants
- (1) Literal Constant
- (2) Symbolic Constant
- 3.16 Constant Pointers
- (1) Constant Pointer
- (2) Pointer to Constant
- (3) Pointer and Variable both Constants
- 3.17 Operators in C and C++
- 3.18 Precedence of Operators in C++
- Precedence of * and [ ] Operators
- 3.19 Referencing (&) and Dereferencing (*) Operators
- Referencing Operator (&)
- Principles for Declaring Reference Variable
- Dereferencing Operator (*)
- Difference Between & and * Operator
- 3.20 Scope Access Operator
- 3.21 Memory Management Operators
- 3.22 Comma Operator
- 3.23 Comma in Place of Curly Braces
- Summary
- Exercises
- Chapter 4: Control Structures
- 4.1 Introduction
- 4.2 Decision-Making Statements
- 4.3 The if-else Statement
- 4.4 The Nested if-else Statement
- The if-else-if Ladder Statement
- 4.5 The jump Statement
- 4.6 The goto Statement
- 4.7 The break Statement
- 4.8 The continue Statement
- 4.9 The switch case Statement
- 4.10 The Nested switch()case Statement
- 4.11 Loops in C/C++
- 4.12 The for Loop
- 4.13 Nested for Loops
- 4.14 The while Loop
- 4.15 The do-while Loop
- Summary
- Exercises
- Chapter 5: Functions in C++
- 5.1 Introduction
- 5.2 The main () Function in C and C++
- 5.3 Parts of Function
- (1) Function Prototypes
- (2) Function Definition
- (3) Function Call
- (4) Actual and Formal Arguments
- (5) The return Statement
- 5.4 Passing Arguments
- (1) Pass by Value
- (2) Pass by Address
- (3) Passsing by Reference.
- 5.5 LValues and RValues
- (1) Lvalues (Left values)
- (2) Rvalues (Right values)
- 5.6 Return by Reference
- 5.7 Returning More Values by Reference
- 5.8 Default Arguments
- 5.9 The const Argument
- 5.10 Inputting Default Arguments
- 5.11 Inline Functions
- 5.12 Function Overloading
- 5.13 Principles of Function Overloading
- 5.14 Precautions with Function Overloading
- 5.15 Library Functions
- Summary
- Exercises
- Chapter 6: Classes and Objects
- 6.1 Introduction
- 6.2 Structures in C
- 6.3 Structures in C++
- 6.4 Classes in C++
- 6.5 Declaring Objects
- (1) Accessing Class Members
- 6.6 The public Keyword
- 6.7 The private Keyword
- 6.8 The protected Keyword
- 6.9 Defining Member Functions
- (1) Member Function inside the Class
- (2) Private Member Function
- (3) Member Function Outside the Class
- 6.10 Characteristics of Member Functions
- 6.11 Outside Member Function Inline
- 6.12 Rules for Inline Functions
- 6.13 Data Hiding or Encapsulation
- 6.14 Classes, Objects and Memory
- 6.15 Static Member Variables and Functions
- (1) Static Member Variables
- (2) Static Member Functions
- (3) Static Private Member Function
- (4) Static Public Member Variable
- 6.16 Static Object
- 6.17 Array of Objects
- 6.18 Objects as Function Arguments
- 6.19 friend Functions
- friend Classes
- 6.20 The const Member Function
- 6.21 Recursive Member Function
- 6.22 Local Classes
- 6.23 Empty, Static and Const Classes
- 6.24 Member Functions and Non-Member Functions
- 6.25 The main () as a Member Function
- 6.26 Overloading Member Functions
- 6.27 Overloading main() Function
- 6.28 The main (), Member Function and Indirect Recursion
- 6.29 Bit Fields and Classes
- Summary
- Exercises
- Chapter 7: Constructors and Destructors
- 7.1 Introduction
- 7.2 Constructors and Destructors
- (1) Constructors.
- (2) Destructors
- 7.3 Characteristics of Constructors and Destructors
- (1) Constructors
- (2) Destructors
- 7.4 Applications with Constructors
- 7.5 Constructors with Arguments
- 7.6 Overloading Constructors
- 7.7 Constructors with Default Arguments
- 7.8 Copy Constructors
- 7.9 The const Objects
- 7.10 Destructors
- 7.11 Calling Constructors and Destructors
- 7.12 Qualifier and Nested Classes
- 7.13 Anonymous Objects
- 7.14 Private Constructors and Destructors
- 7.15 Dynamic Initialization Using Constructors
- 7.16 Dynamic Operators and Constructors
- 7.17 The main () as a Constructor and Destructor
- 7.18 Recursive Constructor
- 7.19 Program Execution before main ()
- 7.20 Constructor and Destructor with Static Members
- 7.21 Local vs Global Object
- Summary
- Exercises
- Chapter 8: Operator Overloading and Type Conversion
- 8.1 Introduction
- 8.2 The Keyword Operator
- 8.3 Overloading Unary Operators
- 8.4 Operator Return Type
- 8.5 Constraint on Increment and Decrement Operators
- 8.6 Overloading Binary Operators
- (1) Overloading Binary Operators Using Member Functions
- (2) Overloading Binary Operators Using Friend Functions
- 8.7 Overloading with friend Function
- 8.8 Type Conversion
- (1) Conversion from Basic to Class Type
- (2) Conversion from Class Type to Basic Data Type
- (3) Conversion from One Class Type to Another Class Type
- 8.9 Rules for Overloading Operators
- 8.10 One Argument Constructor and Operator Function
- 8.11 Overloading Stream Operators
- Summary
- Exercises
- Chapter 9: Inheritance
- 9.1 Introduction
- 9.2 Access Specifiers and Simple Inheritance
- (1) Public Inheritance
- (2) Private Inheritance
- 9.3 Protected Data with Private Inheritance
- (1) Member Functions Scope
- 9.4 Types of Inheritances
- (1) Single Inheritance
- (2) Multiple Inheritance.
- (3) Hierarchical Inheritance
- (4) Multilevel Inheritance
- (5) Hybrid Inheritance
- (6) Multipath Inheritance
- 9.5 Single Inheritance
- 9.6 Multilevel Inheritance
- 9.7 Multiple Inheritance
- 9.8 Hierarchical Inheritance
- 9.9 Hybrid Inheritance
- 9.10 Multipath Inheritance
- 9.11 Virtual Base Classes
- 9.12 Constructors, Destructors and Inheritance
- (1) Base and Derived Classes with Constructor
- (2) Base Class with Various Constructors and Derived Class with One Constructor
- (3) Base and Derived Classes without Default Constructor
- (4) Constructors and Multiple Inheritance
- (5) Constructors in Multiple Inheritances with Explicit Call
- (6) Multiple Inheritance and Virtual Class
- (7) Execution of Constructors in Multilevel Inheritance
- 9.13 Object as a Class Member
- 9.14 Abstract Classes
- 9.15 Qualifier Classes and Inheritance
- 9.16 Common Constructor
- 9.17 Pointers and Inheritance
- 9.18 Overloading Member Function
- 9.19 Advantages of Inheritance
- 9.20 Disadvantages of Inheritance
- Summary
- Exercises
- Chapter 10: Pointers and Arrays
- 10.1 Introduction
- (1) Features of Pointers
- 10.2 Pointer Declaration
- 10.3 Void Pointers
- 10.4 Wild Pointers
- 10.5 Pointer to Class
- 10.6 Pointer to Object
- 10.7 The this Pointer
- 10.8 Pointer to Derived Classes and Base Classes
- 10.9 Pointer to Members
- 10.10 Accessing Private Members with Pointers
- 10.11 Direct Access to Private Members
- 10.12 Address of Object and Void Pointers
- 10.13 Arrays
- (1) Array Declaration and Initialization
- 10.14 Characteristics of Arrays
- 10.15 Initialization of Arrays Using Functions
- 10.16 Arrays of Classes
- Summary
- Exercises
- Chapter 11: C++ and Memory
- 11.1 Introduction
- 11.2 Memory Models
- (1) Tiny
- (2) Small
- (3) Medium
- (4) Compact
- (5) Large
- (6) Huge.
- (7) Segment and Offset Address.