SlideShare a Scribd company logo
Part 1
Introduction
Object | Class
Encapsulation
Abstraction
Messaging
Polymorphism Presented by Nuzhat Ibrahim Memon
• In today era of internet, website and web based
operations, rapid application development (RAD) and
reusability of source code is very important.
• Object oriented techniques as methodology or as
paradigm is playing significant role in analysis, design
and implementation of software system.
• Software developed using object-oriented are
proclaimed to be more reliable, easier to maintain,
reuse and enhance.
• Object-oriented programming concepts started
originating in the 1960s.
• Since mid 1980s, it has become the main programming
paradigm used in the creation of new software.
• Some of the popular programming languages that
support object-oriented programming are C++, Java,
C#, VB .net , ASP .net and PHP. s
NUZHAT IBRAHIM MEMON
2
Presented by Nuzhat Ibrahim Memon
3
Boil(water)
Boil(milk)
Add(sugar)
Add(tea-powder)
Stir()
Serve()
the focus is on writing
functions or procedures which operate
on data
liquid-type
powder-type
Boil (liquid-type)
Add(powder-type)
Stir()
Serve()
Function/Methods
Data/variables
Function/Procedure/Methods
The way of programming can be divided into two categories namely
the focus is on object which
contains both data and functionality together.
• The power of object-oriented programming language enables
the programmer to create modular, reusable and extendable
code.
• Object-oriented programming uses as its fundamental
building block. Similar objects are classified using a
concept of class that support object-oriented.
• in procedure oriented programming , for library
application software, we will think of all processes
of library application and focus on the modules
like student registration, book issue, book return,
fine calculation
• For library application in object oriented
programming, our focus is on the object involved
in the application. Here we think of object like
student, book and librarian. We also need to think
of association between such objects. For eg,
student returns book.
Presented by Nuzhat Ibrahim Memon
4
Library Application (POP)
Students registration()
Book issue()
Book return()
Fine calculation()
Library Application (OOP)
Students
book
Librarian
Students registration()
Book issue()
Book return()
Fine calculation()
Abstraction
Encapsulation
Polymorphism
Inheritance
Presented by Nuzhat Ibrahim Memon
5
A computer language is object-oriented if they support
four specific object properties
4 Pillars of OOPs (A PIE)
• In the real world, objects are the entities of which the world is comprised.
• Some objects can be concrete things like person, car or a coffee cup.
While other objects may be abstract that do not represent things which can
be touched or seen; for example, concept like date and time.
Presented by Nuzhat Ibrahim Memon
6
Real world entities
Instance of class
Attributes / Properties / Data Fields
• All objects have unique identity and are distinguishable from each
other. In object-oriented terminology, such characteristics are
known as properties or attributes.
• In object oriented programming, attributes that describe the object
are also referred to as data fields.
• To uniquely identify the object, the value of these attributes are
used. These values are called State.
• State is used to distinguish objects from each other.
Behaviour
• Additionally the behaviour associated with objects. The behaviour is
also known as method.
Members or Features
• The data attributes and behavioral methods associated with an
object are collectively referred to as its members or features.
Presented by Nuzhat Ibrahim Memon
7
Name: Bob
City: Pune
Gender: Male
Birthdate: 1st March
Profession: Doctor
Name: Lily
City: Delhi
Gender: Female
Birthdate: 2nd May
Profession:Teacher
Name: xyz
Color: Blue
Model: xyz 2020
Manfacture: Honda
Name: abc
Color: Pink
Model: abc 2021
Manufacture: BMW
Presented by Nuzhat Ibrahim Memon
8
• Class can be considered as a blueprint for various objects.
• A class is a template for multiple objects with similar
features.
• It describes a group of objects with similar attributes and
common behavior. Similar objects are classified using a
concept of class.
• Objects in the same class share a common semantic
purpose.
• Thus, the class is a general concept used to embody all the
common features of a particular set of objects.
‘Car’
Presented by Nuzhat Ibrahim Memon
9
• For example, we have a class named
‘Person’ describing common attributes
and behaviors of all persons.
• In ’Person’ class , individual persons
are considered as objects and are
identified by the state; that is the value
of their attributes
Objects
Class
Few More Examples:
Class: Human Object: Man, Woman
Class: Animal Object: Cat, Dog, Rabbit
Class: Fruit Object: Apple, Mango, Kiwi
• For any computer program, two core elements are data and
function.
• Structured/ procedural programming views these two core
element as two separate entities;
whereas object-oriented programming views them as single
entity.
• In procedural programming, data can be altered by any
component of the program. It is not protected from modification.
• In Object Oriented Programming, this problem can be solved
using encapsulation.
Presented by Nuzhat Ibrahim Memon
10
Data
Data
Data
Procedure
Programming
Object 2
Object 1
Object 3
Data
Data Data
Object Oriented
Programming
• Data and method that manipulate data are guarded against modification or
misuse by other components of the program.
• This mechanism of providing protection to data and methods of a program is
called encapsulation.
• This is possible by wrapping data and methods into a single unit known as
class and declaring them as private.
• Private members of the class are not available directly to outside world. If
necessary , the data is made available via public methods.
• Thus, encapsulation provides data hiding capabilities.
• Encapsulation keeps the data safe from unintended actions and inadvertent
access by outside objects.
Presented by Nuzhat Ibrahim Memon
11
Class
Data /
Variable
Function /
Methods/
Behavior
• Data abstraction is a process of representing the essential features of the objects
without including implementation detail.
• Abstraction is a concept that hides complexity; it says what it does, but not how it
is done.
• Data abstraction is a technique that relies on the separation of interface and
implementation.
• Data abstraction provides the skeleton or templates for our use.
• The system hides certain details of how data is stored, created and maintained.
• Examples of data abstraction
• Abstract Data Types(ADT) or Structures (struct) in C/C++
• classes in C++/Java
• In ADT, we simply define a data type and set of operation on it. We do not show the
implementation of operations.
Presented by Nuzhat Ibrahim Memon
12
• Encapsulate protects data by making them
inaccessible from outside.
• Abstraction enables to represent data in which the
implementation details are hidden (abstracted).
Presented by Nuzhat Ibrahim Memon
13
• Different classes may have same methods with same name.
• Date class->display() , display the date object in
specific format
• Time class->display(), to display time in specific format
• person class -> display() to display the details of
person
• In object-oriented termixnology, a call to a method is
referred to as a message.
• When method ‘display’ is invoked in the program, how to
know which method is to be executed?
• This is determined using the object that invokes the method.
• Due to encapsulation, all method calls are handled by
objects that recognize the method
• For eg. If ‘display’ is called by an object of ‘person’ class, it
executes the display method defined in ‘person’ class.
Presented by Nuzhat Ibrahim Memon
14
class date class time class person
void display(){
System.out.println
(“Display the date
object in specific
format”);
}
void display(){
System.out.println
(“Display the
time in specific
format”);
}
void display(){
System.out.println
(“Display the
details of
person”);
}
date d_obj = new date();
time t_obj = new time();
person p_obj = new person();
d_obj.display();
t_obj,display();
p_obj.display();
Presented by Nuzhat Ibrahim Memon
15
• Polymorphism means ‘many forms’.
• The polymorphism is achieved using two type of overloading: function overloading and operator
overloading.
• The capability of using same names to mean different things in different contexts is called overloading.
Operator
Overloading
Function
Overloading
Polymorphism
Presented by Nuzhat Ibrahim Memon
16
• Function or method overloading
• It is possible to define more than one function with the same name in
object-oriented programming.
• The methods differs in signatures( number and type of parameters)
• Object- oriented programming allows defining more than one method
having same name but different signatures in a single class. This
feature is known as function or method overloading.
• Operator overloading
• Object oriented programming also allows writing expression using
operators on objects.
• Date d1 – date d2 and n1- n2; operator ‘-’ is performing in a different
way.
• The same operation is given different meanings upon the data type of
operands used. This type of polymorphism is achieved through
operator overloading.
Operator ‘+’
2 + 2 = 4 ‘in’ + ‘dia’ = ‘India’
Operator ‘-’
n1 - n2 date d1 – date d2
Area (l,w)
Area
(pi,r,r)
Shape
Area
( *b*h)
Max (int, int){
return int;
}
Max (array, size){
return int;
}
Nuzhat Memon
website:
nuzhatmemon.com
Email:
nuzhat.memon@gmail.com
Ad

