Object Oriented Programming
Instructor Name: ATIF ISHAQ
Lecture-1
Today’s Lecture
Introduction (Course Objective)
What is Object Orientation?
What is an Object?
What is Object Oriented Programming?
What is Object Oriented Program?
Installation of JDK
2
Introduction
Course Objective
Objective of this course is to make students familiar with the concepts of
Object Oriented Programming
Software Developers are discovering that using a object oriented design and
implementation approach can make software development much more
productive than was possible with earlier popular techniques like “Structured
Programming”.
These concepts will be reinforced by their implementation in Java
3
Introduction
Course Contents
The main contents of the course would be:
Object Orientation
Objects & Classes
Overloading & Overriding
Abstraction
Inheritance
Polymorphism
Exception Handling
MultiThreading
4
Introduction
Recommended Books
The Recommended books for this course are
5
Introduction
Marks Distribution (Theory)
Mid Exam 20% (Min 2 Assignments)
Quiz 10% (Min. 3 Quiz)
Assignment & Class participation 10% (0 marks < 75%)
Final Examination 60% (MCQ, Logical,Theory)
Marks Distribution (Lab)
Attendance 5%
Lab Tasks 5%
Viva 10%
Practical Exam 30%
6
(Code + Logic + Compilation + Output)
Object Orientation
What is Object Orientation?
“Object" refers to a particular instance of a class.
whereas the object can be a combination of variables, functions, and data structures.
Object-oriented programming (OOP) is a programming language model
organized around objects rather than "actions" and data rather than “logic”.
Object-oriented or object-orientation is a software engineering concept, in which concepts are
represented as "objects“
It is a technique in which we visualize our programming problems in the form of objects and
their interactions as happened in real life
OO Model consists of several interacting objects.
7
Object Orientation
Object Orientation Examples
Consider the objects around us in our daily life. These objects interacts with each
other to perform different operations.
Lives in
Drives
8
Object Orientation
Object Orientation Examples
9
Object Orientation
10
Object Oriented Model
What is a Model?
A model is abstraction of something.
Purpose is to understand the product before using it.
Example are Highway Map , Architectural Design and Mechanical models.
What is OO Model in Programming?
In the context of programming, Models are used to understand problem before
start developing it.
Object Oriented Models can be developed by showing interaction among
objects to understand a system implementation.
11
Object Oriented Model
Object Oriented Model Example 1
12
Object Oriented Model
Object Oriented Model Example 2
13
Object Orientation
Object Orientation - Advantages
An Object Oriented Model Maps directly to reality as seen in the previous
examples.
An Object Oriented Model for a problem can be developed easily
An Object Oriented Model is easily understandable.
An Object Oriented Model objects are reusable.
Implementation
Can be implemented easily by using any Object Oriented Programming
Language Like, Java in our case
14
Object Orientation
What is an Object?
An Object is
Something tangible (Ali, School, House, Car)
Something conceptual (that can be apprehended intellectually for example
time date and so on..)
OOP uses objects as its Fundamental Building Blocks
Objects are the basic run time entities in an object oriented system
Every object is associated with data and functions which defines meaningful
operations on that object
Object is a real world existing entity
15
Object Orientation
What is an Object?
An Object has
State (Attributes)
Well-defined behaviour (Operations)
Unique Identity
16
Object Orientation
What is an Object?
An Object is an entity that has state, behaviour and identity. There are many
object around us.
For Example, a computer mouse is an object. It is considered as an object with
state and behavior
17
Object Orientation
What is an Object?
18
Object Orientation
Types of Objects
An object may be tangible or Intangible
19
Object Oriented Programming
What is Object Oriented Programming?
Object Oriented Programming (OOP) is an engineering approach for building
software systems based on the concepts of classes and objects that are used for
modeling real world entities
Object Oriented programming is an approach that provides a way of
modularizing programs by creating partitioned memory area of both data and
functions that can be used as template for creating copies of such modules on
demand
Object Oriented programming is a programming methodology that associates data
structure with a set of operators which act upon it.
20
Object Oriented Programming
What is Object Oriented Programming?
Object-oriented programming is a programming methodology characterized by
the following concepts:
1. Abstraction.
2. Encapsulation
3. Information hiding
4. Polymorphism
5. Inheritance
21
Installing JDK
22
Installing JDK(Download)
23
Installing JDK(Downloading)
24
Installing JDK
25
Installing JDK
26
Installing JDK
27
Installing JDK
28
Installing JDK
29
Installing JDK
30
Installing JDK
31
Installing JDK
32
Installing JDK
33
Installing JDK
34
35