Professional Documents
Culture Documents
OBJECT ORIENTED
PROGRAMMING
INTRODUCTION
Imran Siddiqi
Dept of CS
Bahria University, Islamabad
imran.siddiqi@bahria.edu.pk
2
COURE INFORMATION
Course Instructor
Dr Imran Siddiqi
Office: OC Basement
Contact: imran.siddiqi@bahria.edu.pk
Office hours
Monday to Thursday
(See Time Table)
3
AGENDA
Course Information
Course and Grading Policies
Course Contents
Programming Paradigms
SW Development Activities
4
COURE INFORMATION
Pre-requisite
Fundamentals of Programming
Course Resources
Lectures slides, assignments (computer/written),
solutions to problems, projects, and announcements
will be uploaded on course web page.
5
COURE INFORMATION
Book
Object Oriented
Programming in C++
Robert Lafore
SAMS, 4th Edition
6
COURE INFORMATION
Reference Book
7
COURE INFORMATION
Class Composition
Term Project
Readings
Lectures
8
Quizzes Assignments
COURSE INFORMATION
Assignments
On Time
No submissions after
specified Date &
Time
No Copying
No credit for
plagiarized
content
9
GRADING POLICY*
10%
10%
Quizzes
Assignment
50% 10% Term Project
Mid Semester Exam
Final Exam
20%
Credits : 3 + 1
10
* Tentative
GRADING POLICY - LABS *
10%
Lab Journal/Assessments
Midterm Assessment
40%
Final Assessment/Project
20%
11
12
HOW TO SURVIVE???
13
COURSE OUTLINE
Operator Overloading
Inheritance
Templates
…..
MUST KNOW ABOUT
Basic input/output
Selection Structure
If/Else
Switch
Loops
For, While, Do-While
Arrays
15
16
PROGRAMMING PARADIGMS
Different programming languages follow different
approaches to solving programming problems
A programming paradigm is an approach to
solving programming problems.
A programming paradigm may consist of many
programming languages.
Common programming paradigms:
Structured Programming
Object-Oriented Programming
17
UNSTRUCTURED PROGRAMMING
People start learning programming by writing
small and simple programs consisting only of one
main program.
Here “main program”' stands for a sequence of
commands or statements which modify data
which is global throughout the whole program.
If the same statement sequence is needed at
different locations within the program, the
sequence must be copied
18
STRUCTURED PROGRAMMING
Structured programming is based around data
structures and subroutines/Procedures.
The subroutines are where stuff actually
"happens", and the data structures are simply
“containers” for the information needed by those
subroutines.
Examples: C, FORTRAN, Pascal, COBOL etc
19
OBECT ORIENTED PROGRAMMING
Object oriented programming
shifts your primary focus to the
data itself.
20
OBECT ORIENTED PROGRAMMING
A program in this paradigm
consists of objects having a
set of attributes and which
communicate with each other
by sending messages
21
OBJECT ORIENTED PROGRAMMING – REAL
WORLD MAPPING
Object: Fan
Attributes: Price, Color, Number of blades etc.
Actions: Turn-on, Turn-off, Clean, Mount etc.
Object: Car
Attributes: Price, Make, Model, Color etc.
Actions: Drive, Park, Refuel, Wash etc.
22
00 = Object Orientation and
PIIE = Polymorphism /
Inheritance / Instantiation /
Encapsulation
OO – PIIE
OO - PIIE
Remember the following when talking about OOP
23
SOFTWARE DEVELOPMENT ACTIVITIES
Source Program
Compile
Library routines
Edit Link
Other object files
Think Load
Execute
24
A SAMPLE PROGRAM
#include <iostream>
25
CODE EXECUTION
Source file “Test.cpp”
Compile
Test.cpp Test.obj
Link
Test.obj + Libraries Test.exe
26
IDES
Integrated Development Environments or IDEs
Supports the entire software development cycle
Programming paradigms
Structured & Object Oriented
28