More Related Content

What's hot (20)

Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
Naz Abdalla
 
Datatype in JavaScript
Datatype in JavaScriptDatatype in JavaScript
Datatype in JavaScript
Rajat Saxena
 
Visual Basic Controls ppt
Visual Basic Controls pptVisual Basic Controls ppt
Visual Basic Controls ppt
Ranjuma Shubhangi
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
arvind pandey
 
Strings in Java
Strings in JavaStrings in Java
Strings in Java
Abhilash Nair
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Tushar B Kute
 
Java Exception handling
Java Exception handlingJava Exception handling
Java Exception handling
kamal kotecha
 
OOP java
OOP javaOOP java
OOP java
xball977
 
[OOP - Lec 08] Encapsulation (Information Hiding)
[OOP - Lec 08] Encapsulation (Information Hiding)[OOP - Lec 08] Encapsulation (Information Hiding)
[OOP - Lec 08] Encapsulation (Information Hiding)
Muhammad Hammad Waseem
 
Functions in javascript
Functions in javascriptFunctions in javascript
Functions in javascript
baabtra.com - No. 1 supplier of quality freshers
 
7.data types in c#
7.data types in c#7.data types in c#
7.data types in c#
Zeeshan Ahmad
 
Access specifiers(modifiers) in java
Access specifiers(modifiers) in javaAccess specifiers(modifiers) in java
Access specifiers(modifiers) in java
HrithikShinde
 
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZer
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZerStd 12 Computer Chapter 1 Creating Html Forms Using KompoZer
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZer
Nuzhat Memon
 
