per person /


Home Courses

OOPs with C++ Programming

OOPs with C++ Programming


K.Santoshachandra Rao


Core Courses

Course Attendees

Still no participant

Course Reviews

Still no reviews

Course Name : OOPs with C++ Programming

Code(Credit) : CUTM1028(1-2-1)

Course Objectives

  • To understand how C++ improves C with object-oriented features
  • To learn how to design C++ classes for code reuse
  • To learn how inheritance and virtual functions implement dynamic binding with polymorphism
  • To learn how to use exception handling in C++ programs

Learning Outcomes

  • Apply the object-oriented programming approach in connection with C++
  • Illustrate the process of data file manipulations using C++
  • Apply virtual and pure virtual function & complex programming situations
  • Write an error free program of minimum 200 lines of code

Course Syllabus

Module I: Revision of C programming (8 hrs)
Revision of C Programming, Pointers, Functions (Call by value and reference), Recursion, Arrays using Pointers, Structures, Union, Enumeration and Typedef, File handling.

1.Write a Program to perform Parameter passing.
2.Write a program to create a scientific calculator.
3.Write a program to convert a decimal to binary number using recursion.
4.Write a program to Read 'n' employee details and display the top 10 employees as per the salary.
5.Write a program to evaluate MCQ questions of an examination and generate the results using files.

Module II: Basics of Object oriented concepts (8 hrs)
Object oriented concepts Classes and Objects, Encapsulation, Abstraction, Overloading, Inheritance, Polymorphism.
Beginning with C++, Tokens, Static Members, Constant Members, Expressions, Control Structure, Functions: parameter passing, inline function, function overloading.

1.Write a program to read a number and check whether the number is Prime number , Palindrome number , Magic number , Armstrong number , Strong number or not.
2.Write definitions for two versions of an overloaded function. This function’s 1st version sum() takes an argument, int array, and returns the sum of all the elements of the passed array. The 2nd version of sum() takes two arguments, an int array and a character (‘E’ or ‘O’). If the passed character is ‘E’, it returns the sum of even elements of the passed array and is the passed character is ‘O’, it returns the sum of odd elements. In case of any other character, it returns 0 (zero).

Module III: Class-Object-Constructor (10 hrs)
Classes: data members, member function, array of objects, static data members, constant members function, and friend function.
Constructors, Encapsulating into an object, Destructors.

1. Define a class to represent a book in a library. Include the following members:
Data Members
Book Number, Book Name, Author, Publisher, Price, No. of copies issued, No. of copies
Member Functions
(i) To assign initial values
(ii) To issue a book after checking for its availability
(iii) To return a book
(iv) To display book information.

2. A bank maintains two kinds of accounts for customers, one called as savings and the other as current account. The savings account provides compound interest and withdrawal facilities but no cheque book facility. The current account provides cheque book facility but no interest. Current account holders should also maintain a minimum balance and if the balance falls below this level a service charge is imposed.
Define a class to represent a bank account. Include the following members: Data members: 1. Name of the depositor. 2. Account number. 3. Type of account. 4. Balance amount in the account. Member functions: 1. To assign initial values. 2. To deposit an amount. 3. To withdraw an amount after checking the balance. 4. To display the name and balance. Write a main program to test the program

3. Declare a class to represent fixed-deposit account of 10 customers with the following data members:
Name of the depositor, Account Number, Time Period (1 or 3 or 5 years), Amount.
The class also contains following member functions:
(a) To initialize data members.
(b) For withdrawal of money (after alf of the time period has passed).
(c) To display the data members.

4. Create two classes DM and DB which store the value of distances. DM stores distances in meters and centimeters and DB in feet and inches. Write a program that can read values for the class objects and add one object of DM with another object of DB. Use a friend function to carry out the addition operation. The object that stores the results may be a DM object or DB object, depending on the units in which the results are required. The display should be in the format of feet and inches or meters and centimeters depending on the object on display.

