SlideShare a Scribd company logo
1 of 21
By-
Manish kumar
mks244901@gmail.com
TCA1650016
i -Nurture,TMU
Mentor-
Mr. Devashish Kumar
Faculty-IT
i-Nurture,TMU
About
 Basics of OOPs started in the early 1960s at MIT.
 First Programming language to use objects was Simula-67.
 Developed by Kristen Nygaard and Ole-Johan Dahl in Norway.
 The term "object oriented programming " was first used by Xerox
PARC in their Smalltalk programming language
 Niklaus Wirth and his team were looking Modular programming
and data abstraction.
 They developed two systems with Modular programming and data
abstraction.
* Oberon *Modula 2
Features of OOPs
 1. Objects
 2. Classes
 3. Abstraction
 4. Encapsulation
 5. Inheritance
 6. Overloading
 7. Exception Handling
 8.Polymorphism
OOPs
Objects
Classes
Abstraction
Encapsulation
Inheritance
Overloading
Exception
Handling
Polymorphism
Objects
 Objects are the things you think about first in designing a
program .
 They are also the units of code that are eventually derived from the
process.
 Each object is an instance of a particular class or subclass with the
class's own methods or procedures and data variables.
Syntax: ClassName ObjectName;
 When a class is defined, no memory is allocated but when it is
instantiated (i.e. an object is created) memory is allocated.
Example of Object
When we take a mobile as an object, its basic functionality for which it
was invented were Calling & Receiving a call & Messaging. But now a
days thousands of new features & models were added & the count is still
increasing.
Classes
 The building block of C++ that leads to Object Oriented
programming is a Class.
 It is a user defined data type, which holds its own data members
and member functions,
 It can be accessed and used by creating an instance of that class.
 A class is like a blueprint for an object.
 It serves as a template for creating, or instantiating, specific
objects within a program.
 Several programming languages support classes,
including Java, C++, Objective C, and PHP 5 and later
Example of Classes
A Class is a plan which describes the object. We call it as a blue print of
how the object should be represented. Mainly a class would consist of a
name, attributes & operations. Considering the above example, A Mobile
can be a class which has some attributes like Profile Type, IMEI Number,
Processor, and some more.) & operations like Dial, Receive & Send
Message.
Abstraction
 The process of removing physical spatial or temporal details
 Attributes in the study of object or system in order to more
closely attend to other details of interest
 it is also very similar in nature to the process
of generalization.
 the abstract concept-objects which are created by keeping
common features .
 attributes to various concrete objects or systems of study.
 Abstraction, in general, is a fundamental concept to
computer science and software development.
Abstraction of example
• Dialing a number call some method internally which concatenate the numbers and
displays it on screen but what is it doing we don’t know.
• Clicking on green button actual send signals to calling person’s mobile but we are unaware
of how it is doing.
• This is called abstraction where creating method which is taking some parameter &
returning some result after some logic execution without understating what is written
within the method
Encapsulation
 In object oriented programming
languages, encapsulation is used to refer to one of two
related but distinct notions, and sometimes to the
combination.
 A language mechanism for restricting direct access to
some of the object's components.
 A language construct that facilitates the bundling of data
with the methods or other functions operating on that
data.
Encapsulation of example
Let’s say Samsung mobile have the 5MP camera available i.e. – it is having a
functionality of Camera Click(). Now same mobile is having Panorama mode
available in camera, so functionality would be same but with mode. This type is
said to be Static polymorphism or Compile time polymorphism. Compile time
polymorphism the compiler knows which overloaded method it is going to call.
.
Another point where in Send Message was intended to send message to single
person at a time but suppose Nokia had given provision for sending message to
a group at once. i.e. - Overriding the functionality to send message to a group.
This type is called Dynamic polymorphism or Runtime polymorphism.
Inheritance
 In object-oriented programming, inheritance is the
mechanism of basing an object .
 class upon another object prototypal inheritance.
 In most class-based object-oriented languages, an object
created through inheritance (a "child object") acquires all
the properties and behaviors of the parent object.
 The relationships of objects or classes through inheritance
