Object Oriented Programming(OOP) Syllabus
This page contains Syllabus of Object Oriented Programming of CSIT.
Title | Object Oriented Programming |
Short Name | OOP |
Course code | CSC161 |
Nature of course | Theory + Lab |
Second Semester | |
Full marks | 60 + 20 + 20 |
Pass marks | 24 + 8 + 8 |
Credit Hrs | 3 |
Elective/Compulsary | Compulsary |
Course Description
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.
Units and Unit Content
- 1. Introduction to Object Oriented Programming
- teaching hours: 3 hrs
Overview of structured programming approach, Object oriented programming approach,
Characteristics of object oriented languages
- 2. Basics of C++ programming
- teaching hours: 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.
- 3. Classes & Objects
- teaching hours: 8 hrs
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.
- 4. Operator Overloading
- teaching hours: 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)
- 5. Inheritance
- teaching hours: 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
- 6. Virtual Function, Polymorphism, and miscellaneous
- teaching hours: 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.
- 7. Function Templates and Exception Handling
- teaching hours: 4 hrs
Function templates, Function templates with multiple arguments, Class templates, templates and
inheritance, Exceptional Handling (Try, throw and catch), Use of exceptional handling.
- 8. File handling
- teaching hours: 6 hrs
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 and Practical 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
descriptions;
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( )