Object Oriented Programming with C++ (3:0:1)
Course Outcome:
Justify the philosophy of object-oriented design and the concepts of encapsulation,
abstraction, inheritance, and polymorphism.
Design, implement, test, and debug simple programs in an object-oriented
programming language.
Describe how the class mechanism supports encapsulation and information hiding.
Compare and contrast the notions of overloading and overriding methods in an
object-oriented language.
Course Content
Unit -I
Introduction: Procedure-oriented programming, Concepts of Object-oriented
programming, benefits of OOP, Applications of OOP, Structure of C++ program.
Tokens, Keywords, Identifiers and constants, Basic Data Types, User-defined data types,
derived data Types, Symbolic constants, Type compatibility, Declaration of variables,
Dynamic initialization of variables, Reference variables, Operators in C++, Scope resolution
operator, Member dereferencing operators, Memory management operators, Manipulators,
Type cast operator, Expressions and their types, Special assignment expressions, Implicit
conversions, Operator overloading, Operator precedence, Control structures.
Unit - II
Functions: The main function, Function prototyping, Call by Reference, Return by
Reference, Inline functions, Default arguments, const arguments, Function overloading,
Friend and Virtual functions.
Classes and Objects: Specifying a Class, Defining member functions, Making an Outside
function Inline, Nesting of member functions, Private member functions, Arrays within a
Class, Static data members, Static member functions, Arrays of Objects, Objects as function
arguments, friendly functions, Returning Objects, const member functions, Pointers to
members.
Constructors and Destructors: Constructors, Parameterized constructors, Multiple
constructors in a class, Constructors with default arguments, Dynamic initialization of
objects, Copy constructor, Dynamic constructor, Constructing Two-dimensional arrays,
const Objects, Destructors.
Unit - III
Operator overloading and Type Conversions: Defining operator overloading, Overloading
unary operators, Overloading Binary operators, Rules for overloading operators, Type
conversions.
Inheritance and Polymorphism: Introduction, defining derived classes, single inheritance,
making a private member inheritable, multilevel inheritance, hierarchical inheritance,
hybrid inheritance, virtual base classes, abstract classes, constructors in derived classes,
polymorphism – introduction, pointers, pointers to objects, this pointers, pointers to
derived classes, virtual functions, pure virtual functions.
Unit –IV
Console I/O Operations, Files and Templates: C++ streams, C++ stream classes,
Unformatted I/O operations, Formatted I/O operations, managing output with
manipulators. polymorphism – introduction, pointers, pointers to objects, this pointers,
pointers to derived classes, virtual functions, pure virtual functions.
Files: Classes for file stream operations, opening and closing a file, detecting end of file,
more about open(): file modes, file pointers and their manipulations, sequential input and
output operations.
Templates: Function templates, Class templates Exceptions.
Reference Books:
1. Object Oriented Programming with C++ , M.T. Somashekara, D.S. Guru, H.S.
Nagendraswamy, K.S. Manjunatha, PHI Learning, New Delhi, 2012
2. Object Oriented Programming with C++ by E. Balagurusamy
3. Object Oriented Programming in C++ by Robert LaforeTechmedia Publication.
4. The complete reference C by Herbert shieldt Tata McGraw Hill Publication