give rise to a directed graph.
Inheritance of example
• Above fig. shows what is inheritance. Basic Mobile functionality is to
Send Message, dial & receive call. So the brands of mobile is using this
basic functionality by extending the mobile class functionality and adding
their own new features to their respective brand.
Overloading
• Function overloading or method overloading is the ability to
create multiple methods of the same name with different
implementations.
• To call the latter an object must be passed as a parameter whereas
the former does not require a parameter and is called with an
empty parameter field.
 Calls to an overloaded function will run a specific
implementation of that function appropriate to the context of the
call.
Overloading of example
In this example they (that family) hire some
painter who knows only painting. If this family
provides different types of statues to this painter
then he has to do the work. In this way we can
achieve overloading.
In this example first brush is used to give a
color and after finishing color of whole statue,
this brush gets cleaned by using water & used
for removing shadu from small surface area
like between finger, below eye, between legs,
corner of legs / hands, etc.
In this case brush is used as an operator.
Exception Handling
 Exception handling is the process of responding to the
occurrence, during computation, of exceptions – anomalous or
exceptional conditions requiring special processing – often
changing the normal flow of program execution
 exceptions are a powerful mechanism for centralized processing
of errors and exceptional situations.
 This mechanism replaces the procedure-oriented method of
error handling in which each function returns a code indicating
an error or a successful execution.
Example of Exception Handling
 You provide a web form for users to fill in and submit but incase there
are a lot of conditions to be handled and the conditions keeps changing
periodically, you use exception handling to simplify the process
 Database connectivity uses exception handling(why???) this is because
the reason for database connectivity failure cannot be predicted and
handled as it can be caused by many variables such as power failure,
unreachable server,failure at client front/back end and so on.
 Internet communication
 Arithmetic exceptions such as division by zero and so on.
 Operating systems use exception handling to resolve deadlocks,recover
from crash and so forth
Polymorphism
 Polymorphism is the way in which we can define a multiple
function in a single name. i.e single name & multiple meaning.
 Polymorphism means assigning a single name but there can be
multiple behaviors. Means name of the function is same but its
definitions are different.
 Polymorphism means single name & multiple meaning &
whenever we try to access that particular name there must be a
binding between that call & between that function, so there are
two types of binding to call that function.
Example of polymorphism
 Suppose if you are in class room that time you behave like a student,
when you are in market at that time you behave like a customer, when
you at your home at that time you behave like a son or daughter, Here
one person present in different-different behaviors.
 We behave differently in front of elders, and friends. A single person is
behaving differently at different time.
 A software engineer can perform different task at different instance of
time depending on the task assigned to him .He can done coding ,
testing , analysis and designing depending on the task assign and the
requirement.
.
References
 http://www.exforsys.com/tutorials/oops-concepts/the-
history-of-object-oriented-programming.html
 https://techterms.com/definition/class
 https://www.quora.com/Any-real-life-example-of-exception-
handling
 https://www.c-sharpcorner.com/UploadFile/cda5ba/object-
oriented-programming-with-real-world-scenario/
 https://www.sololearn.com/Discuss/252198/some-real-life-
examples-of-object-oriented-programming-oop-concept
 https://www.quora.com/What-are-the-best-real-life-
example-for-explaining-different-OOP-concepts-in-any-
programming-language

More Related Content

What's hot

Event Driven programming(ch1 and ch2).pdf
Event Driven programming(ch1 and ch2).pdfEvent Driven programming(ch1 and ch2).pdf
Event Driven programming(ch1 and ch2).pdfAliEndris3
 
Locking base concurrency control
  Locking base concurrency control  Locking base concurrency control
Locking base concurrency controlPrakash Poudel
 
Polymorphism in C# Function overloading in C#
Polymorphism in C# Function overloading in C#Polymorphism in C# Function overloading in C#
Polymorphism in C# Function overloading in C#Abid Kohistani
 
Malloc() and calloc() in c
Malloc() and calloc() in cMalloc() and calloc() in c
Malloc() and calloc() in cMahesh Tibrewal
 
Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...
Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...
Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...cprogrammings
 
Javascript dom event
Javascript dom eventJavascript dom event
Javascript dom eventBunlong Van
 
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...Saikrishna Tanguturu
 
Multi threading
Multi threadingMulti threading
Multi threadinggndu
 
Custom content provider in android
Custom content provider in androidCustom content provider in android
Custom content provider in androidAly Arman
 
