SlideShare a Scribd company logo
1 YouTube channel: Study with Me Ashwini E
Ashwini E ashwiniesware@gmail.com
CHAPTER 6:
BASIC CONCEPTS OF OBJECT ORIENTED PROGRAMMING
• Programming is an important area in computer science that deals with developing solution to a
problem.
• It involves the method of writing instructions in a language that computer can understand.
• Machine languages were used in 1950’s for writing programs. This was very complex and machine
specific.
• High level languages were introduced in 1960’s that made programming simpler.
• Structured programming was introduced in 1970’s for developing large and complex programs.
• ADA, Modula 2 ,C etc were the languages developed that time
• C++ was developed in 1980’s and became the most popular object oriented language.
• Nowadays object oriented programming languages like C++,Java,C# etc are used widely for
software development.
Procedural programming:
▪ Any programming language in which the programmer specifies a sequence of steps to
produce the desired output is known as Procedural Language.
▪ Procedural programming give importance to the procedure of solving problems
▪ Problem is solved using a series of steps that produce the desired output. Each step tells
the compiler to do something.
▪ C, Pascal,FORTRAN,BASIC etc are procedural programming languages.
Structured Programming:
▪ Procedural technique creates programs that are badly organized and more complex.
▪ Prof. Dijkstra coined a new term “Structured Programming” .
▪ Structured programming is an organized approach to programming involving the use of
three basic control structures- sequence, selection and looping and the use of top down
concepts to decompose main functions into lower level components for modularity.
Characteristics
• emphasis is on doing things(algorithms)
• Large programs are divided into smaller programs called functions
• Most of the functions share global data
• Data move openly around the system from function to function
• Functions transform data from one form to another
• Employs top down approach in program design
Problems with Structured Programming
• No restriction for accessing data.Global data is shared by many functions and there are chances of
data corruption.
• Procedural programs are difficult to design. To add new data items, all the functions has to be
modified.
• It is difficult to create new types of data
2 YouTube channel: Study with Me Ashwini E
Ashwini E ashwiniesware@gmail.com
Object Oriented Programming:
❖ A Programming technique that represents concepts as “objects” that constitute data and their associated
functions together.
❖ Data cannot be accessed directly.It can be accessed only through the member functions. It helps to avoid
damage to data accidently.
Characteristics:
• Emphasis is on data rather than procedure
• Programs are divided into objects
• Data is hidden and cannot be accessed by external function
• Objects communicate each other through functions
• New data and functions can be easily added whenever necessary
• Functions and data are tied together
In OOP, the programmer focuses on objects like menus on screen, command buttons on the screen etc.
Concepts used in Object Oriented Programming
• Objects
• Classes
• Message and methods
• Abstraction
• Encapsulation
• Polymorphism
• Inheritance
• Modularity
Objects:
➢ An Object is a real world element which has some characteristics(attributes) and behavior.
➢ It may represent a person, place or table of data
➢ An object is a collection of data and associated member functions. Attribute is represented by data
and behavior is represented by member functions.
➢ It has a unique name and is a member of a particular class.
➢ Ex: Apple, Orange,Mango etc are objects of class FRUIT
➢ Ex: Dog is an object of the class Animal
➢ Car is an object of class vehicle
➢ Objects take up memory space in the program.at the time of program execution, objects in the
program interact with one another by sending messages. An object communicates with another
object without knowing the background details of another object.
Object: Car
Class: vehicle
Data
functions
functions
Registration number
Colour
Manufacturer
Price etc
Opendoor()
Switchonengine()
Pressclutch()
Change gear() etc
3 YouTube channel: Study with Me Ashwini E
Ashwini E ashwiniesware@gmail.com
Classes:
➢ A class is a way of grouping objects having similar characteristics.
➢ Objects are variables of type class.
➢ Class is a user defined data type that consists of objects. Objects contain data and code to manipulate that
data.
➢ In a class, we can create any number of objects.
➢ Planets,sun,moon , star etc are members of the class Solar system.
➢ Classes are a way to bind data and functions together.
➢ A Class is a blue print from which objects can be created
Classes
Data abstraction:
➢ Abstraction refers to the process of representing essential features without including background
details and explanations.
➢ Data abstraction permits the user to use an object without knowing its internal working.
➢ Class is an abstract data type.
Data Encapsulation:
➢ Data encapsulation combines data and functions into a single unit called class
➢ It helps to prevent direct access to data.
➢ Data can be accessed only through member functions.
➢ Data cannot be modified by external member functions.
Inheritance:
➢ The process of creating new class from existing class is known as inheritance.
➢ The object of one class acquires the properties of object of another class. The existing class is
called as base class and the new class is known as Derived class.
➢ It provides code reusability. The derived class shares the properties of base class. So the code
from base class can be reused by derived class.
➢ We can add additional features to an existing class without modifying it.
Polymorphism
➢ Polymorphism means one name, different forms.
➢ Polymorphism is the ability for a message(function) or data to be processed in more than one
form
Data
functions
Data1
Data2
Data3
Function1()
Function2()
Function3()
4 YouTube channel: Study with Me Ashwini E
Ashwini E ashwiniesware@gmail.com
➢ In C, we use three different functions-abs(), labs() and fabs() to find absolute value of an
integer, long integer and floating point number respectively
➢ There are two types of polymorphism-Function overloading and operator overloading.
➢ Function overloading –The process of using same function to perform different tasks based on
the type and number of arguments is known as function overloading.
➢ Operator overloading-The process of using the same operator to perform multiple tasks is
known as Operator overloading.
Messages and Methods:
➢ Methods are equivalent to functions in traditional programming languages.
➢ Methods represent the behavior of an object.
➢ Every method has name and body
➢ Body is composed of instructions written in a programming language to perform a specific task.
➢ Ex: Changing student’s combination, printing student name, address etc are methods performed
on the object student.
➢ A method is invoked using message sent to the object.
Dynamic binding
➢ It means code associated with function call is known only at the time of execution of the program
Advantages Of OOP:
➢ Programs are modularized based on objects and classes
➢ It reduces code duplication and allows code reusability
➢ Easy to develop code and reduces development time
➢ OOP can communicate through message passing which makes connection with outside system
easily
➢ Data is tied together with functions. External functions cannot access or modify the data thus
providing data security.
➢ Concept of data abstraction separates object specification and object implementation.
Limitations
➢ OOP software is not having a set of standards.
➢ To convert real world problem into object oriented model is a complex task.
➢ Classes are overly generalized. The relation of classes sometimes become artificial
➢ OOPs design is tricky
➢ One needs proper planning and proper design for OOP program
Applications of OOP
➢ Computer graphic applications
➢ CAD/CAM software
➢ object oriented database
➢ user interface design like windows
➢ real time systems
➢ simulation and modeling
➢ artificial intelligence and expert systems
5 YouTube channel: Study with Me Ashwini E
Ashwini E ashwiniesware@gmail.com
4) oops(30 question )
Question paper question from this chapter 2015 to 2020
1Mention any five advantages of OOP over procedural
programming Languages.2019
2 Mention any FIVE application areas of
OOP.[2019s][2017][2015s]
3 Explain the characteristics of OOPs.[2018]
4 Explain the advantages of OOPs.[2018s][2016s][2015]
5 Give the differences between procedural oriented programming
and object oriented programming.[2017s][2020]
6 Define object oriented programming. Write the limitations of
object oriented programming.[2016]

