Book description
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.
Table of contents
- Cover
- Title Page
- Contents
- Dedication
- Foreword
- Preface to the Second Edition
- Preface to the First Edition
- 1. Introduction to Computers and Computing
-
2. Moving from C to C++I
- 2.1 - Fundamentals
- 2.2 - Data Types
- 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.11 - Control Statements
- 2.12 - Iteration Statements
- 2.13 - End of Chapter Programs
- 2.14 - Flow Charts and Decision Tables
- Summary
- Exercises
-
3. Moving from C to C++ II
- 3.1 - Introduction to Functions
- 3.2 - Parameter Passing
- 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.8 - Recursion
- 3.9 - Scope Rules
- 3.10 - Arrays
- 3.11 - Structures
- 3.12 - Union
- 3.13 - Line Splicing
- 3.14 - Command Line Arguments
- 3.15 - Multi File Programs
- 3.16 - Difference Between C and C++
- 3.17 - End of Chapter Programs
- Summary
- Exercises
- 4. Object Orientation: An Introduction
-
5. Classes and Objects
- 5.1 - Introduction
- 5.2 - Data Hiding and Encapsulation
- 5.3 - Member Functions
- 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.11 - Friend Functions
- 5.12 - Friend Classes
- 5.13 - Access Specifier Protected
- 5.14 - Ideal Class Definition
- 5.15 - End of Chapter Programs
- Summary
- Multiple Choice Questions and Answers
- Exercises
-
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.11 - Destructors
- 6.12 - End of Chapter Programs
- Summary
- Multiple Choice Questions and Answers
- Exercises
- 7. Operator Overloading
-
8. Strings
- 8.1 - Introduction
- 8.2 - Working with Strings
- 8.3 - Useful Functions for Operating on Strings
- 8.4 - Simple String Programs
- 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
- Summary
- Multiple Choice Questions and Answers
- Exercises
- 9. Inheritance I
-
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.10 - Practical Class Definition
- Summary
- Multiple Choice Questions and Answers
- Exercises
-
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.7 - The Manipulators
- 11.8 - Summary of Manipulators
- 11.9 - Our Own Manipulators
- 11.10 - Miscellaneous Functions
- Summary
- Multiple Choice Questions and Answers
- Exercises
-
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.9 - Operators new and delete
- 12.10 - One Dimensional Arrays Using Pointers
- 12.11 - Two Dimensional Arrays Using Pointers
- 12.12 - Pointers to User Defined Data Types
- 12.13 - Advantages and Disadvantages of Pointers
- 12.14 - End of Chapter Programs
- Summary
- Multiple Choice Questions and Answers
- Exercises
-
13. Polymorphism
- 13.1 - Introduction
- 13.2 - Compile Time Polymorphism
- 13.3 - Pointing to Derived Class Objects
- 13.4 - Virtual Functions
- 13.5 - Run Time Polymorphism
- 13.6 - Pure Virtual Functions
- 13.7 - Abstract Classes
- 13.8 - The Climax: Array of Derived Class Objects
- 13.9 - Implicit Derived-Class Object to Base-Class Object Conversion
- 13.10 - End of Chapter Programs
- Summary
- Multiple Choice Questions and Answers
- Exercises
-
14. File Handling
- 14.1 - Introduction
- 14.2 - Why Files?
- 14.3 - Basic File Types
- 14.4 - Text Files
- 14.5 - Binary Files
- 14.6 - File Opening Modes
- 14.7 - Classification of Files
- 14.8 - Direct Access Files: Simultaneous Read Write
- 14.9 - Files and Stream Classes
- 14.10 - Errors and Error Handling in File Operation
- 14.11 - In the Days of C
- 14.12 - End of Chapter Programs
- Summary
- Multiple Choice Questions and Answers
- Exercises
- 15. Templates
- 16. Miscellaneous Topics
-
17. Graphics and Animation
- 17.1 - Introduction
- 17.2 - Graphics Initialization
- 17.3 - The Screen in Graphics Mode
- 17.4 - Uniform Look and Feel with Object Orientation
- 17.5 - Rotating Phasor and Sinusoidal Wave
- 17.6 - Periodic Waveform Generation Using Fourier Series
- 17.7 - Monte Carlo Method
- 17.8 - Storing Image on the Disk
- 17.9 - Animation
- 17.10 - Using a Mouse
- 17.11 - Tiger by the Tail – A VB Form
- 17.12 - Summary of Graphics Functions and Constants
- Summary
- Exercises
-
18. Exception Handling
- 18.1 - Introduction
- 18.2 - Errors and Error Handling: Life Before Exceptions
- 18.3 - Exception Handling Building Blocks
- 18.4 - Working of Exception Handling Mechanism
- 18.5 - Catching all Exceptions
- 18.6 - Object as Exception
- 18.7 - Re-throwing an Exception
- 18.8 - Exception Specification
- 18.9 - Stack Unwinding
- 18.10 - Exceptions in Constructors and Destructors
- 18.11 - Exceptions and Inheritance
- 18.12 - Class Exception
- Summary
- Multiple Choice Questions and Answers
- Exercises
-
19. Advanced Topics from ANSI/ISO C++
- 19.1 - New Type String
- 19.2 - Type Bool
- 19.3 - Standard Template Library (STL)
- 19.4 - Container Classes
- 19.5 - Iterators
- 19.6 - Algorithms
- 19.7 - Taxonomy of Classes
- 19.8 - Type Casting Operators
- 19.9 - Run Time Type Information RTTI
- 19.10 - Remaining Topics
- Summary
- Multiple Choice Questions and Answers
- Exercises
- 20. Towards Better Programming
- 21. Collection of Programs
- 22. OOAD with Snake and Ladder
- 23. Rule Book of C++
- 24. Objects Library
-
Appendices
- Appendix A: Keywords in C++
- Appendix B: Precedence of Operators
- Appendix C: List of Turbo C++ Header Files
- Appendix D: Flags and Manipulators
- Appendix E: Turbo C ++ 3.0 Environment
- Appendix F: Console Input–Output
- Appendix G Simple C Style input–output
- Appendix H: G++ Compiler and Codeblocks IDE
- Appendix I: Standard Library
- Appendix J: Mini Projects
- Notes
- Bibliography
- Glossary
- Copyright
Product information
- Title: Object Oriented Programming with C++, Second Edition
- Author(s):
- Release date: May 2012
- Publisher(s): Pearson India
- ISBN: 9788131770726
You might also like
book
Object-Oriented Programming with C++
Object-Oriented Programming (OOP) is a paradigm shift in programming, which defines, creates, and manipulates objects to …
book
Object-Oriented Programming in C++, Fourth Edition
Object-Oriented Programming in C++ begins with the basic principles of the C++ programming language and systematically …
book
Hands-On System Programming with C++
A hands-on guide to making system programming with C++ easy Key Features Write system-level code leveraging …
book
Deciphering Object-Oriented Programming with C++
Embrace object-oriented programming and explore language complexities, design patterns, and smart programming techniques using this hands-on …