BIT 2nd Semester
Object Oriented Programming


Object Oriented Programming

Course Title: Object Oriented Programming

Course No: BIT153

Nature of the Course: Theory + Lab

Semester: II

Full Marks: 60 + 20 + 20 Pass Marks: Credit Hrs: 3

Course Description

The course familiarizes students with the concepts of object oriented programming using C++.

Course Objectives

The main objective of this course is to understand the basics of object oriented programming. This course covers the C++ concepts such as objects, class, operator overloading, inheritance and polymorphism, file I/O, exception handling and templates.

Course Contents

Unit 1: Introduction to Object Oriented Programming 3 Hrs.

Overview of structured and object oriented programming approach, Characteristics of object oriented languages

Unit 2: Basics of C++ programming 5 Hrs.

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.

Unit 3: : Class and Objects 8 Hrs.

Class and Object, Accessing members of class, Initialization of class object (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.

Unit 4: Operator Overloading 7 Hrs.

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)

Unit 5: Inheritance 7 Hrs

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, Ambiguity

Unit 6: : Virtual Function, Polymorphism, and other C++ Features 5 Hrs

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.

Unit 7: Function Templates and Exception Handling 4 Hrs

Function templates, Function templates with multiple arguments, Class templates, templates and inheritance, Exceptional Handling (Try, throw and catch), Use of exceptional handling.

Unit 8: File and Streams 6 Hrs

Stream Class Hierarchy, String I/O (Reading I/O, Writing I/0, Detecting end of file), Character I/O, Object I/O (Writing an object to Disk, Reading an object from Disk), File pointers

Laboratory Works:
Students should be able to implement the above mentioned concepts of Object Oriented Programming using C++ language.
Text Book:
1. Robert Lafore, Object Oriented Programming in C++, Fourth Edition, SAMS publications. Reference Books:
1. Deitel and Deitel, C++ How to Program, Third Edition, Pearson Publication.
2. Joyce Farrell, Object-oriented programming using C++, Fourth Edition, Cengage Learning.
3. Herbert Schildt, C++ The Complete Reference, Fourth Edition, Tata McGraw Hill Publication.
Source: Tribhuvan University

tu BIT Object Oriented Programming

2nd semester Object Oriented Programming

TU BIT Syllabus