Polymorphism in java, method overloading and method overriding
Polymorphism in java,  method overloading and method overridingPolymorphism in java,  method overloading and method overriding
Polymorphism in java, method overloading and method overridingJavaTportal
 
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...Simplilearn
 

What's hot (20)

AI Lab Manual.docx
AI Lab Manual.docxAI Lab Manual.docx
AI Lab Manual.docx
 
Event Driven programming(ch1 and ch2).pdf
Event Driven programming(ch1 and ch2).pdfEvent Driven programming(ch1 and ch2).pdf
Event Driven programming(ch1 and ch2).pdf
 
Locking base concurrency control
  Locking base concurrency control  Locking base concurrency control
Locking base concurrency control
 
Polymorphism in C# Function overloading in C#
Polymorphism in C# Function overloading in C#Polymorphism in C# Function overloading in C#
Polymorphism in C# Function overloading in C#
 
Malloc() and calloc() in c
Malloc() and calloc() in cMalloc() and calloc() in c
Malloc() and calloc() in c
 
Operator overloading
Operator overloadingOperator overloading
Operator overloading
 
Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...
Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...
Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...
 
Javascript dom event
Javascript dom eventJavascript dom event
Javascript dom event
 
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
 
Distributed DBMS - Unit 5 - Semantic Data Control
Distributed DBMS - Unit 5 - Semantic Data ControlDistributed DBMS - Unit 5 - Semantic Data Control
Distributed DBMS - Unit 5 - Semantic Data Control
 
File handling-c
File handling-cFile handling-c
File handling-c
 
Polymorphism in oop
Polymorphism in oopPolymorphism in oop
Polymorphism in oop
 
Multi threading
Multi threadingMulti threading
Multi threading
 
Memento pattern
Memento patternMemento pattern
Memento pattern
 
Custom content provider in android
Custom content provider in androidCustom content provider in android
Custom content provider in android
 
Concurrency Control.
Concurrency Control.Concurrency Control.
Concurrency Control.
 
inheritance
inheritanceinheritance
inheritance
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
 
Polymorphism in java, method overloading and method overriding
Polymorphism in java,  method overloading and method overridingPolymorphism in java,  method overloading and method overriding
Polymorphism in java, method overloading and method overriding
 
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
 

Similar to Basics of object oriented programming

Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaMadishetty Prathibha
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP conceptsAhmed Farag
 
Ooad notes
Ooad notesOoad notes
Ooad notesNancyJP
 
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrd
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrdgxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrd
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrdwrushabhsirsat
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Languagedheva B
 
Object Oriented Programming (OOP) Introduction
Object Oriented Programming (OOP) IntroductionObject Oriented Programming (OOP) Introduction
Object Oriented Programming (OOP) IntroductionSamuelAnsong6
 
Oops And C++ Fundamentals
Oops And C++ FundamentalsOops And C++ Fundamentals
Oops And C++ FundamentalsSubhasis Nayak
 
Mca2030 object oriented programming – c++
Mca2030  object oriented programming – c++Mca2030  object oriented programming – c++
Mca2030 object oriented programming – c++smumbahelp
 
Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Nuzhat Memon
 
Object Oriented Approach Within Siebel Boundaries
Object Oriented Approach Within Siebel BoundariesObject Oriented Approach Within Siebel Boundaries
Object Oriented Approach Within Siebel BoundariesRoman Agaev
 
Mca2030 object oriented programming – c++
Mca2030  object oriented programming – c++Mca2030  object oriented programming – c++
Mca2030 object oriented programming – c++smumbahelp
 
Programming Laboratory Unit 1.pdf
Programming Laboratory Unit 1.pdfProgramming Laboratory Unit 1.pdf
Programming Laboratory Unit 1.pdfswapnilslide2019
 
Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)MD Sulaiman
 

Similar to Basics of object oriented programming (20)

Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 
Cs2305 programming paradigms lecturer notes
Cs2305   programming paradigms lecturer notesCs2305   programming paradigms lecturer notes
Cs2305 programming paradigms lecturer notes
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP concepts
 
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptxOBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
 
Ooad notes
Ooad notesOoad notes
Ooad notes
 
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrd
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrdgxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrd
gxhrehsrejhvytftfltyflytdtydtydky5dyrdtrdrdtrd
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Language
 
