About the Book - Illustrated Programming with C++:
Objects Oriented Programming came up with strong emphasis on modularity and resue of the code. It modles the "objects" in the real world and their interactions. C++ is one of the popular OOP languages. This book covers important aspects like classes, objects, constructors. inheritance, polymorphism, standard data structures, templates, exception handling, console i/o and file operations. The material presented serves the beginner quite well.
Salient feature of the book - Illustrated Programming with C++
- Helpful to student and instructors
- Emphasis on syntactic details, needed for a first course
- Better and consistent programming conventions throughout the material
- Appropriate sequencing of topic in units
- Large number of small, challenging programming assignments/ exercises
- Meaningful programming projects to be completed by the students
About the Authors of the book - Illustrated Programming with C++:
Dr. Dilip S Mali is at present working as an Assistant Professor in Department of Electrical Engineering, Faculty of Science Technology, Mekelle University, Mekelle, Ethiopia. Before that, he worked as a Lecture in the Department of Electronics, Shivaji University, Kolhapur, India, for seven years. He has been teaching computer languages such as C, C++ to post-graduate students. His research interests are digital signal processing, communication and computer programming. He has pulished papers in national and international journals and presented papers at a numbers of conferences. He is co-author of the book entitled "C Application Programs and Projects", published by Penram International Publishing (India) Pvt Ltd., Mumbai. He is a life member of ISTE and IETE.
Dr. Pramod N. Vasambekar is currently working as a Reader in the Department of Electronics, Shivaji University, Kolhapur. He is also working as a Co-ordinator for the Department of Computer Science, Shivaji University, Kolhapur. He has teaching and research experience of twenty one years. His topics of interest are electronics materials, microwaves, communication electronics and computer programming. He has taught computer languages like BASIC, C and C++ to the M.Sc. students of Electronics. He has published several research papers in national / international journals and presented papers at a number of conferences. He is co-author of the book entitle "C Application Programs and Projects", published by Penram International Publishing (India) Pvt. Ltd. Mumbai.
TABLE OF CONTENTS :
Unit 1 Fundamentals of OOP 1
Introduction
What is OOP?
Characteristics of OOP
Advantages of OOP
Applications of OOP
Limitations of OOP
OOP Languages
Exercises
Unit 2 Fundamentals of C++
Character Set
Keywords
Identifiers
Variables
Constant
Data Types
Operators in C++
Manipulators
Type Cast Operators
Operator Precedence and Associativity
Expressions
Exercises
Unit 3 Data Input/Output, Data Types and Operators
3.1 Executing a Simple C++ Program
3.2 Comments
3.3 String literals and character constants
3.4 Initialization of variables in the declaration
3.5 Dynamic initialization of variables
3.6 Getting data from keyboard using cin
3.7 Multiple inputs in the same stream
3.8 Pre-increment and post-increment operators
3.9 The scope resolution operator (::)
3.10 The type char
3.11 Arithmetic expressions
3.12 Manipulators
3.13 Type casting
3.14 enum data type
3.15 Storage space for various data types
Exercises
Unit 4 Control Structures
Branching
4.A.1 Simple if statement
4.A.2 The if ….else statement
4.A.3 The conditional operator (?:)
4.A.4 The switch statement
4.A.5 The goto statement
Looping
4.B.1 The for loop
4.B.2 The while loop
4.B.3 The do-while loop
4.B.4 The break and continue statements
Exercises
Unit 5 Functions
Arithmetic Functions
5.A.1 sin(), cos() and tan() functions
5.A.2 asin(), acos() and atan() functions
5.A.3 log() and log10() functions
5.A.4 ceil() and floor() functions
5.A.5 abs() and fabs() functions
5.A.6 sqrt() and exp() functions
User Defined Functions
5.B.1 Defining a function
5.B.2 Function prototype
5.B.3 Inline functions
5.B.4 Pass by value and pass by reference
Function Overloading
5.C.1 Overloading by parameter list
5.C.2 Overloading by parameter list
5.C.3 Function overloading (for different types)
Exercises
Unit 6 Array, Pointers and Strings
Arrays
6.A.1 Initialization of an array
6.A.2 Arrays with enum data types
6.A.3 Passing an array to a function
6.A.4 A two-dimensional array
6.A.5 Sorting array elements in ascending order using
bubble sort algorithm
6.A.6 Sorting array elements in ascending order using
selection sort algorithm
6.A.7 Sequential search algorithm
6.A.8 Binary search algorithm
Pointers
6.B.1 A pointer
6.B.2 Dereferencing a pointer
6.B.3 Arrays and pointers
6.B.4 The new and delete operators
Strings
6.C.1 An array of type char
6.C.2 Pointer of type char
6.C.3 Initialization of an array of strings
6.C.4 cin.getline() function
6.C.5 strlen() function
6.C.6 strcpy() function
6.C.7 strncpy() function
6.C.8 strcat() function
6.C.9 strncat() function
6.C.10 strchr(), strrchr() and strstr() functions
6.C.11 strtok() function
Exercises
Programming Project 1
Unit 7 Classes, Objects, Constructor and Destructor
Classes and Objects
7.A.1 A simple program with a class
7.A.2 Defining member functions outside the class
7.A.3 Defining member function inside the class
7.A.4 Making an outside function inline
7.A.5 Nesting of member functions
7.A.6 Friend functions
7.A.7 Arrays of objects
7.A.8 Instantiating objects of different types
7.A.9 Pointer to objects
Constructors and Destructors
7.B.1 Constructor function for the class
7.B.2 Multiple constructors
7.B.3 Copy constructor
7.B.4 The destructor
7.B.5 Constructor initialization list
Exercises
Unit 8 Inheritance
8.1 Single inheritance (visibility mode public)
8.2 Single inheritance (visibility mode private)
8.3 Protected members
8.4 Multilevel inheritance
8.5 Multiple inheritance
8.6 Hierarchical inheritance
8.7 Hybrid inheritance
8.8 Virtual base class
8.9 Constructors in derived classes
8.10 Constructor initialization list in inheritance
Exercises
Programming Project 2
Unit 9 Polymorphism
9.A.1 Overloading binary plus (+) operator
9.A.2 Overloading binary minus (-) operator
9.A.3 Overloading assignment operator
9.A.4 Overloading extraction (output) operator
9.B.1 Virtual functions
Exercises
Unit 10 Standard Data Structures
Stacks and Queues
10.A.1 Stack
10.A.2 Queue
10.A.3 Circular queue
Linked List
10.B.1 Creating a linked list
10.B.2 Adding elements at the beginning of the list
10.B.3 Adding a node after a specified node
10.B.4 Deleting a node from a linked list
10.B.5 Stack in a linked list
10.B.6 Queue in a linked list
Binary Trees
10.C.1 Creating a binary tree and traversing it by the inorder method
10.C.2 Traversing a binary tree by the preorder method
10.C.3 Traversing a binary tree by the postorder method
Exercises
Unit 11 String Class in C++
11.1 Simple program illustrating creation of string objects
11.2 Program for reading a string from the keyboard
11.3 Concatenating strings
11.4 Inserting a string into another string
11.5 Replacing characters in a string
11.6 Removing characters from a string
11.7 Relational operations with string objects
Exercises
Programming Project 3
Unit 12 Templates and Exception Handling
Templates
12.A.1 Function template (One argument)
12.A.2 Function template (Two arguments)
12 A.3 Overloaded function template
12.A.4 Class template
Exception Handling
12.B.1 Exception handling
12.B.2 Exception handling with class
12.B.3 Multiple exceptions
Exercises
Unit 13 Console I/O Operations
Unformatted I/O Operations
13.A.1 Single character input/output functions get() and put()
13.A.2 The getline() function
13.A.3 The write() function
Formatted Console I/O Operations
13.B.1 The member function width()
13.B.2 The member function fill()
13.B.3 The member function precision()
13.B.4 The flags and bit fields for setf() functions
Manipulators
13.C.1 Stream manipulators
13.C.2 User defined manipulators
Exercises
Unit 14 File Operations
14.1 Creation of a file using the constructor function
14.2 Creation of multiple files using the function open()
14.3 Reading multiple files
14.4 get() and put() functions
14.5 write() and read() functions (handling data in binary form)
14.6 Reading and writing class objects from disk file
Exercises
Programming Project 4
References
Index. |