Collections and its types in C# (with examples)
Collections and its types in C# (with examples)Collections and its types in C# (with examples)
Collections and its types in C# (with examples)
Aijaz Ali Abro
 
Strings in java
Strings in javaStrings in java
Strings in java
Kuppusamy P
 
Std 12 Computer Chapter 2 Cascading Style Sheets and Javascript(Part 1 CSS)
Std 12 Computer Chapter 2 Cascading Style Sheets  and Javascript(Part 1 CSS)Std 12 Computer Chapter 2 Cascading Style Sheets  and Javascript(Part 1 CSS)
Std 12 Computer Chapter 2 Cascading Style Sheets and Javascript(Part 1 CSS)
Nuzhat Memon
 
Classes objects in java
Classes objects in javaClasses objects in java
Classes objects in java
Madishetty Prathibha
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
Spotle.ai
 
Java conditional statements
Java conditional statementsJava conditional statements
Java conditional statements
Kuppusamy P
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
Amit Tyagi
 
Datatype in JavaScript
Datatype in JavaScriptDatatype in JavaScript
Datatype in JavaScript
Rajat Saxena
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
arvind pandey
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Tushar B Kute
 
Java Exception handling
Java Exception handlingJava Exception handling
Java Exception handling
kamal kotecha
 
[OOP - Lec 08] Encapsulation (Information Hiding)
[OOP - Lec 08] Encapsulation (Information Hiding)[OOP - Lec 08] Encapsulation (Information Hiding)
[OOP - Lec 08] Encapsulation (Information Hiding)
Muhammad Hammad Waseem
 
Access specifiers(modifiers) in java
Access specifiers(modifiers) in javaAccess specifiers(modifiers) in java
Access specifiers(modifiers) in java
HrithikShinde
 
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZer
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZerStd 12 Computer Chapter 1 Creating Html Forms Using KompoZer
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZer
Nuzhat Memon
 
Collections and its types in C# (with examples)
Collections and its types in C# (with examples)Collections and its types in C# (with examples)
Collections and its types in C# (with examples)
Aijaz Ali Abro
 
Std 12 Computer Chapter 2 Cascading Style Sheets and Javascript(Part 1 CSS)
Std 12 Computer Chapter 2 Cascading Style Sheets  and Javascript(Part 1 CSS)Std 12 Computer Chapter 2 Cascading Style Sheets  and Javascript(Part 1 CSS)
Std 12 Computer Chapter 2 Cascading Style Sheets and Javascript(Part 1 CSS)
Nuzhat Memon
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
Spotle.ai
 
Java conditional statements
Java conditional statementsJava conditional statements
Java conditional statements
Kuppusamy P
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
Amit Tyagi
 

Similar to Std 12 computer chapter 6 object oriented concepts (part 1) (20)

UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPUUNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
ApurvaLaddha
 
SE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTSE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPT
nikshaikh786
 
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
sagarjsicg
 
introduction of Object oriented programming
introduction of Object oriented programmingintroduction of Object oriented programming
introduction of Object oriented programming
RiturajJain8
 
Java Fundamentalojhgghjjjjhhgghhjjjjhhj.ppt
Java Fundamentalojhgghjjjjhhgghhjjjjhhj.pptJava Fundamentalojhgghjjjjhhgghhjjjjhhj.ppt
Java Fundamentalojhgghjjjjhhgghhjjjjhhj.ppt
akashsachu221
 
