E, Balagurusamy

Object-oriented programming with Cā‚Šā‚Š Balagurusamy, E - 6th ed. - New Delhi : Mc Graw Hill , 2014. - xviii,543 p. : ill. ; 24 cm.

Includes appendix

1. Principles of Object-Oriented Programming
1.1 Software Crisis 1
1.2 Software Evolution 3
1.3 A Look at Procedure-Oriented Programming 4
1.4 Object-Oriented Programming Paradigm 5
1.5 Basic Concepts of Object-Oriented Programming 6
1.6 Benefits of OOP 10
1.7 Object-Oriented Languages 11
1.8 Applications of OOP 12
Summary 13
Key Terms 14
Review Questions 14
2. Beginning with C++
2.1 What is C++? 16
2.2 Applications of C++ 17
2.3 A Simple C++Program 17
2.4 More C++ Statements 21
2.5, An Example with Class 23
2.6 Structure of C++ Program 24
2.7 Creating the Source File 25
2.8 Compiling and Linking 25
Summary 26
Key Terms 26
Review Questions 27
Debugging Exercises 27
Programming Exercises 28
3. Tokens, Expressions and Control Structures
3.1 Introduction 29
3.2 Tokens 29
3.3 Keywords 29
3.4 Identifiers and Constants 30
3.5 Basic Data Types 31
3.6 User-Defined Data Types 33
3.7 Storage Classes 36
3.8 Derived Data Types 37
3.9 Symbolic Constants 38
3.10 Type Compatibility 39
3.11 Declaration of Variables 40
3.12 Dynamic Initialization of Variables 40
3.13 Reference Variables 41
3.14 Operators in C++ 43
3.15 Scope Resolution Operator 43
3.16 Member Dereferencing Operators 45
3.17 Memory Management Operators 46
3.18 Manipulators 50
3.19 Type Cast Operator 52
3.20 Expressions and Their Types 53
3.21 Special Assignment Expressions 55
3.22 Implicit Conversions 56
3.23 Operator Overloading 57
3.24 Operator Precedence 58
3.25 Control Structures 58
Summary 63
Key Terms 64
Review Questions 64
Debugging Exercises 65
Programming Exercises 67
4. Functions In C++
4.1 Introduction 69
4.2 The Main Function 70
4.3 Function Prototyping 70
4.4 Call by Reference 72
4.5 Return by Reference 73
4.6 Inline Functions 73
4.7 Default Arguments 75
4.8 const Arguments 77
4.9 Recursion 77
4.10 Function Overloading 79
4.11 Friend and Virtual Functions 81
4.12 Math Library Functions 82
Summary 83
Key Terms 84
Review Questions 84
Debugging Exercises 85
Programming Exercises 87
5. Classes and Objects
5.1 Introduction 88
5.2 C Structures Revisited 88
5.3 Specifying a Class 90
5.4 Defining Member Functions 93
5.5 A C++ Program with Class 95
5.6 Making an Outside Function inline 97
5.7 Nesting of Member Functions 97
5.8 Private Member Functions 99
5.9 Arrays within a Class 99
5.10 Memory Allocation for Objects 104
5.11 Static Data Members 104
5.12 Static Member Functions 107
5.13 Arrays of Objects 108
5.14 Objects as Function Arguments 111
5.15 Friendly Functions 113
5.16 Returning Oljjects 118
5.17 const Member Functions 120
5.18 Pointers to Members 120
5.19 Local Classes 122
Summary 123
Key Terms 123
Review Questions 124
Debugging Exercises 124
Programming Exercises 128
6. Constructors and Destructors
6.1 Introduction 129
6.2 Constructors 130
6.3 Parameterized Constructors 131
6.4 Multiple Constructors in a Class 133
6.5 Constructors with Default Arguments 136
6.6 Dynamic Initialization of Objects 136
6.7 Copy Constructor 139
6.8 Dynamic Constructors 140
6.9 Constructing Two-Dimensional Arrays 142
6.10 const Objects 144
6.11 Destructors 144
Summary 147
Key Terms 148
Review Questions 148
Debugging Exercises 148
Programming Exercises 151
7. Operator Overloading and Type Conversions
7.1 Introduction 15.
7.2 Defining Operator. loading 153
7.3 Overloading Unary Operators 154
7.4 Overloading Binary Operators 155
7.5 Overloading Binary Operators Using Friends 158
7.6 Manipulation of Strings Using Operators 161
7.7 Some Other Operator Overloading Examples 164
7.8 Rules for Overloading Operate. 166
7.9 Type Conversions 167
Summary 174
Key Terms 174
Review Questions 175
Debugging Exercises 175
Programming Exercises 177
8. inheritance: Extending Classes
8.1 Introduction 179
8.2 Defining Derived Classes 180
8.3 Single Inheritance 181
8.4 Making a Private Member Inheritable 187
8.5 Multilevel Inheritance 190
8.6 Multiple Inheritance 194
8.7 Hierarchical Inheritance 198
8.8 Hybrid Inheritance 200
8.9 Virtual Base Classes 202
8.10 Abstract Classes 206
8.11 Constructors in Derived Classes 207
8.12 Member Classes: Nesting of Classes 213
Summary 214
Key Terms 215
Review Questions 215
Debugging Exercises 216
Programming Exercises 220
9. Pointers, Virtual Functions and Polymorphism
9.1 Introduction 223
9.2 Pointers 224
9.3 Pointers to Objects 234
9.4 this Pointer 238
9.5 Pointers to Derived Classes 240
9.6 Virtual Functions 243
9.7 Pure Virtual Functions 247
9.8 Virtual Constructors and Destructors 249
Summary 250
Key Terms 251
Review Questions 251
Debugging Exercises 251
Programming Exercises 256
10. Managing Console I/O Operations
10.1 Introduction 257
10.2 C++ Streams 257
10.3 C++ Stream Classes 258
10.4 Unformatted I/O Operations 259
10.5 Formatted Console I/O Operations 266
10.6 Managing Output with Manipulators 277
Summary 281
Key Terms 282
Review Questions 282
Debugging Exercises 283
Programming Exercises 285
11. Working with Files
11.1 Introduction 286
11.2 Classes for File Stream Operations 287
11.3 Opening and Closing a File 288
11.4 Detecting End-of-Fiie 295
11.5 More about Open: File Modes 296
11.6 File Pointers and their Manipulations 297
11.7 Sequential Input and Output Operations 299
11.8 Updating a File: Random Acess 305
11.9 Error Handling During File Operations 309
11.10 Command-Line Arguments 311
Summary 313
Key Terms 314
Review Questions 314
Debugging Exercises 316
Programming Exercises 317
12. Templates
12.1 Introduction 319
12.2 Ciass Templates 319
12.3 Class Templates with Multiple Parameters 324
12.4 Function Templates 326
12.5 Function Templates with Multipie Parameters 331
12.6 Overloading of Template Functions 332
12.7 Member Function Templates 333
12.8 Non-Type Template Arguments 334
Summary 335
Key Terms 335
Review Questions 335
Debugging Exercises 337
Programming Exercises 339
13. Exception Handling
13.1 Introduction 340
13.2 Basics of Exception Handling 340
13.3 Exception Handling Mechanism 341
13.4 Throwing Mechanism 345
13.5 Catching Mechanism 345
13.6 Rethrowing an Exception 350
13.7 Specifying Exceptions 352
13.8 Exceptions in Constructors and Destructors 353
13.9 Exceptions in Operator Overloaded Functions 355
Summary 356
Key Terms 356
Review Questions 356
Debugging Exercises 357
Programming Exercises 361
14. Introduction to the Standard Template Library
14.1 Introduction 362
14.2 Components of STL 362
14.3 Containers 363
14.4 Algorithms 366
14.5 Iterators 369
14.6 Application of Container Classes 370
14.7 Function Objects 379
Summary 381
Key Terms 381
Review Questions 381
Debugging Exercises 382
Programming Exercises 384
15. Manipulating Strings
15.1 Introduction 386
15.2 Creating (string) Objects 388
15.3 Manipulating String Objects 389
15.4 Relational Operations 390
15.5 String Characteristics 391
15.6 Accessing Characters in Strings 393
15.7 Comparing and Swapping 394
Summary 396
Key Terms 397
Review Questions 397
Debugging Exercises 398
Programming Exercises 400
16. New Features of ANSI C++ Standard
16.1 Introduction 401
16.2 New Data Types 402
16.3 New Operators 404
16.4 Class Implementation 406
16.5 Namespace Scope 408
16.6 Operator Keywords 413
16.7 New Keywords 414
16.8 New Headers 415
Summary 415
Key Terms 416
Review Questions 416
Debugging Exercises 417
Programming Exercises 419
17. Object-Oriented Systems Development
17.1 Introduction 420
17.2 Procedure-Oriented Paradigms 421
17.3 Procedure-Oriented Development Tools 423
17.4 Object-Oriented Paradigm 424
17.5 Object-Oriented Notations and Graphs 426
17.6 Steps in Object-Oriented Analysis 430
11.7 Steps in Object-Oriented Design 433
11.8 Implementation 439
17.9 Prototyping Paradigm 439
17.10 Wrapping Up 441
Summary 441
Key Terms 442
Review Questions 443

9781259029936 (pb)


Object-oriented Programming (Computer science)
C++ (Computer program language)

005.11 / BAL/O