Module IV: Inheritance (8 hrs)
Associations, Inner Classes, Memory Management and pointers
Inheritance: Derived classes, member accessibility, forms of inheritance, virtual base classes.

1.Write a Program to describe about all types of inheritance .
2. Create a base class called shape. Use this class to store two double type values that could be used to compute the area of figures. Derive two specific classes called triangle and rectangle from the base shape. Add to the base class, a member function get_data() to initialize base class data members and another member function display_area() to compute and display the area of figures. Make display_area() as a virtual function and redefine this function in the derived classes to suit their requirements. Using these three classes, design a program that will accept dimensions of a triangle or a rectangle interactively, and display the area.

3. An educational institution wishes to maintain a database of its employees. The database is divided into a number of classes whose hierarchical relationships are shown in following figure. The figure also shows the minimum information required for each class. Specify all classes and define functions to create the database and retrieve individual information as and when required.

Module V:Polymorphism (8 hrs)
Polymorphism (Compile time Polymorphism, Run time Polymorphism), Virtual Functions, Abstract class, virtual destructors, Interfaces.

1.Write a Program to overload ++ operator.
2.Write a program to overload + operator by concatenating strings.
3.Write a program to describe about virtual function.

Module VI: Exception Handling (8 hrs)
Exception Handling, Managing Console I/O Operations, Streams & Files: streams, hierarchy of stream classes, working with files

1.Write a Program to describe about exception handling mechanism.
2.Write a Program to describe multi catch statement.
3. Write a program to read a list containing item name, item code, and cost interactively and produce a three column output as shown below.

Note that the name and code are left-justified and the cost is right justified with a precision of two digits. Trailing zeros are shown.
4.Write a program that reads a text file and creates another file that is identical except that every sequence of consecutive blank spaces is replaced by a single space.
5.Write a program that reads character from the keyboard one by one. All lower case characters get store inside the file LOWER, all upper case characters get stored inside the file UPPER and all other characters get stored inside OTHERS.

Module VII: Templates (8 hrs)
Advance Topics in C++ Object Design and Templates STL (Standard Type Libraries)RTTI (Run Time Type Identification) Advanced Typecasting ,new data types, new operators, class implementation, namespace scope , operator keywords, new headers , C++ Containers

1. Write a function template for finding the minimum value contained in an array.
2. Imagine a publishing company that markets both books and audio-cassette versions of its works. Create a class called Publication that stores the title (a string) and price of a publication. From this class derive two classes: Book, which adds a page count (type int); and Tape, which adds a playing time in minutes (type float). Each of the three class should have a getdata() function to get its data from the user at the keyboard, and a putdata() function to display the data.
Write a main() program that creates an array of pointers to Publication. In a loop, ask the user for data about a particular book or Tape, and use new to create a object of type Book or Tape to hold the data. Put the pointer to the object in the data for all books and tapes, display the resulting data for all the books and taps entered, using a for loop and a single statement such as
to display the data from each object in the array.

Text / Reference Books:-
1.E Balagurusamy, “Object Oriented Programming with C++”, Tata McGraw Hill, Sixth Edition.

2.Herbert Schlitz, “The Compete Reference C++”, Tata McGraw Hill, Fourth Edition.

3.Ashok Kamthane, “Object Oriented Programming with ANSI and Turbo C++”, Pearson.

4.Behrouz A. Forouzan & Richard F. Gilberg “A Structured approach using C++” Cengage Learning Indian Edition.



  • C++ Student Databases System
  • C++ Class Performa
  • C++ Employee Management
  • C++ Hotel Management
  • C++ Bank System
  • OpenCV C++ Program for Face Detection

Session Plan

Session 1

Revision of C Programming Video Source-ClickHere      Content Source-ClickHere

Session 2

Session 3

Functions (Call by value and reference) Video Source-ClickHere      Content Source-ClickHere

Session 4

Session 5

Arrays using Pointers,Structures, Union Video Source-ClickHere      Content Source-ClickHere

Session 6