Principles of OOPs.pptx
Principles of OOPs.pptxPrinciples of OOPs.pptx
Principles of OOPs.pptx
LakshyaChauhan21
 
Basics of object oriented programming
Basics of object oriented programmingBasics of object oriented programming
Basics of object oriented programming
Nitin Kumar Kashyap
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
Jasleen Kaur (Chandigarh University)
 
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptx
YashKoli22
 
Principles and advantages of oop ppt
Principles and advantages of oop pptPrinciples and advantages of oop ppt
Principles and advantages of oop ppt
daxesh chauhan
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
baabtra.com - No. 1 supplier of quality freshers
 
6_Object-oriented-using-java.pdf object oriented programming concepts
6_Object-oriented-using-java.pdf object oriented programming concepts6_Object-oriented-using-java.pdf object oriented programming concepts
6_Object-oriented-using-java.pdf object oriented programming concepts
harinipradeep15
 
Introduction to object oriented programming
Introduction to object oriented programmingIntroduction to object oriented programming
Introduction to object oriented programming
Abzetdin Adamov
 
L1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdfL1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdf
BhanuJatinSingh
 
CS3391 -OOP -UNIT – I NOTES FINAL.pdf
CS3391 -OOP -UNIT – I  NOTES FINAL.pdfCS3391 -OOP -UNIT – I  NOTES FINAL.pdf
CS3391 -OOP -UNIT – I NOTES FINAL.pdf
AALIM MUHAMMED SALEGH COLLEGE OF ENGINEERING
 
Object oriented programming 6 oop with c++
Object oriented programming 6  oop with c++Object oriented programming 6  oop with c++
Object oriented programming 6 oop with c++
Vaibhav Khanna
 
Oop ppt
Oop pptOop ppt
Oop ppt
Shani Manjara
 
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrd
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrdgxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrd
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrd
wrushabhsirsat
 
Birasa 1
Birasa 1Birasa 1
Birasa 1
Niyitegekabilly
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
Niyitegekabilly
 
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPUUNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
ApurvaLaddha
 
SE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTSE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPT
nikshaikh786
 
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
sagarjsicg
 
introduction of Object oriented programming
introduction of Object oriented programmingintroduction of Object oriented programming
introduction of Object oriented programming
RiturajJain8
 
Java Fundamentalojhgghjjjjhhgghhjjjjhhj.ppt
Java Fundamentalojhgghjjjjhhgghhjjjjhhj.pptJava Fundamentalojhgghjjjjhhgghhjjjjhhj.ppt
Java Fundamentalojhgghjjjjhhgghhjjjjhhj.ppt
akashsachu221
 
Basics of object oriented programming
Basics of object oriented programmingBasics of object oriented programming
Basics of object oriented programming
Nitin Kumar Kashyap
 
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptx
YashKoli22
 
Principles and advantages of oop ppt
Principles and advantages of oop pptPrinciples and advantages of oop ppt
Principles and advantages of oop ppt
daxesh chauhan
 
6_Object-oriented-using-java.pdf object oriented programming concepts
6_Object-oriented-using-java.pdf object oriented programming concepts6_Object-oriented-using-java.pdf object oriented programming concepts
6_Object-oriented-using-java.pdf object oriented programming concepts
harinipradeep15
 
Introduction to object oriented programming
Introduction to object oriented programmingIntroduction to object oriented programming
Introduction to object oriented programming
Abzetdin Adamov
 
L1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdfL1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdf
BhanuJatinSingh
 
Object oriented programming 6 oop with c++
Object oriented programming 6  oop with c++Object oriented programming 6  oop with c++
Object oriented programming 6 oop with c++
Vaibhav Khanna
 
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrd
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrdgxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrd
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrd
wrushabhsirsat
 
Ad

More from Nuzhat Memon (20)

Std 10 chapter 11 data type, expression and operators important MCQs
Std 10 chapter 11 data type, expression and operators important MCQsStd 10 chapter 11 data type, expression and operators important MCQs
Std 10 chapter 11 data type, expression and operators important MCQs
Nuzhat Memon
 
Std 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQsStd 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQs
Nuzhat Memon
 
