Book Name: Object Oriented Programming With C++
Category: Computer Books ( CE & IT )
Free Download: Available

Object Oriented Programming With C++ 

Object Oriented Programming With C++ pdf

Object Oriented Programming With C++ PDF

Author(s): Sharma, A. K

Publisher: Pearson Education India, Year: 2017

ISBN: 9789332515833

 

Table of contents :

Cover……Page 1
Contents……Page 6
Preface……Page 12
About the author……Page 14
1.1 Introduction……Page 16
1.3 Basic Data Types……Page 17
1.4.1 Identifi ers……Page 18
1.4.3 Constants……Page 19
1.4.4 Variables……Page 20
1.5 Input–Output Statements……Page 21
1.6 Structure of a C++ Program……Page 23
1.7 Escape Sequence (Backslash Character Constants)……Page 24
1.8.1 Arithmetic Operators……Page 27
1.8.2 Relational and Logical Operators……Page 28
1.8.3 Conditional Operator……Page 30
1.8.5 Some Special Operators……Page 31
1.9 Flow of Control……Page 33
1.9.1 The Compound Statement……Page 34
1.9.2 Selective Execution (Conditional Statements)……Page 35
1.9.3 Repetitive Execution (Iterative Statements)……Page 40
1.9.4 Nested Loops……Page 45
1.10 Arrays……Page 46
1.10.1 One-dimensional Arrays……Page 47
1.10.2 Multi-dimensional Arrays……Page 48
1.10.3 Array Initialization……Page 50
1.11.1 Defi ning a Structure in ‘C++’……Page 51
1.11.3 Initializing Structures……Page 53
1.11.5 Nested Structures……Page 54
1.12 Functions……Page 55
1.12.2 Calling a Function……Page 56
1.12.3 Parameter Passing in Functions……Page 57
1.12.4 Returning Values from Functions……Page 61
1.13.1 getchar( ) and putchar( ) Functions……Page 63
1.13.3 gets( ) and puts( ) Functions……Page 65
1.14 Strings……Page 66
Multiple Choice Questions……Page 69
Exercises……Page 71
Answers……Page 73
2.1.1 The & Operator……Page 74
2.1.2 The * Operator……Page 75
2.2 Pointer Variables……Page 76
2.2.1 Dangling Pointers……Page 81
2.3 Pointers and Arrays……Page 82
2.4 Array of Pointers……Page 88
2.5 Pointers and Structures……Page 89
2.6 Dynamic Allocation……Page 91
2.6.1 Self Referential Structures……Page 97
2.7 Summary……Page 103
Exercises……Page 104
Answers……Page 108
3.1 Introduction……Page 109
3.2 Unstructured Programming……Page 110
3.3 Structured Programming……Page 111
3.3.1 Procedural Programming……Page 112
3.3.2 Modular Programming……Page 113
3.4 Drawbacks of Structured Programming……Page 114
3.5 Object-Oriented Programming……Page 116
3.6 Summary……Page 118
Multiple Choice Questions……Page 119
Exercises……Page 120
4.1 Introduction to Objects……Page 121
4.2 Classes……Page 124
4.3 Declaration of Classes in C++……Page 125
4.3.1 Abstraction and Encapsulation……Page 126
4.3.2 Member Function Defi nition……Page 127
4.4 Creating Objects……Page 130
4.4.1 Calling Member Functions……Page 131
4.5 Array of Objects……Page 134
4.6 Objects as Function Arguments……Page 136
4.7 Scope Resolution Operator……Page 139
4.8 Static Data Members……Page 144
4.9 Properties of Classes and Objects……Page 146
Multiple Choice Questions……Page 147
Exercises……Page 148
5.2 Function Overloading……Page 151
5.3 Inline Functions……Page 158
5.4 Friend Functions……Page 161
5.4.2 Friend Function as a Bridge Between Two Classes……Page 168
5.5 Friend Classes……Page 172
5.6 Recursion……Page 175
5.6.1 Types of Recursion……Page 182
Multiple Choice Questions……Page 188
Exercises……Page 189
Answers……Page 191
6.1 Constructors……Page 192
6.2.1 Default Constructor and User Defi ned Constructor……Page 193
6.2.2 Parameterized Constructors……Page 196
6.2.3 Copy Constructor……Page 200
6.3 Destructors……Page 208
Multiple Choice Questions……Page 210
Exercises……Page 211
7.2 Containership……Page 213
7.3 Inheritance……Page 219
7.3.1 Visibility Modes……Page 225
7.4 Types of Inheritance……Page 226
7.4.1 Multilevel Inheritance……Page 227
7.4.2 Multiple Inheritance……Page 228
7.5 Function Overriding……Page 229
7.5.1 Virtual Functions……Page 231
7.6 Role of Constructors and Destructors in Inheritance……Page 241
7.7 Virtual Base Class……Page 245
7.8 Summary……Page 247
Exercises……Page 248
8.1 Introduction to Code Sharing……Page 250
8.2 Templates……Page 251
8.3 Generic Classes……Page 255
8.4 Templates with More than One Generic Parameter……Page 258
Exercises……Page 260
9.1 Introduction……Page 262
9.2 Operator Overloading……Page 264
9.3 Binary Operators……Page 265
9.3.1 Arithmetic Assignment Operators……Page 270
9.4 Unary Operators……Page 271
9.5 Input/Output Operators……Page 273
9.7 Summary……Page 275
Exercises……Page 276
10.1 File Concepts……Page 277
10.2 Files and Streams……Page 279
10.3 Opening and Closing a File (Text Files)……Page 281
10.3.1 Function get( )……Page 282
10.3.2 Function getline( )……Page 284
10.3.3 Function put( )……Page 287
10.4 Opening the Files by Using Function Open( )……Page 288
10.5 Reading and Writing Blocks and Objects (Binary Files)……Page 289
10.5.1 Storing Objects in Files……Page 295
10.6 Detecting End of File……Page 299
Multiple Choice Questions……Page 304
Exercises……Page 305
11.2 Traditional Error Handling……Page 307
11.3 Exception Handling in C++……Page 311
11.3.1 Multiple Throw Statements and Multiple Catch Blocks……Page 314
11.3.2 Throwing Objects……Page 318
Exercises……Page 324
12.1 Introduction to Uml……Page 326
12.2 Class Diagrams (Static)……Page 327
12.2.1 Relationships Among Classes……Page 328
12.3 Use Case Diagrams (Static)……Page 331
12.4.1 Interaction Diagrams……Page 333
12.4.2 State Chart Diagrams……Page 335
12.4.3 Activity Diagrams……Page 337
12.5.1 Component Diagram……Page 339
12.5.2 Deployment Diagram……Page 340
12.6 Summary……Page 341
Multiple Choice Questions……Page 342
Exercises……Page 343
13.1 Polymorphism……Page 344
13.2.2 Ad Hoc Polymorphism……Page 345
Appendix……Page 348
Index……Page 350

 

Download

Buy From Amazon

Related More Books
Thanks For Visiting Our Website https://freepdfbook.com To Support Us, Keep Share On Social Media.