Object Oriented Programming (OOP) Introduction
Object Oriented Programming (OOP) IntroductionObject Oriented Programming (OOP) Introduction
Object Oriented Programming (OOP) Introduction
 
INTRODUCTION TO JAVA
INTRODUCTION TO JAVAINTRODUCTION TO JAVA
INTRODUCTION TO JAVA
 
Oops And C++ Fundamentals
Oops And C++ FundamentalsOops And C++ Fundamentals
Oops And C++ Fundamentals
 
MCA NOTES.pdf
MCA NOTES.pdfMCA NOTES.pdf
MCA NOTES.pdf
 
C++ first s lide
C++ first s lideC++ first s lide
C++ first s lide
 
Mca2030 object oriented programming – c++
Mca2030  object oriented programming – c++Mca2030  object oriented programming – c++
Mca2030 object oriented programming – c++
 
Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)
 
Object Oriented Approach Within Siebel Boundaries
Object Oriented Approach Within Siebel BoundariesObject Oriented Approach Within Siebel Boundaries
Object Oriented Approach Within Siebel Boundaries
 
Mca2030 object oriented programming – c++
Mca2030  object oriented programming – c++Mca2030  object oriented programming – c++
Mca2030 object oriented programming – c++
 
Programming Laboratory Unit 1.pdf
Programming Laboratory Unit 1.pdfProgramming Laboratory Unit 1.pdf
Programming Laboratory Unit 1.pdf
 
80410172053.pdf
80410172053.pdf80410172053.pdf
80410172053.pdf
 
Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)
 
OOP
OOPOOP
OOP
 

Recently uploaded

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 

Recently uploaded (20)

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 