More Related Content

What's hot

Oops
OopsOops
Increment and Decrement operators in C++
Increment and Decrement operators in C++Increment and Decrement operators in C++
Increment and Decrement operators in C++
Neeru Mittal
 
Data Structure and Algorithms
Data Structure and Algorithms Data Structure and Algorithms
Data Structure and Algorithms
ManishPrajapati78
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
Dr. C.V. Suresh Babu
 
Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)
guest251d9a
 
Visula C# Programming Lecture 1
Visula C# Programming Lecture 1Visula C# Programming Lecture 1
Visula C# Programming Lecture 1
Abou Bakr Ashraf
 
Constructors and Destructor in C++
Constructors and Destructor in C++Constructors and Destructor in C++
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
BG Java EE Course
 
concept of oops
concept of oopsconcept of oops
concept of oops
prince sharma
 
Parsing in Compiler Design
Parsing in Compiler DesignParsing in Compiler Design
Parsing in Compiler Design
Akhil Kaushik
 
OS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and MonitorsOS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and Monitors
sgpraju
 
Language processing activity
Language processing activityLanguage processing activity
Language processing activity
Dhruv Sabalpara
 
Characteristics of OOPS
Characteristics of OOPS Characteristics of OOPS
Characteristics of OOPS
abhishek kumar
 