Std 12 chapter 7 Java Basics Important MCQs
Std 12 chapter 7 Java Basics Important MCQsStd 12 chapter 7 Java Basics Important MCQs
Std 12 chapter 7 Java Basics Important MCQs
Nuzhat Memon
 
Std 12 computer chapter 8 classes and objects in java important MCQs
Std 12 computer chapter 8 classes and objects in java important MCQsStd 12 computer chapter 8 classes and objects in java important MCQs
Std 12 computer chapter 8 classes and objects in java important MCQs
Nuzhat Memon
 
Std 12 Computer Chapter 6 object oriented concept important mcqs
Std 12 Computer Chapter 6 object oriented concept important mcqsStd 12 Computer Chapter 6 object oriented concept important mcqs
Std 12 Computer Chapter 6 object oriented concept important mcqs
Nuzhat Memon
 
Std 12 computer java basics part 3 control structure
Std 12 computer java basics part 3 control structureStd 12 computer java basics part 3 control structure
Std 12 computer java basics part 3 control structure
Nuzhat Memon
 
Std 12 Computer Chapter 7 Java Basics (Part 2)
Std 12 Computer Chapter 7 Java Basics (Part 2)Std 12 Computer Chapter 7 Java Basics (Part 2)
Std 12 Computer Chapter 7 Java Basics (Part 2)
Nuzhat Memon
 
Std 12 Computer Chapter 13 other useful free tools and services important MCQs
Std 12 Computer Chapter 13 other useful free tools and services important MCQsStd 12 Computer Chapter 13 other useful free tools and services important MCQs
Std 12 Computer Chapter 13 other useful free tools and services important MCQs
Nuzhat Memon
 
Std 12 Computer Chapter 9 Working with Array and String in Java important MCQs
Std 12 Computer Chapter 9 Working with Array and String in Java important MCQsStd 12 Computer Chapter 9 Working with Array and String in Java important MCQs
Std 12 Computer Chapter 9 Working with Array and String in Java important MCQs
Nuzhat Memon
 
Std 10 computer chapter 10 introduction to c language (part2)
Std 10 computer chapter 10 introduction to c language (part2)Std 10 computer chapter 10 introduction to c language (part2)
Std 10 computer chapter 10 introduction to c language (part2)
Nuzhat Memon
 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)
Nuzhat Memon
 
Std 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem SolvingStd 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem Solving
Nuzhat Memon
 
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...
Nuzhat Memon
 
Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)
Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)
Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)
Nuzhat Memon
 
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1 Basics Opera...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1  Basics Opera...Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1  Basics Opera...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1 Basics Opera...
Nuzhat Memon
 
