UNIT VIII: I/O Operations and Files: C++ Stream Classes, Unformatted I/O Operations,
Formatted I/O operations, Classes for File Streams, Opening and Closing a File : open() and
close() functions, Manipulators of File Pointers, Sequential Input and output Operations,
Error handling in File Operations.
UNIT IX. Exception Handling: Benefits of Exception Handling, Throwing an Exception,
the Try Block, Catching an Exception, Exception Objects, Exception Specifications,
Rethrowing an Exception, Uncaught Exceptions.
UNIT X. Templates: Class Templates and Function Templates, simple generic classes and
generic function, simple example programs. Introduction to Standard Template Library
(STL).
Practical
Students are required to understand the object-oriented concepts using C++. They are
required to practice the concepts learnt in the theory. Some of the programs to be
implemented are listed as follows:
1. Number of vowels and number of characters in a string.
2. Write a function called zeros maller() that is passed with two introduce arguments by
reference and set the smaller of the number to zero. Write a main() program to access
this function.
3. Demonstration of Class, Constructors, destructors, input and output functions, Objects
4. Demonstration of array of object.
5. Demonstration of friend functions.
6. Demonstration of operator overloading.
7. Demonstration of inheritance.
8. Using this pointer to return a value (return by reference).
9. Demonstration of virtual function.
10. Demonstration of static function.
11. Accessing a particular record in a student's file.
12. Demonstration of exception handling.
13. Demonstration of class template and function template
Internal (CA) Evaluation: Practical Note Book (15 marks), Two experiments (10 marks),
Viva-voce (5 marks).
ESE Evaluation: Two experiments (10 marks), Viva-voce (10 marks)
References/ Suggested Readings:
1. E.Balagurusamy, Object Oriented Programming through C++, TMH.
2. Lafore Robert, Object Oriented Programming in Turbo C++, Galgotia Publications.
3. Herbert Schildt, C++: The Complete Reference, McGraw Hill.
4. B. Stroutstrup, The C++ Programming Language, 3rd Edition, Pearson Education.
5. Ashok N Kamthane, Programming in C++, Pearson.