Object Oriented Programming - Syllabus

Embark on a profound academic exploration as you delve into the Object Oriented Programming course (OOP) within the distinguished Tribhuvan university's CSIT department. Aligned with the 2074 Syllabus, this course (CSC161) seamlessly merges theoretical frameworks with practical sessions, ensuring a comprehensive understanding of the subject. Rigorous assessment based on a 60 + 20 + 20 marks system, coupled with a challenging passing threshold of , propels students to strive for excellence, fostering a deeper grasp of the course content.

This 3 credit-hour journey unfolds as a holistic learning experience, bridging theory and application. Beyond theoretical comprehension, students actively engage in practical sessions, acquiring valuable skills for real-world scenarios. Immerse yourself in this well-structured course, where each element, from the course description to interactive sessions, is meticulously crafted to shape a well-rounded and insightful academic experience.

Course Description: The course covers the basic concepts of object oriented programming using C++ programming language.

Course Objectives: The main objective of this course is to understand object oriented

programming and advanced C++ concepts such as composition of objects, operator overloads,

inheritance and polymorphism, file I/O, exception handling and templates.


Introduction to Object Oriented Programming

Overview of structured programming approach, Object oriented programming approach,

Characteristics of object oriented languages

Basics of C++ programming

C++ Program Structure, Character Set and Tokens, Data Type, Type Conversion, Preprocessor

Directives, Namespace, Input/Output Streams and Manipulators, Dynamic Memory Allocation

with new and delete, Control Statements.

Functions: Function Overloading, Inline Functions, Default Argument, Pass by Reference,

Return by Reference, Scope and Storage Class.

Pointers: Pointer variables declaration & initialization, Operators in pointers, Pointers and

Arrays, Pointer and Function.

Classes & Objects

A Simple Class and Object, Accessing members of class, Initialization of class objects:

(Constructor, Destructor), Default Constructor, Parameterized Constructor, Copy Constructor,

The Default Copy Constructor, Objects as Function Arguments, Returning Objects from

Functions, Structures and Classes, Memory allocation for Objects, Static members, Member

functions defined outside the class.

Operator Overloading

Fundamental of operator overloading, Restriction on operator overloading, Operator functions as

a class members, Overloading unary and binary operator, Data Conversion (basic to basic, basic

to user-defined, user-defined to basic, user-defined to user-defined)


Introduction to inheritance, Derived Class and Base Class, Access Specifiers (private, protected,

and public), Types of inheritance, Public and Private Inheritance, Constructor and Destructor in

derived classes, Aggregation

Virtual Function, Polymorphism, and miscellaneous

Concept of Virtual functions, Late Binding, Abstract class and pure virtual functions, Virtual

Destructors, Virtual base class, Friend function and Static function, Assignment and copy

initialization, Copy constructor, This pointer, Concrete classes, Polymorphism and its roles.

Function Templates and Exception Handling

Function templates, Function templates with multiple arguments, Class templates, templates and

inheritance, Exceptional Handling (Try, throw and catch), Use of exceptional handling.

File handling

Stream Class Hierarchy for Console Input /Output, Unformatted Input /Output, Formatted Input

/Output with ios Member functions, Formatting with Manipulators, Stream Operator

Overloading, File Input/output with Streams, Opening and Closing files, Read/Write from File,

File Access Pointers and their Manipulators, Sequential and Random Access to File, Testing

Errors during File Operations

Lab works

This course requires a lot of programming practices. Each topic must be followed by a practical

session. Practical sessions for each unit should be conducted and should include writing the

programs in C++. The instructors have to prepare lab sheets for individual units covering the each

concepts of the units as per the requirement. The sample lab sessions can be as following


For Unit 2:


Write programs for illustrating the concepts of

  •  input/output streams and manipulators,
  •  dynamic memory operators with new and delete operators.
  •  function overloading, inline functions, default arguments, pass by reference, return

by reference

For Unit 3:


Write programs for illustrating the concepts of

  •  class and object
  •  constructor (default, parameterized, copy)
  •  destructor
  •  objects as function arguments
  •  returning objects from functions

For Unit 4:


Write programs for illustrating the concepts of

  •  unary operator overloading (prefix and postfix)
  •  binary operator overloading (Arithmetic , comparison and assignment)
  •  data conversion (basic to basic, basic to user-defined, user-defined to basic, user-
  • defined to user-defined)

For Unit 5:


Write programs for illustrating the concepts of

  •  base class and derived class
  •  protected access specifier
  •  overriding member function
  •  public and private inheritance
  •  constructor in derived class

For Unit 6:


Write programs for illustrating the concepts of

  • abstract class and pure virtual function
  • friend function and friend class
  • static function
  • this pointer

For Unit 7:


Write programs for illustrating the concepts of

  •  Function templates and class templates
  •  Templates and Inheritance
  •  Exceptional handling using try, throw and catch
  •  Multiple exceptions , Exceptions with arguments

For Unit 8:


Write programs for illustrating the concepts of

  •  ifstream, ofstream and fstream
  •  Opening and Closing files using open () and close () member functions
  •  Read/Write from File using put( ), and get( ),
  • read ( ) and write( ) member
  • functions
  •  File Access Pointers and their Manipulators using seekg( ), seekp( ), tellg( ), tellp( ),
  • offset, ios::beg, ios::cur, ios::end
  •  Testing Errors during File Operations using eof( ), fail( ), bad( ), good( )