CS15 - OBJECT ORIENTED PROGRAMMING USING C++

CS15 Object Oriented Programming Using C++

 

Teaching Hours : 60  [ 30 hours Theory + 30 hours LAB ]

Prerequisite: Should have basic computer knowledge.

                       

Unit 1: Introduction to c++

History of C++, Structure of a C++ program Constants, variables and keywords, Comments-Output operator-Input operator-Cascading of I/O operators.  Tokens- keyword, identifiers, constants, strings and operators.  Basic data types-User defined data types-Dynamic initialization of variables-Reference variables-Operators in C++-Scope resolution operators-applications- Control Structures-simple if, if else, nested if, switch, while do, break and continue statements.

(5 hours)

Unit 2: Object Oriented Programming

Features of Procedure oriented programming-Basic Concepts of Object Oriented Programming-Benefits of OOP-Applications of OOP.

Functions

Introduction-Function Prototyping-Call by reference-Return by reference-Inline functions-Default arguments-Const arguments.     

(6 hours)

              

Unit  3 : Classes and Objects

Introduction-Limitations of C structures-Defining a class-Class Vs structures-Creating objects-Accessing class members-Defining member functions-Outside the class definition-Inside the class definition-Outside functions as inline-Nesting of member functions-Private member functions-Memory allocation for objects-Array of objects.  Friendly functions.

(6 hours)

 

Unit 4 : Constructors and Destructors

Basic Concepts of constructors-Default constructor-Parameterized constructor-Multiple constructors in a class-Constructor with default arguments-Dynamic initialization of objects-Copy constructor-Dynamic constructors-Destructors.                           

 Function and Operator overloading

Introduction-Rules for overloading operators-Defining operator overloading-Overloading Unary operators-Prefix and Postfix operators overloading-Overloading Binary operators-Overloading relational operators-Overloading using friend functions-Overloading subscript operator. Function overloading.

(7 hours)

Unit 5: Inheritance

Introduction-Defining derived classes-Types of inheritances-Single-Making a private member inheritable-Multilevel inheritance-Multiple inheritance-Hierarchical inheritance-Hybrid inheritance-Virtual base classes-Abstract classes-Constructors in derived classes-Nesting of classes-Containership.                                                          

 (6 hours)

 

Text Books:

1. E Balaguruswamy, Object oriented programming with C++, Tata

    McGraw Hill Publication, 5th  Edition,  2008.

2. Schildt Herbert, The Complete Reference C++,  Tata McGraw Hill, 4th Edition, 2009.

Reference Books:

1.      K R Venugopal  Mastering C++ , Tata McGraw-Hill Publication, 2006.

2.      Bjarne Stroustrup  The C++ Programming Language Special Edition, Pearson Education, 2004.

 
Lab Programs

1. Write  a Program to demonstrate functions.

2. Write  a Program to demonstrate function overloading.

3. Write  a Program to demonstrate default arguments.

4. Write  a Program to demonstrate pass by value, pass by reference and return by reference.

5. Write  a Program to demonstrate classes and objects.

6. Write  a Program to demonstrate  constructors.

7. Write  a Program to demonstrate constructor overloading.

8. Write  a Program to demonstrate friend functions.

9. Write  a Program to demonstrate  operator overloading.

10. Write  a Program to demonstrate simple inheritance.

11. Write  a Program to demonstrate multi level inheritance.

12. Write  a Program to demonstrate multiple inheritance and hybrid inheritance.

Programmes
Open Electives