SlideShare a Scribd company logo
1 of 17
OBJECT ORIENTED PROGRAMMING
Suman Saikan
Lecturer
Dept. of CSE
Dhaka International University
1
Sunday, June 25, 2023
DEFINITION OF OBJECT ORIENTED PROGRAMMING
Object-Oriented Programming or OOPs refers to
languages that use objects in programming. Object-
oriented programming aims to implement real-world
entities like inheritance, hiding, polymorphism, etc
in programming. The main aim of OOP is to bind
together the data and the functions that operate on
them so that no other part of the code can access
this data except that function.
2
WHAT ARE THE CONCEPTS OF OOP
 Class
 Objects
 Data Abstraction
 Encapsulation
 Inheritance
 Polymorphism
 Dynamic Binding
 Message Passing
Main Features of OOP
3
COMPARE BETWEEN ABSTRACTION AND ENCAPSULATION
4
DISTINGUISH BETWEEN STRUCTURE PROGRAMMING AND
OBJECT ORIENTED PROGRAMMING
5
DESCRIBE DIFFERENT KINDS OF LOOP WITH EXAMPLE
 Loops in programming are used to repeat a block of
code until the specified condition is met. A loop
statement allows programmers to execute a
statement or group of statements multiple times
without repetition of code.
6
For Loop
for loop in C programming is a repetition control
structure that allows programmers to write a loop
that will be executed a specific number of times.
for loop enables programmers to perform n
number of steps together in a single line.
Syntax:
for (initialize expression; test expression; increment)
{
// // body of for loop // ;
}
7
While Loop
While loop does not depend upon the number of
iterations. In for loop the number of iterations was
previously known to us but in the While loop, the
execution is terminated on the basis of the test
condition. If the test condition will become false then it
will break from the while loop else body will be
executed.
Syntax:
initialization_expression;
while (test_expression)
{
// body of the while loop update_expression;
}
8
do-while Loop
The do-while loop is similar to a while loop but the only difference lies in the do-
while loop test condition which is tested at the end of the body. In the do-while
loop, the loop body will execute at least once irrespective of the test condition.
Syntax:
initialization_expression;
do {
// body of do-while loop update_expression;
} while (test_expression);
9
ILLUSTRATE RECURSION IN STRUCTURE PROGRAMMING
Recursion is the technique of making a function call itself. This
technique provides a way to break complicated problems
down into simple problems which are easier to solve.
10
DIFFERENCE BETWEEN METHOD OVERLOADING AND
METHOD OVERRIDING
11
WRITE A C++ PROGRAM TO CALCULATE FACTORIAL OF
ANY INTEGER
12
DISTINGUISH BETWEEN POST INCREMENT AND
PRE INCREMENT
13
FIND ERROR AND SOLVE IT IN C++
Problem:
 #include <Iostream>
 int main()
 {
 int a=2;
 if(A>1)

 Cout<<"a is greater than 1")
 return 0;
 }
Solution:
 #include <iostream>
 int main()
 {
 int a=2;
 if(a>1)

 cout<<("a is greater than 1");
 return 0;
 }
14
EXPLAIN THE OUTPUT OF THIS C++ PROGRAM:
#include <iostream>
using namespace std;
int main() {
for (int i = 0; i < 10; i++)
{
if (i == 4) {
continue;
}
cout << i << "n";
}
return 0;
} 15
WRITE THE OUTPUT OF THIS FOLLOWING CODE
#include<iostream>
using namespace std;
void main()
{
int y=10;
if(y++>9 && y++!=10 && y++>11)
cout<<y<<endl;
else
cout<<y<< endl;
}
16
17

More Related Content

Similar to Question Pattern in Object Oriented Programming

Similar to Question Pattern in Object Oriented Programming (20)

OOP java
OOP javaOOP java
OOP java
 
Password protected diary
Password protected diaryPassword protected diary
Password protected diary
 
Object Oriented Concepts and Principles
Object Oriented Concepts and PrinciplesObject Oriented Concepts and Principles
Object Oriented Concepts and Principles
 
Bab satu
Bab satuBab satu
Bab satu
 