Std 11 Computer Chapter 4 Introduction to Layers (Part 3 Solving Textual Exe...
Std 11 Computer Chapter 4 Introduction to Layers  (Part 3 Solving Textual Exe...Std 11 Computer Chapter 4 Introduction to Layers  (Part 3 Solving Textual Exe...
Std 11 Computer Chapter 4 Introduction to Layers (Part 3 Solving Textual Exe...
Nuzhat Memon
 
Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...
Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...
Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...
Nuzhat Memon
 
Std 11 Computer Chapter 4 Introduction to Layers
Std 11 Computer Chapter 4 Introduction to LayersStd 11 Computer Chapter 4 Introduction to Layers
Std 11 Computer Chapter 4 Introduction to Layers
Nuzhat Memon
 
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 3) [practica...
Std 11 Computer Chapter 3  Creating Animation using Synfig (Part 3) [practica...Std 11 Computer Chapter 3  Creating Animation using Synfig (Part 3) [practica...
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 3) [practica...
Nuzhat Memon
 
Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)
Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)
Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)
Nuzhat Memon
 
Std 10 chapter 11 data type, expression and operators important MCQs
Std 10 chapter 11 data type, expression and operators important MCQsStd 10 chapter 11 data type, expression and operators important MCQs
Std 10 chapter 11 data type, expression and operators important MCQs
Nuzhat Memon
 
Std 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQsStd 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQs
Nuzhat Memon
 
Std 12 chapter 7 Java Basics Important MCQs
Std 12 chapter 7 Java Basics Important MCQsStd 12 chapter 7 Java Basics Important MCQs
Std 12 chapter 7 Java Basics Important MCQs
Nuzhat Memon
 
Std 12 computer chapter 8 classes and objects in java important MCQs
Std 12 computer chapter 8 classes and objects in java important MCQsStd 12 computer chapter 8 classes and objects in java important MCQs
Std 12 computer chapter 8 classes and objects in java important MCQs
Nuzhat Memon
 
Std 12 Computer Chapter 6 object oriented concept important mcqs
Std 12 Computer Chapter 6 object oriented concept important mcqsStd 12 Computer Chapter 6 object oriented concept important mcqs
Std 12 Computer Chapter 6 object oriented concept important mcqs
Nuzhat Memon
 
Std 12 computer java basics part 3 control structure
Std 12 computer java basics part 3 control structureStd 12 computer java basics part 3 control structure
Std 12 computer java basics part 3 control structure
Nuzhat Memon
 
Std 12 Computer Chapter 7 Java Basics (Part 2)
Std 12 Computer Chapter 7 Java Basics (Part 2)Std 12 Computer Chapter 7 Java Basics (Part 2)
Std 12 Computer Chapter 7 Java Basics (Part 2)
Nuzhat Memon
 
Std 12 Computer Chapter 13 other useful free tools and services important MCQs
Std 12 Computer Chapter 13 other useful free tools and services important MCQsStd 12 Computer Chapter 13 other useful free tools and services important MCQs
Std 12 Computer Chapter 13 other useful free tools and services important MCQs
Nuzhat Memon
 
Std 12 Computer Chapter 9 Working with Array and String in Java important MCQs
Std 12 Computer Chapter 9 Working with Array and String in Java important MCQsStd 12 Computer Chapter 9 Working with Array and String in Java important MCQs
Std 12 Computer Chapter 9 Working with Array and String in Java important MCQs
Nuzhat Memon
 
Std 10 computer chapter 10 introduction to c language (part2)
Std 10 computer chapter 10 introduction to c language (part2)Std 10 computer chapter 10 introduction to c language (part2)
Std 10 computer chapter 10 introduction to c language (part2)
Nuzhat Memon
 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)
Nuzhat Memon
 
Std 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem SolvingStd 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem Solving
Nuzhat Memon
 
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...
Nuzhat Memon
 
Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)
Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)
Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)
Nuzhat Memon
 
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1 Basics Opera...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1  Basics Opera...Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1  Basics Opera...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1 Basics Opera...
Nuzhat Memon
 