Operating system deign and implementation
Operating system deign and implementationOperating system deign and implementation
Operating system deign and implementation
sangrampatil81
 
Object Oriented Programming Using C++
Object Oriented Programming Using C++Object Oriented Programming Using C++
Object Oriented Programming Using C++
Muhammad Waqas
 
C vs c++
C vs c++C vs c++
C vs c++
Gaurav Badhan
 
Critical section problem in operating system.
Critical section problem in operating system.Critical section problem in operating system.
Critical section problem in operating system.
MOHIT DADU
 
OOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOPOOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOP
Mudasir Qazi
 
PROCEDURAL ORIENTED PROGRAMMING VS OBJECT ORIENTED PROGRAMING
PROCEDURAL ORIENTED PROGRAMMING VS OBJECT ORIENTED PROGRAMING PROCEDURAL ORIENTED PROGRAMMING VS OBJECT ORIENTED PROGRAMING
PROCEDURAL ORIENTED PROGRAMMING VS OBJECT ORIENTED PROGRAMING
Uttam Singh
 
Cs8493 unit 4
Cs8493 unit 4Cs8493 unit 4
Cs8493 unit 4
Kathirvel Ayyaswamy
 

What's hot (20)

Oops
OopsOops
Oops
 
Increment and Decrement operators in C++
Increment and Decrement operators in C++Increment and Decrement operators in C++
Increment and Decrement operators in C++
 
Data Structure and Algorithms
Data Structure and Algorithms Data Structure and Algorithms
Data Structure and Algorithms
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)
 
Visula C# Programming Lecture 1
Visula C# Programming Lecture 1Visula C# Programming Lecture 1
Visula C# Programming Lecture 1
 
Constructors and Destructor in C++
Constructors and Destructor in C++Constructors and Destructor in C++
Constructors and Destructor in C++
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
concept of oops
concept of oopsconcept of oops
concept of oops
 
Parsing in Compiler Design
Parsing in Compiler DesignParsing in Compiler Design
Parsing in Compiler Design
 
OS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and MonitorsOS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and Monitors
 
Language processing activity
Language processing activityLanguage processing activity
Language processing activity
 
Characteristics of OOPS
Characteristics of OOPS Characteristics of OOPS
Characteristics of OOPS
 
Operating system deign and implementation
Operating system deign and implementationOperating system deign and implementation
Operating system deign and implementation
 
Object Oriented Programming Using C++
Object Oriented Programming Using C++Object Oriented Programming Using C++
Object Oriented Programming Using C++
 
C vs c++
C vs c++C vs c++
C vs c++
 
Critical section problem in operating system.
Critical section problem in operating system.Critical section problem in operating system.
Critical section problem in operating system.
 
OOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOPOOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOP
 
PROCEDURAL ORIENTED PROGRAMMING VS OBJECT ORIENTED PROGRAMING
PROCEDURAL ORIENTED PROGRAMMING VS OBJECT ORIENTED PROGRAMING PROCEDURAL ORIENTED PROGRAMMING VS OBJECT ORIENTED PROGRAMING
PROCEDURAL ORIENTED PROGRAMMING VS OBJECT ORIENTED PROGRAMING
 
Cs8493 unit 4
Cs8493 unit 4Cs8493 unit 4
Cs8493 unit 4
 

Similar to 2nd PUC computer science chapter 6 oop concept

SE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTSE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPT
nikshaikh786
 
Chapter 1
Chapter 1Chapter 1
OOPS_Unit_1
OOPS_Unit_1OOPS_Unit_1
OOPS_Unit_1
Shipra Swati
 
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 to object oriented language
Introduction to object oriented languageIntroduction to object oriented language
Introduction to object oriented language
farhan amjad
 
Object oriented concepts
Object oriented conceptsObject oriented concepts
Object oriented concepts
Pranali Chaudhari
 
DOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cDOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in c
floraaluoch3
 
Oop basic overview
Oop basic overviewOop basic overview
Oop basic overview
Deborah Akuoko
 
Unit v(dsc++)
Unit v(dsc++)Unit v(dsc++)
Unit v(dsc++)
Durga Devi
 