babsatu-140703233001-phpapp666666601.pdf
babsatu-140703233001-phpapp666666601.pdfbabsatu-140703233001-phpapp666666601.pdf
babsatu-140703233001-phpapp666666601.pdf
 
1669609053088_oops_final.pptx
1669609053088_oops_final.pptx1669609053088_oops_final.pptx
1669609053088_oops_final.pptx
 
Training 8051Report
Training 8051ReportTraining 8051Report
Training 8051Report
 
Loops
LoopsLoops
Loops
 
Basic concept of OOP's
Basic concept of OOP'sBasic concept of OOP's
Basic concept of OOP's
 
Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++
 
Mark asoi ppt
Mark asoi pptMark asoi ppt
Mark asoi ppt
 
Twins: OOP and FP
Twins: OOP and FPTwins: OOP and FP
Twins: OOP and FP
 
Loops
LoopsLoops
Loops
 
Making an Exception
Making an ExceptionMaking an Exception
Making an Exception
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Programming topics. syed arslan rizvi
Programming topics. syed arslan rizviProgramming topics. syed arslan rizvi
Programming topics. syed arslan rizvi
 
PCCF UNIT 2.pptx
PCCF UNIT 2.pptxPCCF UNIT 2.pptx
PCCF UNIT 2.pptx
 
INTRODUCTION TO JAVA
INTRODUCTION TO JAVAINTRODUCTION TO JAVA
INTRODUCTION TO JAVA
 
Tortuga-A simulation software
Tortuga-A simulation softwareTortuga-A simulation software
Tortuga-A simulation software
 
SOLID
 SOLID SOLID
SOLID
 

More from Suman Mia

Computer Network Topology By Team_Initiator (Dept . of Sociology)
Computer Network Topology By Team_Initiator (Dept . of Sociology)Computer Network Topology By Team_Initiator (Dept . of Sociology)
Computer Network Topology By Team_Initiator (Dept . of Sociology)Suman Mia
 
Computer Network Topology By Team_Diversity Detectives (Dept . of Sociology)
Computer Network Topology By Team_Diversity Detectives (Dept . of Sociology)Computer Network Topology By Team_Diversity Detectives (Dept . of Sociology)
Computer Network Topology By Team_Diversity Detectives (Dept . of Sociology)Suman Mia
 
Computer Network Topology By Team_Societal Explorers (Dept . of Sociology)
Computer Network Topology By Team_Societal Explorers (Dept . of Sociology)Computer Network Topology By Team_Societal Explorers (Dept . of Sociology)
Computer Network Topology By Team_Societal Explorers (Dept . of Sociology)Suman Mia
 
Computer Network Topology By Team_Social Dynamic Squad (Dept . of Sociology)
Computer Network Topology By Team_Social Dynamic Squad (Dept . of Sociology)Computer Network Topology By Team_Social Dynamic Squad (Dept . of Sociology)
Computer Network Topology By Team_Social Dynamic Squad (Dept . of Sociology)Suman Mia
 
