University of Central Punjab
Faculty of Information Technology
Course BSCS and BSSE
Course Title Object Oriented Programming
Credit Hours 4 (3 + 1)
Prerequisites Programming Fundamentals
Theory (3 credit hours)
Quiz (6) 10
Assignments (4) 10
Project (1) 10
Assessment Class Participation 10
Instruments with Midterm 25
Weights (homework, Final Term 35
quizzes, midterms,
final, programming Lab (1 credit hour)
assignments, lab Laboratory sessions (6) 20
work, etc.) Class Participation 10
Project 10
Midterm 25
Final 35
Textbook Textbook:
• Effective C++: 55 Specific Ways to Improve Your Programs and
Designs by Scott Mayers, 3rd Edition
References:
• C++ How to Program by Deitel and Deitel, 8th Edition.
• Effective Modern C++ by Scott Mayers
Current Catalog This course teaches object-oriented programming to those who have
Description learnt basic programming concepts and are ready to learn in-depth
programming. It focuses on object-oriented programming using C++.
The main concepts discussed are: Objects, Data Abstraction, Data
Encapsulation, Polymorphism, and Inheritance. We teach the C++
language constructs that are used to implement these concepts. For
example, Classes, Overloaded Operators, Overridden Methods,
Virtual Functions, and Templates.
This module will provide the students with a solid theoretical
Course Objectives understanding of, as well as practical skills in, object-oriented
programming. Practical skills will be learnt using the C++
programming language. The primary aim of the module is to enable
the students to tackle complex programming problems, making good
use of the object-oriented programming paradigm to simplify the
design and implementation process. Laboratory sessions and
tutorials will be provided to encourage acquisition of practical
problem-solving skills.
Course Learning After completion of this course, student will be able to:
Outcomes (CLO) 1. Identify importance of object-oriented programming and
difference between structured oriented and object-oriented
programming features.
2. Able to make use of objects and classes for developing
programs.
3. Able to use various object-oriented concepts to solve different
problems.
4. Describe the meaning of the object-oriented paradigm, and
create class hierarchies using the object-oriented design
process
5. Design and implement C++ programs for complex problems,
making good use of the features of the language such as
classes, inheritance and templates
Class Time Spent on Theory Problem Design and Analysis Laboratory Sessions
(in credit hours) 2 1 1
Quizzes (after 6 lectures) CLO Covered Assignments CLO Covered
Quiz 1 1, 2 Assignment 1 1,2
Quiz 2 2 Assignment 2 2, 3
Quiz 3 2, 3 Assignment 3 4
Quiz 4 3, 4 Assignment 4 4, 5
Quiz 5 3, 4
Quiz 6 5
FINAL Project 1, 2, 3, 4, 5
Week Lecture Topics Assessments
1 Revision of previous concepts
1 Introduction
2 Why OOP?
Difference between structured and object-oriented programming.
Class structure
2 3
Why classes are required
Attributes
Methods
Introduction to class diagram (UML diagram)
Introduction to Pillars of OOP:
4 i. Abstraction (complete detail),
ii. Encapsulation (complete detail),
iii. Inheritance (plain introduction),
iv. Polymorphism (plain introduction)
Classes in C++
Working in different files (separate interface and implementation)
Public and private access specifiers Assignment 1
5
Setters and Getters
Array of objects
3 Objects as pointers
Constructors
Default Constructor
6 Constructor Overloading Quiz 1
Default parameters of constructors
Destructors
Setters and getters of pointer attributes
7 Deep Copy vs Shallow Copy
Copy Constructors
4 Constant data members
Constant member functions
8 Quiz 2
Constructor Initializer Lists
this pointer
Static Attributes
9 Static Functions
Singleton Design Pattern (private constructor and destructor)
5
Objects passed to the function and objects as return type
10 Operator = (assignment statement) Assignment 2
Operator overloading +, -, *, /, []
11 Operator Overloading - unary operator (+, - , ++, --)
6 Operator Overloading continued (==, >=, <=, ==)
12
Stream Insertion << , Stream Extraction >>
13 Has-a relationship Quiz 3
7
14 Has-a relationship continued
15 Revision
8
16 Revision
MID TERM
17 Inheritance
9
18 Levels of inheritance (Multiple, Multi-level), Diamond Problem Quiz 4
19 Types of inheritance (public, private, protected)
10
20 Polymorphism Assignment 3
21 Static vs Dynamic Binding, Virtual Functions, Overriding, Quiz 5
11
22 Overloading vs Overriding
23 Factory Design Pattern
12
24 Virtual Destructors Quiz 7
25 Abstract Classes, Concrete classes, Pure Virtual Functions
13
26 Generic Programming, Templates, Function Templates Assignment 4
Examples related to Function Templates, Multiple Type
27
Arguments,
14
28 Class Templates, Examples related to Class Templates
29 Class Templates Quiz 6
15
30 Project Evaluation
31 Revision
16
32 Revision
FINAL EXAM
Laboratory Outline
Lab Number Topic Objective
1 Revision Lab The basic purpose of this laboratory is revision of
some preliminary concepts of C++ that has been
covered in the course of Introduction to
Computing and Programming Fundamentals. Its
objective is to:
• Recall students previously learned basic
concepts.
• Revision of arrays and functions.
• Understanding problem statements and
designing an appropriate solution.
2 Setters, Getters, Constructor, • Separate Interface from implementation
Destructor (working in 3 different files)
• Creating Setters and Getters of each
attribute.
• Creating Constructors to initialize all the
attributes of the class
• Destructor’s usage
3 Constructors and Destructor Making students familiarize with the concepts of
constructor, overloaded constructor, copy
constructor and destructor.
4 Object as parameter and Return Making students familiarize with the concepts of
Type object passed as parameter and return type.
5 Constant functions, parameters Making students familiarize with the concepts of
& attributes constants.
6 Static Members and Attributes Making students familiarize with the concepts of
static; Singleton Design Pattern
7 Operator Overloading Overloading operators =, +, -, *, /, =, = =, >=, []
8 Has a relationship Introduction to the concept of composition and
differentiating between composition and
aggregation
MIDTERM EXAM
9 Inheritance Introduction to protected members and different
types of inheritance
10 Inheritance Working on inheritance with special focus on
order of construction and destruction or base
and child classes
11 Polymorphism Working on polymorphism using different
examples. Working with virtual functions and
virtual destructors
12 Abstract Class Working with abstract classes and pure virtual
functions
13 Factory Design Pattern Uses and Applications of Factory Design Pattern
14 Generic classes Making template functions and template classes.
15 Revision Revision Lab.
16 Revision Revision Lab.
Final Exam