C++ & VISUAL C++
C++ & VISUAL C++ C++ & VISUAL C++
C++ & VISUAL C++
Makaha Rutendo
 
OOP-1.pptx
OOP-1.pptxOOP-1.pptx
OOP-1.pptx
iansebuabeh
 
Unit-V.pptx
Unit-V.pptxUnit-V.pptx
Unit-V.pptx
AtharvaPimple1
 
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
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
IndraKhatri
 
Object Oriented programming - Introduction
Object Oriented programming - IntroductionObject Oriented programming - Introduction
Object Oriented programming - Introduction
Madishetty Prathibha
 
Bca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionBca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroduction
Rai University
 
Summer Training Project On C++
Summer Training Project On  C++Summer Training Project On  C++
Summer Training Project On C++
KAUSHAL KUMAR JHA
 
POP vs OOP Introduction
POP vs OOP IntroductionPOP vs OOP Introduction
POP vs OOP Introduction
Hashni T
 
Chapter1 introduction
Chapter1 introductionChapter1 introduction
Chapter1 introduction
Jeevan Acharya
 
Mca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroductionMca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroduction
Rai University
 

Similar to 2nd PUC computer science chapter 6 oop concept (20)

SE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTSE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPT
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
OOPS_Unit_1
OOPS_Unit_1OOPS_Unit_1
OOPS_Unit_1
 
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
 
Introduction to object oriented language
Introduction to object oriented languageIntroduction to object oriented language
Introduction to object oriented language
 
Object oriented concepts
Object oriented conceptsObject oriented concepts
Object oriented concepts
 
DOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cDOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in c
 
Oop basic overview
Oop basic overviewOop basic overview
Oop basic overview
 
Unit v(dsc++)
Unit v(dsc++)Unit v(dsc++)
Unit v(dsc++)
 
C++ & VISUAL C++
C++ & VISUAL C++ C++ & VISUAL C++
C++ & VISUAL C++
 
OOP-1.pptx
OOP-1.pptxOOP-1.pptx
OOP-1.pptx
 
Unit-V.pptx
Unit-V.pptxUnit-V.pptx
Unit-V.pptx
 
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++
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Object Oriented programming - Introduction
Object Oriented programming - IntroductionObject Oriented programming - Introduction
Object Oriented programming - Introduction
 
Bca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionBca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroduction
 
Summer Training Project On C++
Summer Training Project On  C++Summer Training Project On  C++
Summer Training Project On C++
 
POP vs OOP Introduction
POP vs OOP IntroductionPOP vs OOP Introduction
POP vs OOP Introduction
 
Chapter1 introduction
Chapter1 introductionChapter1 introduction
Chapter1 introduction
 
Mca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroductionMca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroduction
 

More from Aahwini Esware gowda

2nd puc computer science chapter 8 function overloading
 2nd puc computer science chapter 8   function overloading 2nd puc computer science chapter 8   function overloading
2nd puc computer science chapter 8 function overloading
Aahwini Esware gowda
 
2nd PUC Computer science chapter 5 review of c++
2nd PUC Computer science chapter 5   review of c++2nd PUC Computer science chapter 5   review of c++
2nd PUC Computer science chapter 5 review of c++
Aahwini Esware gowda
 
2nd puc computer science chapter 3 data structures 1
2nd puc computer science chapter 3 data structures 12nd puc computer science chapter 3 data structures 1
2nd puc computer science chapter 3 data structures 1
Aahwini Esware gowda
 
2nd PUC computer science chapter 2 boolean algebra
2nd PUC computer science chapter 2  boolean algebra 2nd PUC computer science chapter 2  boolean algebra
2nd PUC computer science chapter 2 boolean algebra
Aahwini Esware gowda
 
2nd PUC computer science chapter 2 boolean algebra 1
2nd PUC computer science chapter 2  boolean algebra 12nd PUC computer science chapter 2  boolean algebra 1
2nd PUC computer science chapter 2 boolean algebra 1
Aahwini Esware gowda
 
2nd puc computer science chapter 1 backdrop of computers
2nd puc computer science chapter 1  backdrop of computers 2nd puc computer science chapter 1  backdrop of computers
2nd puc computer science chapter 1 backdrop of computers
Aahwini Esware gowda
 

More from Aahwini Esware gowda (6)

2nd puc computer science chapter 8 function overloading
 2nd puc computer science chapter 8   function overloading 2nd puc computer science chapter 8   function overloading