Std 11 Computer Chapter 4 Introduction to Layers (Part 3 Solving Textual Exe...
Std 11 Computer Chapter 4 Introduction to Layers  (Part 3 Solving Textual Exe...Std 11 Computer Chapter 4 Introduction to Layers  (Part 3 Solving Textual Exe...
Std 11 Computer Chapter 4 Introduction to Layers (Part 3 Solving Textual Exe...
Nuzhat Memon
 
Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...
Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...
Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...
Nuzhat Memon
 
Std 11 Computer Chapter 4 Introduction to Layers
Std 11 Computer Chapter 4 Introduction to LayersStd 11 Computer Chapter 4 Introduction to Layers
Std 11 Computer Chapter 4 Introduction to Layers
Nuzhat Memon
 
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 3) [practica...
Std 11 Computer Chapter 3  Creating Animation using Synfig (Part 3) [practica...Std 11 Computer Chapter 3  Creating Animation using Synfig (Part 3) [practica...
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 3) [practica...
Nuzhat Memon
 
Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)
Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)
Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)
Nuzhat Memon
 
Ad

Recently uploaded (20)

How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Herbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptxHerbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptx
RAJU THENGE
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFAExercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
National Information Standards Organization (NISO)
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
APM Midlands Region April 2025 Sacha Hind Circulated.pdf
APM Midlands Region April 2025 Sacha Hind Circulated.pdfAPM Midlands Region April 2025 Sacha Hind Circulated.pdf
APM Midlands Region April 2025 Sacha Hind Circulated.pdf
Association for Project Management
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx   quiz by Ridip HazarikaTHE STG QUIZ GROUP D.pptx   quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
Ridip Hazarika
 
Introduction-to-Communication-and-Media-Studies-1736283331.pdf
Introduction-to-Communication-and-Media-Studies-1736283331.pdfIntroduction-to-Communication-and-Media-Studies-1736283331.pdf
Introduction-to-Communication-and-Media-Studies-1736283331.pdf
james5028
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Real GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for SuccessReal GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for Success
Mark Soia
 
Grade 3 - English - Printable Worksheet (PDF Format)
Grade 3 - English - Printable Worksheet  (PDF Format)Grade 3 - English - Printable Worksheet  (PDF Format)
Grade 3 - English - Printable Worksheet (PDF Format)
Sritoma Majumder
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Herbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptxHerbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptx
RAJU THENGE
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFAExercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx   quiz by Ridip HazarikaTHE STG QUIZ GROUP D.pptx   quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
Ridip Hazarika
 
Introduction-to-Communication-and-Media-Studies-1736283331.pdf
Introduction-to-Communication-and-Media-Studies-1736283331.pdfIntroduction-to-Communication-and-Media-Studies-1736283331.pdf
Introduction-to-Communication-and-Media-Studies-1736283331.pdf
james5028
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Real GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for SuccessReal GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for Success
Mark Soia
 
Grade 3 - English - Printable Worksheet (PDF Format)
Grade 3 - English - Printable Worksheet  (PDF Format)Grade 3 - English - Printable Worksheet  (PDF Format)
Grade 3 - English - Printable Worksheet (PDF Format)
Sritoma Majumder
 

Std 12 computer chapter 6 object oriented concepts (part 1)

  • 1. Part 1 Introduction Object | Class Encapsulation Abstraction Messaging Polymorphism Presented by Nuzhat Ibrahim Memon
  • 2. • In today era of internet, website and web based operations, rapid application development (RAD) and reusability of source code is very important. • Object oriented techniques as methodology or as paradigm is playing significant role in analysis, design and implementation of software system. • Software developed using object-oriented are proclaimed to be more reliable, easier to maintain, reuse and enhance. • Object-oriented programming concepts started originating in the 1960s. • Since mid 1980s, it has become the main programming paradigm used in the creation of new software. • Some of the popular programming languages that support object-oriented programming are C++, Java, C#, VB .net , ASP .net and PHP. s NUZHAT IBRAHIM MEMON 2
  • 3. Presented by Nuzhat Ibrahim Memon 3 Boil(water) Boil(milk) Add(sugar) Add(tea-powder) Stir() Serve() the focus is on writing functions or procedures which operate on data liquid-type powder-type Boil (liquid-type) Add(powder-type) Stir() Serve() Function/Methods Data/variables Function/Procedure/Methods The way of programming can be divided into two categories namely the focus is on object which contains both data and functionality together. • The power of object-oriented programming language enables the programmer to create modular, reusable and extendable code. • Object-oriented programming uses as its fundamental building block. Similar objects are classified using a concept of class that support object-oriented.
  • 4. • in procedure oriented programming , for library application software, we will think of all processes of library application and focus on the modules like student registration, book issue, book return, fine calculation • For library application in object oriented programming, our focus is on the object involved in the application. Here we think of object like student, book and librarian. We also need to think of association between such objects. For eg, student returns book. Presented by Nuzhat Ibrahim Memon 4 Library Application (POP) Students registration() Book issue() Book return() Fine calculation() Library Application (OOP) Students book Librarian Students registration() Book issue() Book return() Fine calculation()
  • 5. Abstraction Encapsulation Polymorphism Inheritance Presented by Nuzhat Ibrahim Memon 5 A computer language is object-oriented if they support four specific object properties 4 Pillars of OOPs (A PIE)
  • 6. • In the real world, objects are the entities of which the world is comprised. • Some objects can be concrete things like person, car or a coffee cup. While other objects may be abstract that do not represent things which can be touched or seen; for example, concept like date and time. Presented by Nuzhat Ibrahim Memon 6 Real world entities Instance of class
  • 7. Attributes / Properties / Data Fields • All objects have unique identity and are distinguishable from each other. In object-oriented terminology, such characteristics are known as properties or attributes. • In object oriented programming, attributes that describe the object are also referred to as data fields. • To uniquely identify the object, the value of these attributes are used. These values are called State. • State is used to distinguish objects from each other. Behaviour • Additionally the behaviour associated with objects. The behaviour is also known as method. Members or Features • The data attributes and behavioral methods associated with an object are collectively referred to as its members or features. Presented by Nuzhat Ibrahim Memon 7 Name: Bob City: Pune Gender: Male Birthdate: 1st March Profession: Doctor Name: Lily City: Delhi Gender: Female Birthdate: 2nd May Profession:Teacher Name: xyz Color: Blue Model: xyz 2020 Manfacture: Honda Name: abc Color: Pink Model: abc 2021 Manufacture: BMW
  • 8. Presented by Nuzhat Ibrahim Memon 8 • Class can be considered as a blueprint for various objects. • A class is a template for multiple objects with similar features. • It describes a group of objects with similar attributes and common behavior. Similar objects are classified using a concept of class. • Objects in the same class share a common semantic purpose. • Thus, the class is a general concept used to embody all the common features of a particular set of objects. ‘Car’
  • 9. Presented by Nuzhat Ibrahim Memon 9 • For example, we have a class named ‘Person’ describing common attributes and behaviors of all persons. • In ’Person’ class , individual persons are considered as objects and are identified by the state; that is the value of their attributes Objects Class Few More Examples: Class: Human Object: Man, Woman Class: Animal Object: Cat, Dog, Rabbit Class: Fruit Object: Apple, Mango, Kiwi
  • 10. • For any computer program, two core elements are data and function. • Structured/ procedural programming views these two core element as two separate entities; whereas object-oriented programming views them as single entity. • In procedural programming, data can be altered by any component of the program. It is not protected from modification. • In Object Oriented Programming, this problem can be solved using encapsulation. Presented by Nuzhat Ibrahim Memon 10 Data Data Data Procedure Programming Object 2 Object 1 Object 3 Data Data Data Object Oriented Programming
  • 11. • Data and method that manipulate data are guarded against modification or misuse by other components of the program. • This mechanism of providing protection to data and methods of a program is called encapsulation. • This is possible by wrapping data and methods into a single unit known as class and declaring them as private. • Private members of the class are not available directly to outside world. If necessary , the data is made available via public methods. • Thus, encapsulation provides data hiding capabilities. • Encapsulation keeps the data safe from unintended actions and inadvertent access by outside objects. Presented by Nuzhat Ibrahim Memon 11 Class Data / Variable Function / Methods/ Behavior
  • 12. • Data abstraction is a process of representing the essential features of the objects without including implementation detail. • Abstraction is a concept that hides complexity; it says what it does, but not how it is done. • Data abstraction is a technique that relies on the separation of interface and implementation. • Data abstraction provides the skeleton or templates for our use. • The system hides certain details of how data is stored, created and maintained. • Examples of data abstraction • Abstract Data Types(ADT) or Structures (struct) in C/C++ • classes in C++/Java • In ADT, we simply define a data type and set of operation on it. We do not show the implementation of operations. Presented by Nuzhat Ibrahim Memon 12
  • 13. • Encapsulate protects data by making them inaccessible from outside. • Abstraction enables to represent data in which the implementation details are hidden (abstracted). Presented by Nuzhat Ibrahim Memon 13
  • 14. • Different classes may have same methods with same name. • Date class->display() , display the date object in specific format • Time class->display(), to display time in specific format • person class -> display() to display the details of person • In object-oriented termixnology, a call to a method is referred to as a message. • When method ‘display’ is invoked in the program, how to know which method is to be executed? • This is determined using the object that invokes the method. • Due to encapsulation, all method calls are handled by objects that recognize the method • For eg. If ‘display’ is called by an object of ‘person’ class, it executes the display method defined in ‘person’ class. Presented by Nuzhat Ibrahim Memon 14 class date class time class person void display(){ System.out.println (“Display the date object in specific format”); } void display(){ System.out.println (“Display the time in specific format”); } void display(){ System.out.println (“Display the details of person”); } date d_obj = new date(); time t_obj = new time(); person p_obj = new person(); d_obj.display(); t_obj,display(); p_obj.display();
  • 15. Presented by Nuzhat Ibrahim Memon 15 • Polymorphism means ‘many forms’. • The polymorphism is achieved using two type of overloading: function overloading and operator overloading. • The capability of using same names to mean different things in different contexts is called overloading. Operator Overloading Function Overloading Polymorphism
  • 16. Presented by Nuzhat Ibrahim Memon 16 • Function or method overloading • It is possible to define more than one function with the same name in object-oriented programming. • The methods differs in signatures( number and type of parameters) • Object- oriented programming allows defining more than one method having same name but different signatures in a single class. This feature is known as function or method overloading. • Operator overloading • Object oriented programming also allows writing expression using operators on objects. • Date d1 – date d2 and n1- n2; operator ‘-’ is performing in a different way. • The same operation is given different meanings upon the data type of operands used. This type of polymorphism is achieved through operator overloading. Operator ‘+’ 2 + 2 = 4 ‘in’ + ‘dia’ = ‘India’ Operator ‘-’ n1 - n2 date d1 – date d2 Area (l,w) Area (pi,r,r) Shape Area ( *b*h) Max (int, int){ return int; } Max (array, size){ return int; }