Basics of object oriented programming

  • 2. About  Basics of OOPs started in the early 1960s at MIT.  First Programming language to use objects was Simula-67.  Developed by Kristen Nygaard and Ole-Johan Dahl in Norway.  The term "object oriented programming " was first used by Xerox PARC in their Smalltalk programming language  Niklaus Wirth and his team were looking Modular programming and data abstraction.  They developed two systems with Modular programming and data abstraction. * Oberon *Modula 2
  • 3. Features of OOPs  1. Objects  2. Classes  3. Abstraction  4. Encapsulation  5. Inheritance  6. Overloading  7. Exception Handling  8.Polymorphism
  • 5. Objects  Objects are the things you think about first in designing a program .  They are also the units of code that are eventually derived from the process.  Each object is an instance of a particular class or subclass with the class's own methods or procedures and data variables. Syntax: ClassName ObjectName;  When a class is defined, no memory is allocated but when it is instantiated (i.e. an object is created) memory is allocated.
  • 6. Example of Object When we take a mobile as an object, its basic functionality for which it was invented were Calling & Receiving a call & Messaging. But now a days thousands of new features & models were added & the count is still increasing.
  • 7. Classes  The building block of C++ that leads to Object Oriented programming is a Class.  It is a user defined data type, which holds its own data members and member functions,  It can be accessed and used by creating an instance of that class.  A class is like a blueprint for an object.  It serves as a template for creating, or instantiating, specific objects within a program.  Several programming languages support classes, including Java, C++, Objective C, and PHP 5 and later
  • 8. Example of Classes A Class is a plan which describes the object. We call it as a blue print of how the object should be represented. Mainly a class would consist of a name, attributes & operations. Considering the above example, A Mobile can be a class which has some attributes like Profile Type, IMEI Number, Processor, and some more.) & operations like Dial, Receive & Send Message.
  • 9. Abstraction  The process of removing physical spatial or temporal details  Attributes in the study of object or system in order to more closely attend to other details of interest  it is also very similar in nature to the process of generalization.  the abstract concept-objects which are created by keeping common features .  attributes to various concrete objects or systems of study.  Abstraction, in general, is a fundamental concept to computer science and software development.
  • 10. Abstraction of example • Dialing a number call some method internally which concatenate the numbers and displays it on screen but what is it doing we don’t know. • Clicking on green button actual send signals to calling person’s mobile but we are unaware of how it is doing. • This is called abstraction where creating method which is taking some parameter & returning some result after some logic execution without understating what is written within the method
  • 11. Encapsulation  In object oriented programming languages, encapsulation is used to refer to one of two related but distinct notions, and sometimes to the combination.  A language mechanism for restricting direct access to some of the object's components.  A language construct that facilitates the bundling of data with the methods or other functions operating on that data.
  • 12. Encapsulation of example Let’s say Samsung mobile have the 5MP camera available i.e. – it is having a functionality of Camera Click(). Now same mobile is having Panorama mode available in camera, so functionality would be same but with mode. This type is said to be Static polymorphism or Compile time polymorphism. Compile time polymorphism the compiler knows which overloaded method it is going to call. . Another point where in Send Message was intended to send message to single person at a time but suppose Nokia had given provision for sending message to a group at once. i.e. - Overriding the functionality to send message to a group. This type is called Dynamic polymorphism or Runtime polymorphism.
  • 13. Inheritance  In object-oriented programming, inheritance is the mechanism of basing an object .  class upon another object prototypal inheritance.  In most class-based object-oriented languages, an object created through inheritance (a "child object") acquires all the properties and behaviors of the parent object.  The relationships of objects or classes through inheritance give rise to a directed graph.
  • 14. Inheritance of example • Above fig. shows what is inheritance. Basic Mobile functionality is to Send Message, dial & receive call. So the brands of mobile is using this basic functionality by extending the mobile class functionality and adding their own new features to their respective brand.
  • 15. Overloading • Function overloading or method overloading is the ability to create multiple methods of the same name with different implementations. • To call the latter an object must be passed as a parameter whereas the former does not require a parameter and is called with an empty parameter field.  Calls to an overloaded function will run a specific implementation of that function appropriate to the context of the call.
  • 16. Overloading of example In this example they (that family) hire some painter who knows only painting. If this family provides different types of statues to this painter then he has to do the work. In this way we can achieve overloading. In this example first brush is used to give a color and after finishing color of whole statue, this brush gets cleaned by using water & used for removing shadu from small surface area like between finger, below eye, between legs, corner of legs / hands, etc. In this case brush is used as an operator.
  • 17. Exception Handling  Exception handling is the process of responding to the occurrence, during computation, of exceptions – anomalous or exceptional conditions requiring special processing – often changing the normal flow of program execution  exceptions are a powerful mechanism for centralized processing of errors and exceptional situations.  This mechanism replaces the procedure-oriented method of error handling in which each function returns a code indicating an error or a successful execution.
  • 18. Example of Exception Handling  You provide a web form for users to fill in and submit but incase there are a lot of conditions to be handled and the conditions keeps changing periodically, you use exception handling to simplify the process  Database connectivity uses exception handling(why???) this is because the reason for database connectivity failure cannot be predicted and handled as it can be caused by many variables such as power failure, unreachable server,failure at client front/back end and so on.  Internet communication  Arithmetic exceptions such as division by zero and so on.  Operating systems use exception handling to resolve deadlocks,recover from crash and so forth
  • 19. Polymorphism  Polymorphism is the way in which we can define a multiple function in a single name. i.e single name & multiple meaning.  Polymorphism means assigning a single name but there can be multiple behaviors. Means name of the function is same but its definitions are different.  Polymorphism means single name & multiple meaning & whenever we try to access that particular name there must be a binding between that call & between that function, so there are two types of binding to call that function.
  • 20. Example of polymorphism  Suppose if you are in class room that time you behave like a student, when you are in market at that time you behave like a customer, when you at your home at that time you behave like a son or daughter, Here one person present in different-different behaviors.  We behave differently in front of elders, and friends. A single person is behaving differently at different time.  A software engineer can perform different task at different instance of time depending on the task assigned to him .He can done coding , testing , analysis and designing depending on the task assign and the requirement. .
  • 21. References  http://www.exforsys.com/tutorials/oops-concepts/the- history-of-object-oriented-programming.html  https://techterms.com/definition/class  https://www.quora.com/Any-real-life-example-of-exception- handling  https://www.c-sharpcorner.com/UploadFile/cda5ba/object- oriented-programming-with-real-world-scenario/  https://www.sololearn.com/Discuss/252198/some-real-life- examples-of-object-oriented-programming-oop-concept  https://www.quora.com/What-are-the-best-real-life- example-for-explaining-different-OOP-concepts-in-any- programming-language