Unit – I

Introduction to OOPs: Need object oriented programming, comparison of procedural and object oriented approach, characteristics of OOPs – object , classes , polymorphism, inheritance, reusability, data hiding and abstraction, applications of OOPs

Unit- II

Classes and Objects: Class declaration, constructors, constructor initialization lists, access functions, private member functions, the copy constructor, the class destructor ,constant objects, structures, pointers to objects, static data members, static function members

Unit-III

Operator Overloading: overloading the assignment operator, the this pointer, overloading arithmetic operators, overloading the arithmetic assignment, operators, overloading the relational operators ,overloading the stream operators, conversion operators ,overloading the increment and decrement operators, overloading the subscript operator

Unit-IV

Composition and Inheritance: inheritance, protected class members , overriding and dominating inherited members, private access verses protected access, virtual functions and polymorphism, virtual destructors, abstract base classes

File Handling: Classes for file stream operations, opening and closing a file, detecting end of file, file modes, file pointers and their manipulations, sequential input and output operations, random access, file operations error handling, command line argument

Unit –V

Strings and Streams: the string class interface, the constructors and destructor , the copy constructor, the assignment operator, the addition operator , an append operator, access functions , the comparison operators, stream operators,

stream classes, the ios class, ios format flags, ios state , variables ,the istream and ostream classes, unformatted input functions , unformatted output functions, stream manipulators.

Unit-VI

Templates and Iterators: function templates, class templates, container classes, subclass templates, passing template classes to template parameters, iterator classes

Libraries: the standard C++ library, proprietary libraries, contents of the standard c headers, string streams, file processing, the standard template library

Practical:

Should contain at least 10 programs. Some sample practicals are listed below

  1  Implement  the following

a. Design an employee class for reading and displaying the employee information,  the getInfo() and displayInfo() methods will be used repectively. Where getInfo() will be private method.

b. Design the class student containing getData() and displayData() as two of its methods which will be used for reading and displaying the student information respectively.Where getData() will be private method.

c. Design the class Demo which will contain the following methods: readNo() ,factorial() for calculating the factorial of a number, reverseNo() will reverse the given number, isPalindrome() will check the given number is palindrome, isArmstrong() which will calculate the given number is armStrong or not.Where readNo() will be private method.

  2   Implement the following 

a. Write a friend function for adding the two complex numbers, using a single class.

b. Write a friend function for adding the two different distances and display its sum, using two classes.

c. Write a friend function for adding the two matrix from two different classes and display its sum. 3 Implement the following

a. Design a class Complex for adding the two complex numbers and also show the use of constructor.

b. Design a class Geometry containing the methods area() and volume() and also overload the area() function .

c. Design a class StaticDemo to show the implementation of static variable and static function.

 

  4   Implement the following

a. Overload the operator unary(-) for demonstrating operator overloading.

b. Overload the operator + for adding the timings of two clocks, And also pass objects as an argument.

c. Overload the + for concatenating the two strings. For e.g “c” + “++” = c++

  5   Implement the following

a. Design a class for single level inheritance using public and private type derivation.

b. Design a class for multiple inheritance.

c. Implement the hierarchical inheritance.

  6.   Implement the following

a. Implement the concept of method overriding.

b. Show the use of virtual function

c. Show the implementation of abstract class.

  7.   Implement the following

a. String operations for string length , string concatenation

b. String operations for string reverse, string comparison,

c. Console formatting functions.

  8.   Implement the following:

a. Show the implementation of exception handling

b. Show the implementation for exception handling for strings

c. Show the implementation of exception handling for using the pointers.

  9.   Show the implementation

a. Design a class FileDemo open a file in read mode and display the total number of words and lines in the file.

b. Design a class to handle multiple files and file operations

c. Design a editor for appending and editing the files

10. Show the implementation for the following

a. Show the implementation of template class library for swap function.

b. Design the template class library for sorting ascending to descending and vice-versa

c. Design the template class library for concatenating two strings

Books:

SCHAUM’S OUTLINE OF THEORY AND PROBLEMS of PROGRAMMING WITH C++ JOHN R. HUBBARD, TATAMCGRAW-HILL

Object   Oriented   Programming with   C++,   E.Balagurusamy,Fourth   Edition, TATAMCGRAW-HILL.

Object Oriented Programming with C++, by P. Sarang 2nd Edition,(PHI) EEE edition

Reference:

C++ programming , 3rd Edition, Bjarne Stroustrup

Mastering C++, 2nd Edition, Venugopalan, TataMcgrawHill

C++ Programming,  , Robert Lafore,

C++ for Beginners, P. M. Harwani, X-Team Series,