Enumeration and Typedef, File handling. Video Source-ClickHere      Content Source-ClickHere

Session 7

Practice : Module 1 - 1,2,3,4,5 Programs

Session 8

Project: Group Identification and Project Distribution

Session 9

Object oriented concepts Classes and Objects Video Source-ClickHere      Content Source-ClickHere

Session 10

Beginning with C++, Tokens Video Source-ClickHere      Content Source-ClickHere

Session 11

Static Members, Constant Members,Expressions, Control Structure Video Source-ClickHere      Content Source-ClickHere

Session 12 & 13

Functions: parameter passing, inline function, function overloading. Video Source-ClickHere      Content Source-ClickHere

Session 14

Practice : Module 2 - 1,2 Programs

Session 15

Project: Review  (Abstract , Existing System , Proposed System and Requirement Analysis)

Session 16

Classes: data members and member function Video Source-ClickHere      Content Source-ClickHere

Session 17

array of objects Video Source-ClickHere      Content Source-ClickHere

Session 17

static data members Video Source-ClickHere      Content Source-ClickHere

Session 18

constant members function Video Source-ClickHere      Content Source-ClickHere

Session 19

Practice : Module 3 - 1,2 Programs

Session 21

Session 22

Session 23

Encapsulating into an object Video Source-ClickHere      Content Source-ClickHere

Session 24

Session 25

Practice : Module 3- 3,4 Programs

Session 26

Session 27

Session 28

Memory Management and pointers Video Source-ClickHere      Content Source-ClickHere

Session 29

member accessibility Video Source-ClickHere      Content Source-ClickHere

Session 30

forms of inheritance Video Source-ClickHere      Content Source-ClickHere

Session 31 & 32

virtual base classes. Video Source-ClickHere      Content Source-ClickHere

Session 33 & 34

Practice : Module 4 - 1,2,3 Programs

Session 35

Project: Review (Design phase)

Session 36

Polymorphism (Compile time Polymorphism, Run time Polymorphism) Video Source-ClickHere      Content Source-ClickHere

Session 37

Virtual Functions Video Source-ClickHere      Content Source-ClickHere

Session 38

Session 39

virtual destructors Video Source-ClickHere      Content Source-ClickHere

Session 40

Session 41

Practice : Module 5 - 1,2,3 Programs

Session 42

Project: Review (Coding Phase)

Session 43

Exception Handling Video Source-ClickHere      Content Source-ClickHere

Session 44

Managing Console I/O Operations Video Source-ClickHere      Content Source-ClickHere

Session 45

Streams & Files: streams Video Source-ClickHere      Content Source-ClickHere

Session 46

hierarchy of stream classes Video Source-ClickHere      Content Source-ClickHere

Session 47

working with files Video Source-ClickHere      Content Source-ClickHere

Session 48

Practice : Module 6 - 1,2,3,4,5 Programs

Session 49

Project: Review (Testing and Implementation)

Session 50

Advance Topics in C++ Object Design Video Source-ClickHere      Content Source-ClickHere

Session 51

Templates STL (Standard Type Libraries) Video Source-ClickHere      Content Source-ClickHere

Session 52

Advanced Typecasting Video Source-ClickHere      Content Source-ClickHere

Session 53

new data types, new operators Video Source-ClickHere      Content Source-ClickHere

Session 54

Session 55

operator keywords, new headers Video Source-ClickHere      Content Source-ClickHere

Session 56

Session 57

Practice : Module 7 - 1,2 Programs

Session 58

Project:  Review ( Documentation , Execution )

Our Main Teachers

K.Santoshachandra Rao

Assistant Professor , Dept of Computer Science & Engineering

K.Santoshachandra Rao working as Assistant Professor, Dept of CSE, Centurion University of Technology and Management, Odisha . Interested to work on Problem Solving Methodologies , Medical Image Processing and ChatBot. Programming Skill: C Programming Data Structure Object Oriented Programming using C++ Core Java Python Web Development(HTML,CSS,PHP)