Object Oriented Programming with C++.
Bhave, Mahesh.
Object Oriented Programming with C++. - 2nd ed. - 1 online resource (686 pages)
Cover -- Contents -- Foreword -- Preface to the Second Edition -- Preface to the First Edition -- Chapter 1: Introduction to Computers and Computing -- 1.1 Hardware -- Operating Systems -- 1.2 Evolution of Programming Languages -- 1.3 Brief History of C++ -- 1.4 C++ as a Superset of C Programming Language -- 1.5 To Run a Program -- 1.6 An Informal Introduction to C++ Program -- Summary -- Chapter 2: Moving from C to C++I -- 2.1 Fundamentals -- 2.1.1 Comments -- 2.1.2 Character set -- 2.1.3 Identifiers and keywords -- 2.2 Data Types -- 2.2.1 Simple data types -- 2.2.2 Aggregate data types -- 2.2.3 Pointer data type -- 2.2.4 Enumerated data type -- 2.2.5 Type reference -- 2.2.6 Type void -- 2.3 Constants and Variables Declarations -- 2.4 Operators and Expressions -- 2.5 Library Functions -- 2.6 Statements -- 2.7 Pre-processor Directives -- 2.8 C++ is a Block-Structured Language -- 2.9 Typedef Facility -- 2.10 Simple Input-Output -- 2.10.1 Input-output with cin and cout -- 2.10.2 Console input-output -- 2.11 Control Statements -- 2.11.1 if statement -- 2.11.2 Switch statement -- 2.12 Iteration Statements -- 2.12.1 for statement -- 2.12.2 while statement -- 2.12.3 do-while statement -- 2.12.4 break and continue statements -- 2.12.5 goto statement -- 2.12.6 Comparison of all the three constructs -- 2.13 End of Chapter Programs -- 2.13.1 Sum of series -- 2.13.2 Accuracy of type float is limited! -- 2.13.3 Prime number -- 2.14 Flow Charts and Decision Tables -- For Advanced Readers -- Summary -- Exercises -- Chapter 3: Moving from C to C++ II -- 3.1 Introduction to Functions -- 3.2 Parameter Passing -- 3.2.1 call by value -- 3.2.2 GCD and LCM -- 3.2.3 call by reference - new style -- 3.2.4 call by reference - old style -- 3.2.5 Rules of parameter passing -- 3.2.6 Use of const parameter -- 3.3 Local Versus Global Variables -- 3.4 Function Overloading. 3.5 Functions with Default Arguments -- 3.6 inline Functions -- 3.7 Storage Classes -- 3.7.1 auto -- 3.7.2 Keyword register -- 3.7.3 Keyword static -- 3.7.4 Keyword extern -- 3.8 Recursion -- 3.9 Scope Rules -- 3.10 Arrays -- 3.10.1 Introduction -- 3.10.2 Array as function parameter -- 3.10.3 Arrays with multiple dimension -- 3.11 Structures -- 3.11.1 Assignment of structure variables -- 3.11.2 Using structure as function parameters -- 3.11.3 Pointer to structures -- 3.12 Union -- 3.12.1 Defining an union -- 3.12.2 Working with union -- 3.12.3 Anonymous union -- 3.13 Line Splicing -- 3.14 Command Line Arguments -- 3.15 Multi File Programs -- 3.16 Difference Between C and C++ -- 3.16.1 Major differences -- 3.16.2 Minor differences -- 3.17 End of Chapter Programs -- For Advanced Readers -- Summary -- Exercises -- Chapter 4: Object Orientation: An Introduction -- 4.1 Programming Paradigms -- 4.1.1 Spectrum of computer applications -- 4.1.2 Bird's-eye view of programming paradigms -- 4.2 Popular Recent Paradigms -- 4.2.1 Procedural programming -- 4.2.2 Object-oriented programming -- 4.2.3 Programming language C++ -- 4.2.4 Programming language JAVA -- 4.2.5 Procedural programming vs. object-oriented programming -- 4.3 An Introduction to Object Orientation -- 4.3.1 From structures to objects -- 4.4 Features of Object-Oriented Language -- 4.5 Benefits of Object-Oriented Programming -- 4.6 Writing Large Programs -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 5: Classes and Objects -- 5.1 Introduction -- 5.2 Data Hiding and Encapsulation -- 5.2.1 Private and public data members -- 5.3 Member Functions -- 5.3.1 Scope resolution operator -- 5.4 Accessing Class Members -- 5.5 Some Short Questions and Answers I -- 5.6 Using Pointers for Objects -- 5.7 Objects as Function Parameters -- 5.8 Some Short Questions and Answers II. 5.9 Inline Functions (Within a Class) -- 5.10 Static Data Members and Methods -- 5.10.1 Static data member -- 5.10.2 Static methods -- 5.11 Friend Functions -- 5.12 Friend Classes -- 5.13 Access Specifier Protected -- 5.14 Ideal Class Definition -- 5.15 End of Chapter Programs -- 5.15.1 Timer application -- 5.15.2 Complex numbers -- 5.15.3 Parameter passing by reference (C style) -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 6: Object Initialization and Cleanup -- 6.1 Introduction -- 6.2 Constructors -- 6.3 Parameterized Constructor -- 6.4 Pointer "this" -- 6.5 Constructor Overloading -- 6.6 Default Constructor -- 6.7 Constructors with Default Arguments -- 6.8 Copy Constructor -- 6.9 Copy Initialization -- 6.10 Array of Objects -- 6.10.1 Array of objects - without pointers -- 6.10.2 Array of objects - With pointer -- 6.11 Destructors -- 6.12 End of Chapter Programs -- 6.12.1 Initializer list -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 7: Operator Overloading -- 7.1 Introduction -- 7.2 Unary Operator Overloading -- 7.3 Binary Operator Overloading -- 7.3.1 Case 1: object + object -- 7.3.2 Case 2: object + basic data type -- 7.3.3 Case 3: basic data type + object -- 7.4 Friend Functions in Operator Overloading -- 7.4.1 Binary operator overloading [case 3] -- 7.4.2 Binary operator overloading [case 1] -- 7.5 Overloading of Increment Operator -- 7.6 Conversion Function -- 7.7 End of Chapter Programs -- 7.7.1 Overloading of assignment operator [case 1] -- 7.7.2 Overloading << operator -- 7.7.3 Expression with unary as well as binary overloaded operators -- 7.7.4 Class polar -- 7.7.5 Rational numbers -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 8: Strings -- 8.1 Introduction. 8.2 Working with Strings -- 8.2.1 Reading a string -- 8.2.2 Writing a string -- 8.2.3 Comparing strings -- 8.2.4 Copying one string into other -- 8.2.5 Length of a string -- 8.2.6 Concatenation of strings -- 8.3 Useful Functions for Operating on Strings -- 8.4 Simple String Programs -- 8.4.1 Capitalize first character -- 8.4.2 Reading a string containing blank -- 8.4.3 Removing return from a string -- 8.4.4 Sorting strings -- 8.4.5 Printing Strings with Field Specifications -- 8.4.6 Copying strings -- 8.5 Our Own Strings -- 8.6 Constructors for Type String -- 8.7 Interactive Constructor for Class String -- 8.8 Operator Overloading with Class String -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 9: Inheritance I -- 9.1 Introduction -- 9.2 Derived and Base Class -- 9.3 Public Derivation -- 9.3.1 Public members of base class -- 9.3.2 Private members of base class -- 9.3.3 Protected members of base class -- 9.4 Private Derivation -- 9.5 Protected Derivation -- 9.6 Function Overriding -- 9.6.1 Overriding and overloading -- 9.7 Base and Derived Class Constructors -- 9.8 End of Chapter Programs -- 9.8.1 Working with private derivation -- 9.8.2 Program on students and their performance -- 9.8.3 Function overriding: different signature -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 10: Inheritance II -- 10.1 Multiple Inheritance -- 10.2 Hierarchical Inheritance -- 10.3 Multilevel Inheritance -- 10.4 Hybrid Inheritance -- 10.5 A Multipath Inheritance -- 10.6 Virtual Base Class -- 10.7 Constructors for Virtual Base Classes -- 10.8 Classification of Inheritance -- 10.9 Relationships -- 10.9.1 is-a Relationship -- 10.9.2 has-a Relationship -- 10.10 Practical Class Definition -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers. Exercises -- Chapter 11: Input/Output -- 11.1 Introduction -- 11.2 Stream I/O Classes -- 11.3 Format-free Input -- 11.4 Formatted Input -- 11.5 Format-free Output -- 11.6 Formatted Output -- 11.6.1 Writing integers -- 11.6.2 Writing float -- 11.6.3 Writing structures and objects -- 11.7 The Manipulators -- 11.7.1 Manipulators for reading integers -- 11.7.2 Manipulators for writing integers -- 11.7.3 Manipulators for writing floats -- 11.8 Summary of Manipulators -- 11.9 Our Own Manipulators -- 11.10 Miscellaneous Functions -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 12: Pointers -- 12.1 Introduction -- 12.2 The & (AND) Operator -- 12.3 The * Operator -- 12.4 Pointers and Arrays -- 12.5 Pointer Arithmetic -- 12.6 Pointer to Void -- 12.7 Pointer to Function -- 12.8 Dynamic Memory Allocation -- 12.8.1 Free Store -- 12.9 Operators new and delete -- 12.9.1 Operator new -- 12.9.2 Operator delete -- 12.10 One Dimensional Arrays Using Pointers -- 12.11 Two Dimensional Arrays Using Pointers -- 12.12 Pointers to User Defined Data Types -- 12.12.1 Array of pointers (to objects) -- 12.13 Advantages and Disadvantages of Pointers -- 12.14 End of Chapter Programs -- 12.14.1 Class Vector -- 12.14.2 Comparison of pointers -- 12.14.3 Study of NULL -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 13: Polymorphism -- 13.1 Introduction -- 13.2 Compile Time Polymorphism -- 13.2.1 Polymorphism with ordinary1 objects -- 13.2.2 Polymorphism with dynamic objects2 -- 13.2.3 Early binding -- 13.2.4 Function overriding -- 13.3 Pointing to Derived Class Objects -- 13.3.1 Demo program: The Twist -- 13.4 Virtual Functions -- 13.4.1 Need for virtual functions -- 13.4.2 Declaring function virtual -- 13.5 Run Time Polymorphism -- 13.5.1 Run time polymorphism in action. 13.6 Pure Virtual Functions.
This fully revised and indispensable edition of Object-Oriented Programming with C++ provides a sound appreciation of the fundamentals and syntax of the language, as well as of various concepts and their applicability in real-life problems. Emphasis has been laid on the reusability of code in object-oriented programming and how the concepts of class, objects, inheritance, polymorphism, friend functions, and operator overloading are all geared to make the development and maintenance of applications easy, convenient and economical.
9788131798584
Electronic books.
005.13
Object Oriented Programming with C++. - 2nd ed. - 1 online resource (686 pages)
Cover -- Contents -- Foreword -- Preface to the Second Edition -- Preface to the First Edition -- Chapter 1: Introduction to Computers and Computing -- 1.1 Hardware -- Operating Systems -- 1.2 Evolution of Programming Languages -- 1.3 Brief History of C++ -- 1.4 C++ as a Superset of C Programming Language -- 1.5 To Run a Program -- 1.6 An Informal Introduction to C++ Program -- Summary -- Chapter 2: Moving from C to C++I -- 2.1 Fundamentals -- 2.1.1 Comments -- 2.1.2 Character set -- 2.1.3 Identifiers and keywords -- 2.2 Data Types -- 2.2.1 Simple data types -- 2.2.2 Aggregate data types -- 2.2.3 Pointer data type -- 2.2.4 Enumerated data type -- 2.2.5 Type reference -- 2.2.6 Type void -- 2.3 Constants and Variables Declarations -- 2.4 Operators and Expressions -- 2.5 Library Functions -- 2.6 Statements -- 2.7 Pre-processor Directives -- 2.8 C++ is a Block-Structured Language -- 2.9 Typedef Facility -- 2.10 Simple Input-Output -- 2.10.1 Input-output with cin and cout -- 2.10.2 Console input-output -- 2.11 Control Statements -- 2.11.1 if statement -- 2.11.2 Switch statement -- 2.12 Iteration Statements -- 2.12.1 for statement -- 2.12.2 while statement -- 2.12.3 do-while statement -- 2.12.4 break and continue statements -- 2.12.5 goto statement -- 2.12.6 Comparison of all the three constructs -- 2.13 End of Chapter Programs -- 2.13.1 Sum of series -- 2.13.2 Accuracy of type float is limited! -- 2.13.3 Prime number -- 2.14 Flow Charts and Decision Tables -- For Advanced Readers -- Summary -- Exercises -- Chapter 3: Moving from C to C++ II -- 3.1 Introduction to Functions -- 3.2 Parameter Passing -- 3.2.1 call by value -- 3.2.2 GCD and LCM -- 3.2.3 call by reference - new style -- 3.2.4 call by reference - old style -- 3.2.5 Rules of parameter passing -- 3.2.6 Use of const parameter -- 3.3 Local Versus Global Variables -- 3.4 Function Overloading. 3.5 Functions with Default Arguments -- 3.6 inline Functions -- 3.7 Storage Classes -- 3.7.1 auto -- 3.7.2 Keyword register -- 3.7.3 Keyword static -- 3.7.4 Keyword extern -- 3.8 Recursion -- 3.9 Scope Rules -- 3.10 Arrays -- 3.10.1 Introduction -- 3.10.2 Array as function parameter -- 3.10.3 Arrays with multiple dimension -- 3.11 Structures -- 3.11.1 Assignment of structure variables -- 3.11.2 Using structure as function parameters -- 3.11.3 Pointer to structures -- 3.12 Union -- 3.12.1 Defining an union -- 3.12.2 Working with union -- 3.12.3 Anonymous union -- 3.13 Line Splicing -- 3.14 Command Line Arguments -- 3.15 Multi File Programs -- 3.16 Difference Between C and C++ -- 3.16.1 Major differences -- 3.16.2 Minor differences -- 3.17 End of Chapter Programs -- For Advanced Readers -- Summary -- Exercises -- Chapter 4: Object Orientation: An Introduction -- 4.1 Programming Paradigms -- 4.1.1 Spectrum of computer applications -- 4.1.2 Bird's-eye view of programming paradigms -- 4.2 Popular Recent Paradigms -- 4.2.1 Procedural programming -- 4.2.2 Object-oriented programming -- 4.2.3 Programming language C++ -- 4.2.4 Programming language JAVA -- 4.2.5 Procedural programming vs. object-oriented programming -- 4.3 An Introduction to Object Orientation -- 4.3.1 From structures to objects -- 4.4 Features of Object-Oriented Language -- 4.5 Benefits of Object-Oriented Programming -- 4.6 Writing Large Programs -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 5: Classes and Objects -- 5.1 Introduction -- 5.2 Data Hiding and Encapsulation -- 5.2.1 Private and public data members -- 5.3 Member Functions -- 5.3.1 Scope resolution operator -- 5.4 Accessing Class Members -- 5.5 Some Short Questions and Answers I -- 5.6 Using Pointers for Objects -- 5.7 Objects as Function Parameters -- 5.8 Some Short Questions and Answers II. 5.9 Inline Functions (Within a Class) -- 5.10 Static Data Members and Methods -- 5.10.1 Static data member -- 5.10.2 Static methods -- 5.11 Friend Functions -- 5.12 Friend Classes -- 5.13 Access Specifier Protected -- 5.14 Ideal Class Definition -- 5.15 End of Chapter Programs -- 5.15.1 Timer application -- 5.15.2 Complex numbers -- 5.15.3 Parameter passing by reference (C style) -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 6: Object Initialization and Cleanup -- 6.1 Introduction -- 6.2 Constructors -- 6.3 Parameterized Constructor -- 6.4 Pointer "this" -- 6.5 Constructor Overloading -- 6.6 Default Constructor -- 6.7 Constructors with Default Arguments -- 6.8 Copy Constructor -- 6.9 Copy Initialization -- 6.10 Array of Objects -- 6.10.1 Array of objects - without pointers -- 6.10.2 Array of objects - With pointer -- 6.11 Destructors -- 6.12 End of Chapter Programs -- 6.12.1 Initializer list -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 7: Operator Overloading -- 7.1 Introduction -- 7.2 Unary Operator Overloading -- 7.3 Binary Operator Overloading -- 7.3.1 Case 1: object + object -- 7.3.2 Case 2: object + basic data type -- 7.3.3 Case 3: basic data type + object -- 7.4 Friend Functions in Operator Overloading -- 7.4.1 Binary operator overloading [case 3] -- 7.4.2 Binary operator overloading [case 1] -- 7.5 Overloading of Increment Operator -- 7.6 Conversion Function -- 7.7 End of Chapter Programs -- 7.7.1 Overloading of assignment operator [case 1] -- 7.7.2 Overloading << operator -- 7.7.3 Expression with unary as well as binary overloaded operators -- 7.7.4 Class polar -- 7.7.5 Rational numbers -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 8: Strings -- 8.1 Introduction. 8.2 Working with Strings -- 8.2.1 Reading a string -- 8.2.2 Writing a string -- 8.2.3 Comparing strings -- 8.2.4 Copying one string into other -- 8.2.5 Length of a string -- 8.2.6 Concatenation of strings -- 8.3 Useful Functions for Operating on Strings -- 8.4 Simple String Programs -- 8.4.1 Capitalize first character -- 8.4.2 Reading a string containing blank -- 8.4.3 Removing return from a string -- 8.4.4 Sorting strings -- 8.4.5 Printing Strings with Field Specifications -- 8.4.6 Copying strings -- 8.5 Our Own Strings -- 8.6 Constructors for Type String -- 8.7 Interactive Constructor for Class String -- 8.8 Operator Overloading with Class String -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 9: Inheritance I -- 9.1 Introduction -- 9.2 Derived and Base Class -- 9.3 Public Derivation -- 9.3.1 Public members of base class -- 9.3.2 Private members of base class -- 9.3.3 Protected members of base class -- 9.4 Private Derivation -- 9.5 Protected Derivation -- 9.6 Function Overriding -- 9.6.1 Overriding and overloading -- 9.7 Base and Derived Class Constructors -- 9.8 End of Chapter Programs -- 9.8.1 Working with private derivation -- 9.8.2 Program on students and their performance -- 9.8.3 Function overriding: different signature -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 10: Inheritance II -- 10.1 Multiple Inheritance -- 10.2 Hierarchical Inheritance -- 10.3 Multilevel Inheritance -- 10.4 Hybrid Inheritance -- 10.5 A Multipath Inheritance -- 10.6 Virtual Base Class -- 10.7 Constructors for Virtual Base Classes -- 10.8 Classification of Inheritance -- 10.9 Relationships -- 10.9.1 is-a Relationship -- 10.9.2 has-a Relationship -- 10.10 Practical Class Definition -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers. Exercises -- Chapter 11: Input/Output -- 11.1 Introduction -- 11.2 Stream I/O Classes -- 11.3 Format-free Input -- 11.4 Formatted Input -- 11.5 Format-free Output -- 11.6 Formatted Output -- 11.6.1 Writing integers -- 11.6.2 Writing float -- 11.6.3 Writing structures and objects -- 11.7 The Manipulators -- 11.7.1 Manipulators for reading integers -- 11.7.2 Manipulators for writing integers -- 11.7.3 Manipulators for writing floats -- 11.8 Summary of Manipulators -- 11.9 Our Own Manipulators -- 11.10 Miscellaneous Functions -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 12: Pointers -- 12.1 Introduction -- 12.2 The & (AND) Operator -- 12.3 The * Operator -- 12.4 Pointers and Arrays -- 12.5 Pointer Arithmetic -- 12.6 Pointer to Void -- 12.7 Pointer to Function -- 12.8 Dynamic Memory Allocation -- 12.8.1 Free Store -- 12.9 Operators new and delete -- 12.9.1 Operator new -- 12.9.2 Operator delete -- 12.10 One Dimensional Arrays Using Pointers -- 12.11 Two Dimensional Arrays Using Pointers -- 12.12 Pointers to User Defined Data Types -- 12.12.1 Array of pointers (to objects) -- 12.13 Advantages and Disadvantages of Pointers -- 12.14 End of Chapter Programs -- 12.14.1 Class Vector -- 12.14.2 Comparison of pointers -- 12.14.3 Study of NULL -- For Advanced Readers -- Summary -- Multiple Choice Questions and Answers -- Exercises -- Chapter 13: Polymorphism -- 13.1 Introduction -- 13.2 Compile Time Polymorphism -- 13.2.1 Polymorphism with ordinary1 objects -- 13.2.2 Polymorphism with dynamic objects2 -- 13.2.3 Early binding -- 13.2.4 Function overriding -- 13.3 Pointing to Derived Class Objects -- 13.3.1 Demo program: The Twist -- 13.4 Virtual Functions -- 13.4.1 Need for virtual functions -- 13.4.2 Declaring function virtual -- 13.5 Run Time Polymorphism -- 13.5.1 Run time polymorphism in action. 13.6 Pure Virtual Functions.
This fully revised and indispensable edition of Object-Oriented Programming with C++ provides a sound appreciation of the fundamentals and syntax of the language, as well as of various concepts and their applicability in real-life problems. Emphasis has been laid on the reusability of code in object-oriented programming and how the concepts of class, objects, inheritance, polymorphism, friend functions, and operator overloading are all geared to make the development and maintenance of applications easy, convenient and economical.
9788131798584
Electronic books.
005.13