2nd puc computer science chapter 8 function overloading
 
2nd PUC Computer science chapter 5 review of c++
2nd PUC Computer science chapter 5   review of c++2nd PUC Computer science chapter 5   review of c++
2nd PUC Computer science chapter 5 review of c++
 
2nd puc computer science chapter 3 data structures 1
2nd puc computer science chapter 3 data structures 12nd puc computer science chapter 3 data structures 1
2nd puc computer science chapter 3 data structures 1
 
2nd PUC computer science chapter 2 boolean algebra
2nd PUC computer science chapter 2  boolean algebra 2nd PUC computer science chapter 2  boolean algebra
2nd PUC computer science chapter 2 boolean algebra
 
2nd PUC computer science chapter 2 boolean algebra 1
2nd PUC computer science chapter 2  boolean algebra 12nd PUC computer science chapter 2  boolean algebra 1
2nd PUC computer science chapter 2 boolean algebra 1
 
2nd puc computer science chapter 1 backdrop of computers
2nd puc computer science chapter 1  backdrop of computers 2nd puc computer science chapter 1  backdrop of computers
2nd puc computer science chapter 1 backdrop of computers
 

Recently uploaded

Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
Kavitha Krishnan
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 

Recently uploaded (20)

Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 

2nd PUC computer science chapter 6 oop concept

  • 1. 1 YouTube channel: Study with Me Ashwini E Ashwini E ashwiniesware@gmail.com CHAPTER 6: BASIC CONCEPTS OF OBJECT ORIENTED PROGRAMMING • Programming is an important area in computer science that deals with developing solution to a problem. • It involves the method of writing instructions in a language that computer can understand. • Machine languages were used in 1950’s for writing programs. This was very complex and machine specific. • High level languages were introduced in 1960’s that made programming simpler. • Structured programming was introduced in 1970’s for developing large and complex programs. • ADA, Modula 2 ,C etc were the languages developed that time • C++ was developed in 1980’s and became the most popular object oriented language. • Nowadays object oriented programming languages like C++,Java,C# etc are used widely for software development. Procedural programming: ▪ Any programming language in which the programmer specifies a sequence of steps to produce the desired output is known as Procedural Language. ▪ Procedural programming give importance to the procedure of solving problems ▪ Problem is solved using a series of steps that produce the desired output. Each step tells the compiler to do something. ▪ C, Pascal,FORTRAN,BASIC etc are procedural programming languages. Structured Programming: ▪ Procedural technique creates programs that are badly organized and more complex. ▪ Prof. Dijkstra coined a new term “Structured Programming” . ▪ Structured programming is an organized approach to programming involving the use of three basic control structures- sequence, selection and looping and the use of top down concepts to decompose main functions into lower level components for modularity. Characteristics • emphasis is on doing things(algorithms) • Large programs are divided into smaller programs called functions • Most of the functions share global data • Data move openly around the system from function to function • Functions transform data from one form to another • Employs top down approach in program design Problems with Structured Programming • No restriction for accessing data.Global data is shared by many functions and there are chances of data corruption. • Procedural programs are difficult to design. To add new data items, all the functions has to be modified. • It is difficult to create new types of data
  • 2. 2 YouTube channel: Study with Me Ashwini E Ashwini E ashwiniesware@gmail.com Object Oriented Programming: ❖ A Programming technique that represents concepts as “objects” that constitute data and their associated functions together. ❖ Data cannot be accessed directly.It can be accessed only through the member functions. It helps to avoid damage to data accidently. Characteristics: • Emphasis is on data rather than procedure • Programs are divided into objects • Data is hidden and cannot be accessed by external function • Objects communicate each other through functions • New data and functions can be easily added whenever necessary • Functions and data are tied together In OOP, the programmer focuses on objects like menus on screen, command buttons on the screen etc. Concepts used in Object Oriented Programming • Objects • Classes • Message and methods • Abstraction • Encapsulation • Polymorphism • Inheritance • Modularity Objects: ➢ An Object is a real world element which has some characteristics(attributes) and behavior. ➢ It may represent a person, place or table of data ➢ An object is a collection of data and associated member functions. Attribute is represented by data and behavior is represented by member functions. ➢ It has a unique name and is a member of a particular class. ➢ Ex: Apple, Orange,Mango etc are objects of class FRUIT ➢ Ex: Dog is an object of the class Animal ➢ Car is an object of class vehicle ➢ Objects take up memory space in the program.at the time of program execution, objects in the program interact with one another by sending messages. An object communicates with another object without knowing the background details of another object. Object: Car Class: vehicle Data functions functions Registration number Colour Manufacturer Price etc Opendoor() Switchonengine() Pressclutch() Change gear() etc
  • 3. 3 YouTube channel: Study with Me Ashwini E Ashwini E ashwiniesware@gmail.com Classes: ➢ A class is a way of grouping objects having similar characteristics. ➢ Objects are variables of type class. ➢ Class is a user defined data type that consists of objects. Objects contain data and code to manipulate that data. ➢ In a class, we can create any number of objects. ➢ Planets,sun,moon , star etc are members of the class Solar system. ➢ Classes are a way to bind data and functions together. ➢ A Class is a blue print from which objects can be created Classes Data abstraction: ➢ Abstraction refers to the process of representing essential features without including background details and explanations. ➢ Data abstraction permits the user to use an object without knowing its internal working. ➢ Class is an abstract data type. Data Encapsulation: ➢ Data encapsulation combines data and functions into a single unit called class ➢ It helps to prevent direct access to data. ➢ Data can be accessed only through member functions. ➢ Data cannot be modified by external member functions. Inheritance: ➢ The process of creating new class from existing class is known as inheritance. ➢ The object of one class acquires the properties of object of another class. The existing class is called as base class and the new class is known as Derived class. ➢ It provides code reusability. The derived class shares the properties of base class. So the code from base class can be reused by derived class. ➢ We can add additional features to an existing class without modifying it. Polymorphism ➢ Polymorphism means one name, different forms. ➢ Polymorphism is the ability for a message(function) or data to be processed in more than one form Data functions Data1 Data2 Data3 Function1() Function2() Function3()
  • 4. 4 YouTube channel: Study with Me Ashwini E Ashwini E ashwiniesware@gmail.com ➢ In C, we use three different functions-abs(), labs() and fabs() to find absolute value of an integer, long integer and floating point number respectively ➢ There are two types of polymorphism-Function overloading and operator overloading. ➢ Function overloading –The process of using same function to perform different tasks based on the type and number of arguments is known as function overloading. ➢ Operator overloading-The process of using the same operator to perform multiple tasks is known as Operator overloading. Messages and Methods: ➢ Methods are equivalent to functions in traditional programming languages. ➢ Methods represent the behavior of an object. ➢ Every method has name and body ➢ Body is composed of instructions written in a programming language to perform a specific task. ➢ Ex: Changing student’s combination, printing student name, address etc are methods performed on the object student. ➢ A method is invoked using message sent to the object. Dynamic binding ➢ It means code associated with function call is known only at the time of execution of the program Advantages Of OOP: ➢ Programs are modularized based on objects and classes ➢ It reduces code duplication and allows code reusability ➢ Easy to develop code and reduces development time ➢ OOP can communicate through message passing which makes connection with outside system easily ➢ Data is tied together with functions. External functions cannot access or modify the data thus providing data security. ➢ Concept of data abstraction separates object specification and object implementation. Limitations ➢ OOP software is not having a set of standards. ➢ To convert real world problem into object oriented model is a complex task. ➢ Classes are overly generalized. The relation of classes sometimes become artificial ➢ OOPs design is tricky ➢ One needs proper planning and proper design for OOP program Applications of OOP ➢ Computer graphic applications ➢ CAD/CAM software ➢ object oriented database ➢ user interface design like windows ➢ real time systems ➢ simulation and modeling ➢ artificial intelligence and expert systems
  • 5. 5 YouTube channel: Study with Me Ashwini E Ashwini E ashwiniesware@gmail.com 4) oops(30 question ) Question paper question from this chapter 2015 to 2020 1Mention any five advantages of OOP over procedural programming Languages.2019 2 Mention any FIVE application areas of OOP.[2019s][2017][2015s] 3 Explain the characteristics of OOPs.[2018] 4 Explain the advantages of OOPs.[2018s][2016s][2015] 5 Give the differences between procedural oriented programming and object oriented programming.[2017s][2020] 6 Define object oriented programming. Write the limitations of object oriented programming.[2016]