Computer Network Topology By Team_Inclusion Inquiry Initiative (Dept . of Soc...
Computer Network Topology By Team_Inclusion Inquiry Initiative (Dept . of Soc...Computer Network Topology By Team_Inclusion Inquiry Initiative (Dept . of Soc...
Computer Network Topology By Team_Inclusion Inquiry Initiative (Dept . of Soc...Suman Mia
 
Computer Network Topology By Team_Culture Crusade (Dept . of Sociology)
Computer Network Topology By Team_Culture Crusade (Dept . of Sociology)Computer Network Topology By Team_Culture Crusade (Dept . of Sociology)
Computer Network Topology By Team_Culture Crusade (Dept . of Sociology)Suman Mia
 
Computer Network Topology By Team_Community Connectors (Dept . of Sociology)
Computer Network Topology By Team_Community Connectors (Dept . of Sociology)Computer Network Topology By Team_Community Connectors (Dept . of Sociology)
Computer Network Topology By Team_Community Connectors (Dept . of Sociology)Suman Mia
 
Computer Network Topology By Team_Empowerment Ensemble (Dept . of Sociology)
Computer Network Topology By Team_Empowerment Ensemble (Dept . of Sociology)Computer Network Topology By Team_Empowerment Ensemble (Dept . of Sociology)
Computer Network Topology By Team_Empowerment Ensemble (Dept . of Sociology)Suman Mia
 
Computer Network Topology By Team_Venus(Dept. English)
Computer Network Topology By Team_Venus(Dept. English)Computer Network Topology By Team_Venus(Dept. English)
Computer Network Topology By Team_Venus(Dept. English)Suman Mia
 
Computer Network Topology By Team_Triangle(Dept. English)
Computer Network Topology By Team_Triangle(Dept. English)Computer Network Topology By Team_Triangle(Dept. English)
Computer Network Topology By Team_Triangle(Dept. English)Suman Mia
 
Computer Network Topology By Team_Royal (Dept. English)
Computer Network Topology By Team_Royal (Dept. English)Computer Network Topology By Team_Royal (Dept. English)
Computer Network Topology By Team_Royal (Dept. English)Suman Mia
 
Computer Network Topology By Team_Sanam (Dept. English)
Computer Network Topology By Team_Sanam (Dept. English)Computer Network Topology By Team_Sanam (Dept. English)
Computer Network Topology By Team_Sanam (Dept. English)Suman Mia
 
Computer Network Topology By Team_Purple (Dept. English)
Computer Network Topology By Team_Purple (Dept. English)Computer Network Topology By Team_Purple (Dept. English)
Computer Network Topology By Team_Purple (Dept. English)Suman Mia
 
Computer Network Topology By Team_ Paramount (Dept. English)
Computer Network Topology By Team_ Paramount (Dept. English)Computer Network Topology By Team_ Paramount (Dept. English)
Computer Network Topology By Team_ Paramount (Dept. English)Suman Mia
 
Computer Network Topology By Team_Metrolife(Dept. English)
Computer Network Topology By Team_Metrolife(Dept. English)Computer Network Topology By Team_Metrolife(Dept. English)
Computer Network Topology By Team_Metrolife(Dept. English)Suman Mia
 
Computer Network Topology By Team_Meghna (Dept. English)
Computer Network Topology By Team_Meghna (Dept. English)Computer Network Topology By Team_Meghna (Dept. English)
Computer Network Topology By Team_Meghna (Dept. English)Suman Mia
 
Computer Network Topology By Team_Jamuna (Dept. English)
Computer Network Topology By Team_Jamuna (Dept. English)Computer Network Topology By Team_Jamuna (Dept. English)
Computer Network Topology By Team_Jamuna (Dept. English)Suman Mia
 
Computer Network Topology By Team_CSK (Dept. English)
Computer Network Topology By Team_CSK (Dept. English)Computer Network Topology By Team_CSK (Dept. English)
Computer Network Topology By Team_CSK (Dept. English)Suman Mia
 
COmputer Network Topology By Team Gemini
COmputer Network Topology By Team GeminiCOmputer Network Topology By Team Gemini
COmputer Network Topology By Team GeminiSuman Mia
 
Software Development Life Cycle(SDLC) By Team Hunter (Dept. of Pharmacy)
Software Development Life Cycle(SDLC) By Team Hunter (Dept. of Pharmacy)Software Development Life Cycle(SDLC) By Team Hunter (Dept. of Pharmacy)
Software Development Life Cycle(SDLC) By Team Hunter (Dept. of Pharmacy)Suman Mia
 

More from Suman Mia (20)

Computer Network Topology By Team_Initiator (Dept . of Sociology)
Computer Network Topology By Team_Initiator (Dept . of Sociology)Computer Network Topology By Team_Initiator (Dept . of Sociology)
Computer Network Topology By Team_Initiator (Dept . of Sociology)
 
Computer Network Topology By Team_Diversity Detectives (Dept . of Sociology)
Computer Network Topology By Team_Diversity Detectives (Dept . of Sociology)Computer Network Topology By Team_Diversity Detectives (Dept . of Sociology)
Computer Network Topology By Team_Diversity Detectives (Dept . of Sociology)
 
Computer Network Topology By Team_Societal Explorers (Dept . of Sociology)
Computer Network Topology By Team_Societal Explorers (Dept . of Sociology)Computer Network Topology By Team_Societal Explorers (Dept . of Sociology)
Computer Network Topology By Team_Societal Explorers (Dept . of Sociology)
 
Computer Network Topology By Team_Social Dynamic Squad (Dept . of Sociology)
Computer Network Topology By Team_Social Dynamic Squad (Dept . of Sociology)Computer Network Topology By Team_Social Dynamic Squad (Dept . of Sociology)
Computer Network Topology By Team_Social Dynamic Squad (Dept . of Sociology)
 
Computer Network Topology By Team_Inclusion Inquiry Initiative (Dept . of Soc...
Computer Network Topology By Team_Inclusion Inquiry Initiative (Dept . of Soc...Computer Network Topology By Team_Inclusion Inquiry Initiative (Dept . of Soc...
Computer Network Topology By Team_Inclusion Inquiry Initiative (Dept . of Soc...
 
Computer Network Topology By Team_Culture Crusade (Dept . of Sociology)
Computer Network Topology By Team_Culture Crusade (Dept . of Sociology)Computer Network Topology By Team_Culture Crusade (Dept . of Sociology)
Computer Network Topology By Team_Culture Crusade (Dept . of Sociology)
 
Computer Network Topology By Team_Community Connectors (Dept . of Sociology)
Computer Network Topology By Team_Community Connectors (Dept . of Sociology)Computer Network Topology By Team_Community Connectors (Dept . of Sociology)
Computer Network Topology By Team_Community Connectors (Dept . of Sociology)
 
Computer Network Topology By Team_Empowerment Ensemble (Dept . of Sociology)
Computer Network Topology By Team_Empowerment Ensemble (Dept . of Sociology)Computer Network Topology By Team_Empowerment Ensemble (Dept . of Sociology)
Computer Network Topology By Team_Empowerment Ensemble (Dept . of Sociology)
 
Computer Network Topology By Team_Venus(Dept. English)
Computer Network Topology By Team_Venus(Dept. English)Computer Network Topology By Team_Venus(Dept. English)
Computer Network Topology By Team_Venus(Dept. English)
 
Computer Network Topology By Team_Triangle(Dept. English)
Computer Network Topology By Team_Triangle(Dept. English)Computer Network Topology By Team_Triangle(Dept. English)
Computer Network Topology By Team_Triangle(Dept. English)
 
Computer Network Topology By Team_Royal (Dept. English)
Computer Network Topology By Team_Royal (Dept. English)Computer Network Topology By Team_Royal (Dept. English)
Computer Network Topology By Team_Royal (Dept. English)
 
Computer Network Topology By Team_Sanam (Dept. English)
Computer Network Topology By Team_Sanam (Dept. English)Computer Network Topology By Team_Sanam (Dept. English)
Computer Network Topology By Team_Sanam (Dept. English)
 
Computer Network Topology By Team_Purple (Dept. English)
Computer Network Topology By Team_Purple (Dept. English)Computer Network Topology By Team_Purple (Dept. English)
Computer Network Topology By Team_Purple (Dept. English)
 
Computer Network Topology By Team_ Paramount (Dept. English)
Computer Network Topology By Team_ Paramount (Dept. English)Computer Network Topology By Team_ Paramount (Dept. English)
Computer Network Topology By Team_ Paramount (Dept. English)
 
Computer Network Topology By Team_Metrolife(Dept. English)
Computer Network Topology By Team_Metrolife(Dept. English)Computer Network Topology By Team_Metrolife(Dept. English)
Computer Network Topology By Team_Metrolife(Dept. English)
 
Computer Network Topology By Team_Meghna (Dept. English)
Computer Network Topology By Team_Meghna (Dept. English)Computer Network Topology By Team_Meghna (Dept. English)
Computer Network Topology By Team_Meghna (Dept. English)
 
Computer Network Topology By Team_Jamuna (Dept. English)
Computer Network Topology By Team_Jamuna (Dept. English)Computer Network Topology By Team_Jamuna (Dept. English)
Computer Network Topology By Team_Jamuna (Dept. English)
 
Computer Network Topology By Team_CSK (Dept. English)
Computer Network Topology By Team_CSK (Dept. English)Computer Network Topology By Team_CSK (Dept. English)
Computer Network Topology By Team_CSK (Dept. English)
 
COmputer Network Topology By Team Gemini
COmputer Network Topology By Team GeminiCOmputer Network Topology By Team Gemini
COmputer Network Topology By Team Gemini
 
Software Development Life Cycle(SDLC) By Team Hunter (Dept. of Pharmacy)
Software Development Life Cycle(SDLC) By Team Hunter (Dept. of Pharmacy)Software Development Life Cycle(SDLC) By Team Hunter (Dept. of Pharmacy)
Software Development Life Cycle(SDLC) By Team Hunter (Dept. of Pharmacy)
 

Recently uploaded

Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 

Recently uploaded (20)

Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 

Question Pattern in Object Oriented Programming

  • 1. OBJECT ORIENTED PROGRAMMING Suman Saikan Lecturer Dept. of CSE Dhaka International University 1 Sunday, June 25, 2023
  • 2. DEFINITION OF OBJECT ORIENTED PROGRAMMING Object-Oriented Programming or OOPs refers to languages that use objects in programming. Object- oriented programming aims to implement real-world entities like inheritance, hiding, polymorphism, etc in programming. The main aim of OOP is to bind together the data and the functions that operate on them so that no other part of the code can access this data except that function. 2
  • 3. WHAT ARE THE CONCEPTS OF OOP  Class  Objects  Data Abstraction  Encapsulation  Inheritance  Polymorphism  Dynamic Binding  Message Passing Main Features of OOP 3
  • 4. COMPARE BETWEEN ABSTRACTION AND ENCAPSULATION 4
  • 5. DISTINGUISH BETWEEN STRUCTURE PROGRAMMING AND OBJECT ORIENTED PROGRAMMING 5
  • 6. DESCRIBE DIFFERENT KINDS OF LOOP WITH EXAMPLE  Loops in programming are used to repeat a block of code until the specified condition is met. A loop statement allows programmers to execute a statement or group of statements multiple times without repetition of code. 6
  • 7. For Loop for loop in C programming is a repetition control structure that allows programmers to write a loop that will be executed a specific number of times. for loop enables programmers to perform n number of steps together in a single line. Syntax: for (initialize expression; test expression; increment) { // // body of for loop // ; } 7
  • 8. While Loop While loop does not depend upon the number of iterations. In for loop the number of iterations was previously known to us but in the While loop, the execution is terminated on the basis of the test condition. If the test condition will become false then it will break from the while loop else body will be executed. Syntax: initialization_expression; while (test_expression) { // body of the while loop update_expression; } 8
  • 9. do-while Loop The do-while loop is similar to a while loop but the only difference lies in the do- while loop test condition which is tested at the end of the body. In the do-while loop, the loop body will execute at least once irrespective of the test condition. Syntax: initialization_expression; do { // body of do-while loop update_expression; } while (test_expression); 9
  • 10. ILLUSTRATE RECURSION IN STRUCTURE PROGRAMMING Recursion is the technique of making a function call itself. This technique provides a way to break complicated problems down into simple problems which are easier to solve. 10
  • 11. DIFFERENCE BETWEEN METHOD OVERLOADING AND METHOD OVERRIDING 11
  • 12. WRITE A C++ PROGRAM TO CALCULATE FACTORIAL OF ANY INTEGER 12
  • 13. DISTINGUISH BETWEEN POST INCREMENT AND PRE INCREMENT 13
  • 14. FIND ERROR AND SOLVE IT IN C++ Problem:  #include <Iostream>  int main()  {  int a=2;  if(A>1)   Cout<<"a is greater than 1")  return 0;  } Solution:  #include <iostream>  int main()  {  int a=2;  if(a>1)   cout<<("a is greater than 1");  return 0;  } 14
  • 15. EXPLAIN THE OUTPUT OF THIS C++ PROGRAM: #include <iostream> using namespace std; int main() { for (int i = 0; i < 10; i++) { if (i == 4) { continue; } cout << i << "n"; } return 0; } 15
  • 16. WRITE THE OUTPUT OF THIS FOLLOWING CODE #include<iostream> using namespace std; void main() { int y=10; if(y++>9 && y++!=10 && y++>11) cout<<y<<endl; else cout<<y<< endl; } 16
  • 17. 17