SlideShare a Scribd company logo
1 of 41
13-Arid-1606
OOP Presentation
 Source Code :
 In computing, source code is any collection of computer
 Instructions (possibly with comments) written using some human-
readable computer language, usually as text.
 Object Code :
 The source code is often transformed by a compiler program into low-
level machine code understood by the computer.
Operators :
•Math Operators.
•Comparison .
•Logical Operators.
•Math Operators :
• + addition
• - subtraction
• * multiplication
• / division
• % modulus operator
• +, -, *, and / can be used with integral and floating-point data types
 Comparison Operators :
 <=
 !=
 ==
 >=
 >
 <
 LogicalOperators :
• &&
• !
• ||
 Data Types :
 Three categories of simple data
 Integral: integers (numbers without a decimal)
 Floating-point: decimal numbers
 Enumeration type: user-defined data type
Integral data types are further classified into nine categories:
Cout (used to show output)
 The stream insertion operator is <<
 Expression evaluated and its value is printed at the current
cursor position on the screen
 Cin (used to get input )
 Using more than one variable in cin allows more than
one value to be read at a time
 For example, if feet and inches are variables of type
int, a statement such as:
cin >> feet >> inches;
 Inputs two integers from the keyboard
 Places them in variables feet and inches respectively
Preprocessor Directives
 C++ has a small number of operations
 Many functions and symbols needed to run a C++ program are
provided as collection of libraries
 Every library has a name and is referred to by a header file
 Preprocessor directives are commands supplied to the
preprocessor
 All preprocessor commands begin with #
 No semicolon at the end of these commands
Syntax to include a header file:
#include <iostream>
For example:
Causes the preprocessor to include the
header file iostream in the program
 Loop (Repetition) :

1. The while loop (loop until a condition
becomes false).
2. The do...while loop (recommended when you
need to run the loop at least once).
3. The for loop (best when there's a counter
involved) .
 For Loop :
 Examples : (For Loop)
Int main ()
{
For(int i=0 i ; i<5 ; i++)
Cout<<“ my name iZ sunny mirza “;
System(“pause”);
}
Example :
Int main ()
{
For(int i=0 i ; i<5 ; i++)
Cout<<i;
System(“pause”);
}
Example:
#include<iostream>
Using namespace std;
int main()
{
int q, w , int new1[5];
for(q=0;q<5;q++)
{
cout<<"Enter a random number :";
cin>>new1[q];
}
cout<<endl;
for(w=0;w<5;w++)
{
cout<< "Your entered numbers are : ";
cout<<new1[w];
cout<<endl;
}
System(“pause”);
}
 While Loop :
Examples : (While loop)
#include<iostream>
Using namespace std;
int main()
{
int a,b;
cout<<" Input the first printing value :" ;
cin>>a;
cout<<endl;
cout<<"Input the last printing value :" ;
cin>>b;
cout<<endl;
while(a<=b)
{
cout<<" The Print out value is :"<<a;
cout<<endl;
a++;
}
system(“pause”);
}
#include <iostream>
using namespace std;
int main ()
{
int count = 7; int number = 0, total = 0, totalOdd = 0, totalEven = 0;
while (count < 0)
{
cin >> number;
total += number;
if (number %2 == 0) totalEven += number;
Else
totalOdd += number;
}
cout << total << totalOdd << totalEven << endl;
System(“pause”);
}
#include<iostream>
using namespace std;
int main()
{
int a;
cout<<"Enter the Number :";
cin>>a;
int counter = 1;
while (counter <= a)
{
cout<<"Execute While "<<counter<<" time"<<endl;
counter++;
}
system(“pause”);
}
 Do While Loop
#include<iostream>
using namespace std;
int main()
{
int a;
cout<<"Enter the Number :";
cin>>a;
int counter = 1;
//Do while Loop Block
do
{
cout<<"Execute Do While "<<counter<<" time"<<endl;
counter++;
}while (counter <= a);
System(“pause”);
}
#include <iostream>
using namespace std;
int main()
{
int x;
x = 0;
do {
// "Hello, world!" is printed at least one time // even though the condition
is false
cout<<"Hello, world!n";
}
while ( x != 0 );
System(“pause”);
}
#include <iostream>
using namespace std;
int main()
{
int counter, howmuch;
cin >> howmuch;
counter = 0;
do {
counter++;
cout << counter << 'n';
}
while ( counter < howmuch);
System(“pause”);
}
 Decisiom Statements :
IF Statement
 if the condition in the if statement evaluates to true, then the
specified set of statement block is executed, otherwise the if
statement exits.
The syntax of the if statement is as follows: -
if(condition)
{
statement-block;
}
 Examples(If statement)
#include<iostream>
using namespace std;
int main()
{
int a;
Cin>>a;
if(a>5)
cout << "Hello" << "n";
System(“pause”);
}
#include<iostream>
using namespace std;
int main()
{
// Variable Declaration
int a;
//Get Input Value
cout<<"Enter the Number :";
cin>>a;
//If Condition Check
if(a > 10)
{
// Block For Condition Success
cout<<a<<" Is Greater than 10";
}
// Wait For Output Screen
system(“pause”);
}
include<iostream>
using namespace std;
int main()
{
int Num;
cout<<"Enter Number to check it is Even ";
cin>>Num;
if(Num%2==0)
{
cout<<"Number is Even”;
}
System(“pause”);
}
 IF Else Statement
 If the condition in the if statement evaluates to true, then the
specified set of statement block is executed, otherwise the
statement-block in the else block is executed. In other words, the if-
else statements contains a set of statement-block for both the
cases, either the condition evaluates to true or false.
The syntax of the if statement is as follows: -
 if(condition)
 {
 statement-block;
 }
 else
 {
 statement-block;
 }
Examples :
#include<iostream>
using namespace std;
int main()
{ int Num;
cout<<"Enter Number to check it is Even or Odd: ";
cin>>Num;
if(Num%2==0)
{
cout<<"Number is Even“;
}
else
{
cout<<" Number is Odd";
}
system(“pause”);
}
#include<iostream>
using namespace std;
int main()
{
int a;
cout<<"Enter the Number :";
cin>>a;
if(a > 10)
{
cout<<a<<" Is Greater than 10";
}
else
{
cout<<a<<" Is Less than/Equal 10";
}
System(“pause”);
}
#include<iostream>
using namespace std;
int main()
{
int age, height;
cin >> age;
cin >> height;
if(age == height)
{
cout << "Your age and height are the same!";
}
Else
Cout<<“not same: “;
System(“pause”);
}
 Nested If Else :
 Used when want to add more than 1 conditions for
different outputs.
if (i == 1) { // action 1 }
else
{ if (i == 2) { // action 2 }
else
{ if (i == 3) { // action 3 }
else
{ // action 4 } } }
int age, height;
cin >> age;
cin >> height;
if(height == age)
{
cout << "Your height is equal to your age!"; }
else if(height < age)
{
cout << "Your height is less than your age!";
}
else if(height > age)
{
cout << "Your height is greater than your age!";
}
int main()
{ int mark;
cout << "What mark did you get in the test?" << endl;
cin >> mark;
if(mark >= 90)
{ cout << "You got an A*" << endl;
cout << "You Passed!" << endl; }
else if(mark >= 80)
{ cout << "You got an A" << endl;
cout << "You Passed!" << endl; }
else if(mark >= 70)
{ cout << "You got an B" << endl;
cout << "You Passed!" << endl; }
else {
cout << "You got an U" << endl;
cout << "You Failed!" << endl; }
return 0; }
Switch Case ( works similar to like nested if else)
switch (i)
{ case 1:
// action 1 break;
case 2:
// action 2
break; case 3:
// action 3
break; default: // action 4 break;
}
Control Statements:
 Break :
 The break statement terminates the execution of the nearest
enclosing do, for, switch, or while statement in which it appears. Control passes to
the statement that follows the terminated statement.
 Syntax
jump-statement:
break;
#include<iostream>
using namespace std;
int main()
{
Continue :
 The CONTINUE statement exits the current iteration of a loop, either
conditionally or unconditionally, and transfers control to the next iteration
of either the current loop or an enclosing labeled loop.
 Restrictions on CONTINUE Statement
 A CONTINUE statement must be inside a LOOP statement.
 A CONTINUE statement cannot cross a subprogram or method boundary.
Return Statement
The return statement terminates the execution of a function and returns
control to the calling function.
jump-statement:
return expression opt ;
Variables :
 A quantity whose value can be change in the program.
 Holder of Constant value (Container).
 Decleration
int x;
Design of Programming Languages
OOP Languages
Made by :Ahsan Ali
121. Orca
122. Orient84/K
123. OSCAR
124. O'small
125. Oz
126. Parasol
127. Parlog++
128. Pascal Plus
129. PECOS
130. PHOCUS
131. Pict
132. Polka
133. POLYGOTH
134. POOL2
135. POP++
136. PopTalk
137. Probe
138. Prolog++
139. PROOF/L
140. Python
141. Real-Time
Mentat
142. ROME
143. Rossette
59. ETHER
60. EXTRA
61. FLEX
62. FMPL
63. FOOP
64. Formes
65. Fresco
66. G
67. GEL
68. HERAKLIT
69. HOOK
70. Hybrid
71. IDOL
72. InnovAda
73. ISLisp
74. Jade
75.
JavaKaleidoscope
77. Kevo
78. LAMINA
79. Late-bound
80. LAURE
81. Leda
1. A#
2. ABCL
3. Abel
4. Actor
5. Acttalk
6. Ada
7. ADES
8. ADVSYS
9. Agora
10. Alcool-90
11. ALLOY
12. ALTRAN
13. AppleScript
14. ASDL
15. A’UM
16. BeBOP
17. Beta
18. BLAZE 2
19. Blue
20. Bob
21. BOPL
22. C*
23. C++
☺THANK YOU
List of some of the Object-Oriented Programming
Languages in Existence Today
Made by :Ahsan Ali

More Related Content

What's hot

Python-nose: A unittest-based testing framework for Python that makes writing...
Python-nose: A unittest-based testing framework for Python that makes writing...Python-nose: A unittest-based testing framework for Python that makes writing...
Python-nose: A unittest-based testing framework for Python that makes writing...Timo Stollenwerk
 
How Functions Work
How Functions WorkHow Functions Work
How Functions WorkSaumil Shah
 
Test Driven Development With Python
Test Driven Development With PythonTest Driven Development With Python
Test Driven Development With PythonSiddhi
 
Operating Systems - A Primer
Operating Systems - A PrimerOperating Systems - A Primer
Operating Systems - A PrimerSaumil Shah
 
A Playful Introduction to Rx
A Playful Introduction to RxA Playful Introduction to Rx
A Playful Introduction to RxAndrey Cheptsov
 
Lecture no 3
Lecture no 3Lecture no 3
Lecture no 3hasi071
 
Ios i pv4_access_lists
Ios i pv4_access_listsIos i pv4_access_lists
Ios i pv4_access_listsMohamed Gamel
 
Python Programming Essentials - M35 - Iterators & Generators
Python Programming Essentials - M35 - Iterators & GeneratorsPython Programming Essentials - M35 - Iterators & Generators
Python Programming Essentials - M35 - Iterators & GeneratorsP3 InfoTech Solutions Pvt. Ltd.
 
Introduction to Functional Programming (w/ JS)
Introduction to Functional Programming (w/ JS)Introduction to Functional Programming (w/ JS)
Introduction to Functional Programming (w/ JS)Allan Marques Baptista
 
Python meetup: coroutines, event loops, and non-blocking I/O
Python meetup: coroutines, event loops, and non-blocking I/OPython meetup: coroutines, event loops, and non-blocking I/O
Python meetup: coroutines, event loops, and non-blocking I/OBuzzcapture
 
unittest in 5 minutes
unittest in 5 minutesunittest in 5 minutes
unittest in 5 minutesRay Toal
 
Network automation with Ansible and Python
Network automation with Ansible and PythonNetwork automation with Ansible and Python
Network automation with Ansible and PythonJisc
 
Exploit techniques - a quick review
Exploit techniques - a quick reviewExploit techniques - a quick review
Exploit techniques - a quick reviewCe.Se.N.A. Security
 

What's hot (20)

Buffer OverFlow
Buffer OverFlowBuffer OverFlow
Buffer OverFlow
 
Return Oriented Programming (ROP) Based Exploits - Part I
Return Oriented Programming  (ROP) Based Exploits  - Part IReturn Oriented Programming  (ROP) Based Exploits  - Part I
Return Oriented Programming (ROP) Based Exploits - Part I
 
Cs1123 6 loops
Cs1123 6 loopsCs1123 6 loops
Cs1123 6 loops
 
Python-nose: A unittest-based testing framework for Python that makes writing...
Python-nose: A unittest-based testing framework for Python that makes writing...Python-nose: A unittest-based testing framework for Python that makes writing...
Python-nose: A unittest-based testing framework for Python that makes writing...
 
How Functions Work
How Functions WorkHow Functions Work
How Functions Work
 
Test Driven Development With Python
Test Driven Development With PythonTest Driven Development With Python
Test Driven Development With Python
 
Python unittest
Python unittestPython unittest
Python unittest
 
Operating Systems - A Primer
Operating Systems - A PrimerOperating Systems - A Primer
Operating Systems - A Primer
 
A Playful Introduction to Rx
A Playful Introduction to RxA Playful Introduction to Rx
A Playful Introduction to Rx
 
TVM VTA (TSIM)
TVM VTA (TSIM) TVM VTA (TSIM)
TVM VTA (TSIM)
 
Pyunit
PyunitPyunit
Pyunit
 
Lecture no 3
Lecture no 3Lecture no 3
Lecture no 3
 
Ios i pv4_access_lists
Ios i pv4_access_listsIos i pv4_access_lists
Ios i pv4_access_lists
 
Python Programming Essentials - M35 - Iterators & Generators
Python Programming Essentials - M35 - Iterators & GeneratorsPython Programming Essentials - M35 - Iterators & Generators
Python Programming Essentials - M35 - Iterators & Generators
 
Introduction to Functional Programming (w/ JS)
Introduction to Functional Programming (w/ JS)Introduction to Functional Programming (w/ JS)
Introduction to Functional Programming (w/ JS)
 
Shell Script Tutorial
Shell Script TutorialShell Script Tutorial
Shell Script Tutorial
 
Python meetup: coroutines, event loops, and non-blocking I/O
Python meetup: coroutines, event loops, and non-blocking I/OPython meetup: coroutines, event loops, and non-blocking I/O
Python meetup: coroutines, event loops, and non-blocking I/O
 
unittest in 5 minutes
unittest in 5 minutesunittest in 5 minutes
unittest in 5 minutes
 
Network automation with Ansible and Python
Network automation with Ansible and PythonNetwork automation with Ansible and Python
Network automation with Ansible and Python
 
Exploit techniques - a quick review
Exploit techniques - a quick reviewExploit techniques - a quick review
Exploit techniques - a quick review
 

Similar to Oop object oriented programing topics

Object oriented programming system with C++
Object oriented programming system with C++Object oriented programming system with C++
Object oriented programming system with C++msharshitha03s
 
FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2rohassanie
 
OOPS USING C++(UNIT 2)
OOPS USING C++(UNIT 2)OOPS USING C++(UNIT 2)
OOPS USING C++(UNIT 2)SURBHI SAROHA
 
Computer programming
Computer programmingComputer programming
Computer programmingXhyna Delfin
 
OOPS using C++
OOPS using C++OOPS using C++
OOPS using C++cpjcollege
 
Switch case and looping
Switch case and loopingSwitch case and looping
Switch case and loopingChaAstillas
 
C++ Course - Lesson 1
C++ Course - Lesson 1C++ Course - Lesson 1
C++ Course - Lesson 1Mohamed Ahmed
 
Help Needed!UNIX Shell and History Feature This project consists.pdf
Help Needed!UNIX Shell and History Feature This project consists.pdfHelp Needed!UNIX Shell and History Feature This project consists.pdf
Help Needed!UNIX Shell and History Feature This project consists.pdfmohdjakirfb
 
C Sharp Jn (3)
C Sharp Jn (3)C Sharp Jn (3)
C Sharp Jn (3)jahanullah
 
My programming final proj. (1)
My programming final proj. (1)My programming final proj. (1)
My programming final proj. (1)aeden_brines
 
OpenGurukul : Language : C++ Programming
OpenGurukul : Language : C++ ProgrammingOpenGurukul : Language : C++ Programming
OpenGurukul : Language : C++ ProgrammingOpen Gurukul
 
Switch case and looping new
Switch case and looping newSwitch case and looping new
Switch case and looping newaprilyyy
 
JPC#8 Introduction to Java Programming
JPC#8 Introduction to Java ProgrammingJPC#8 Introduction to Java Programming
JPC#8 Introduction to Java ProgrammingPathomchon Sriwilairit
 
Switch case and looping kim
Switch case and looping kimSwitch case and looping kim
Switch case and looping kimkimberly_Bm10203
 
2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloading2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloadingkinan keshkeh
 

Similar to Oop object oriented programing topics (20)

Object oriented programming system with C++
Object oriented programming system with C++Object oriented programming system with C++
Object oriented programming system with C++
 
FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2
 
C++ loop
C++ loop C++ loop
C++ loop
 
OOPS USING C++(UNIT 2)
OOPS USING C++(UNIT 2)OOPS USING C++(UNIT 2)
OOPS USING C++(UNIT 2)
 
Computer programming
Computer programmingComputer programming
Computer programming
 
OOPS using C++
OOPS using C++OOPS using C++
OOPS using C++
 
Switch case and looping
Switch case and loopingSwitch case and looping
Switch case and looping
 
MUST CS101 Lab11
MUST CS101 Lab11 MUST CS101 Lab11
MUST CS101 Lab11
 
Project in programming
Project in programmingProject in programming
Project in programming
 
C++ Course - Lesson 1
C++ Course - Lesson 1C++ Course - Lesson 1
C++ Course - Lesson 1
 
CP 04.pptx
CP 04.pptxCP 04.pptx
CP 04.pptx
 
Help Needed!UNIX Shell and History Feature This project consists.pdf
Help Needed!UNIX Shell and History Feature This project consists.pdfHelp Needed!UNIX Shell and History Feature This project consists.pdf
Help Needed!UNIX Shell and History Feature This project consists.pdf
 
C Sharp Jn (3)
C Sharp Jn (3)C Sharp Jn (3)
C Sharp Jn (3)
 
Loops
LoopsLoops
Loops
 
My programming final proj. (1)
My programming final proj. (1)My programming final proj. (1)
My programming final proj. (1)
 
OpenGurukul : Language : C++ Programming
OpenGurukul : Language : C++ ProgrammingOpenGurukul : Language : C++ Programming
OpenGurukul : Language : C++ Programming
 
Switch case and looping new
Switch case and looping newSwitch case and looping new
Switch case and looping new
 
JPC#8 Introduction to Java Programming
JPC#8 Introduction to Java ProgrammingJPC#8 Introduction to Java Programming
JPC#8 Introduction to Java Programming
 
Switch case and looping kim
Switch case and looping kimSwitch case and looping kim
Switch case and looping kim
 
2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloading2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloading
 

Recently uploaded

MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 

Recently uploaded (20)

MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 

Oop object oriented programing topics

  • 2.
  • 3.  Source Code :  In computing, source code is any collection of computer  Instructions (possibly with comments) written using some human- readable computer language, usually as text.  Object Code :  The source code is often transformed by a compiler program into low- level machine code understood by the computer.
  • 4. Operators : •Math Operators. •Comparison . •Logical Operators. •Math Operators : • + addition • - subtraction • * multiplication • / division • % modulus operator • +, -, *, and / can be used with integral and floating-point data types
  • 5.  Comparison Operators :  <=  !=  ==  >=  >  <  LogicalOperators : • && • ! • ||
  • 6.  Data Types :  Three categories of simple data  Integral: integers (numbers without a decimal)  Floating-point: decimal numbers  Enumeration type: user-defined data type
  • 7. Integral data types are further classified into nine categories:
  • 8.
  • 9. Cout (used to show output)  The stream insertion operator is <<  Expression evaluated and its value is printed at the current cursor position on the screen
  • 10.  Cin (used to get input )  Using more than one variable in cin allows more than one value to be read at a time  For example, if feet and inches are variables of type int, a statement such as: cin >> feet >> inches;  Inputs two integers from the keyboard  Places them in variables feet and inches respectively
  • 11.
  • 12. Preprocessor Directives  C++ has a small number of operations  Many functions and symbols needed to run a C++ program are provided as collection of libraries  Every library has a name and is referred to by a header file  Preprocessor directives are commands supplied to the preprocessor  All preprocessor commands begin with #  No semicolon at the end of these commands
  • 13. Syntax to include a header file: #include <iostream> For example: Causes the preprocessor to include the header file iostream in the program
  • 14.  Loop (Repetition) :  1. The while loop (loop until a condition becomes false). 2. The do...while loop (recommended when you need to run the loop at least once). 3. The for loop (best when there's a counter involved) .
  • 16.  Examples : (For Loop) Int main () { For(int i=0 i ; i<5 ; i++) Cout<<“ my name iZ sunny mirza “; System(“pause”); } Example : Int main () { For(int i=0 i ; i<5 ; i++) Cout<<i; System(“pause”); }
  • 17. Example: #include<iostream> Using namespace std; int main() { int q, w , int new1[5]; for(q=0;q<5;q++) { cout<<"Enter a random number :"; cin>>new1[q]; } cout<<endl; for(w=0;w<5;w++) { cout<< "Your entered numbers are : "; cout<<new1[w]; cout<<endl; } System(“pause”); }
  • 19. Examples : (While loop) #include<iostream> Using namespace std; int main() { int a,b; cout<<" Input the first printing value :" ; cin>>a; cout<<endl; cout<<"Input the last printing value :" ; cin>>b; cout<<endl; while(a<=b) { cout<<" The Print out value is :"<<a; cout<<endl; a++; } system(“pause”); }
  • 20. #include <iostream> using namespace std; int main () { int count = 7; int number = 0, total = 0, totalOdd = 0, totalEven = 0; while (count < 0) { cin >> number; total += number; if (number %2 == 0) totalEven += number; Else totalOdd += number; } cout << total << totalOdd << totalEven << endl; System(“pause”); }
  • 21. #include<iostream> using namespace std; int main() { int a; cout<<"Enter the Number :"; cin>>a; int counter = 1; while (counter <= a) { cout<<"Execute While "<<counter<<" time"<<endl; counter++; } system(“pause”); }
  • 22.  Do While Loop
  • 23. #include<iostream> using namespace std; int main() { int a; cout<<"Enter the Number :"; cin>>a; int counter = 1; //Do while Loop Block do { cout<<"Execute Do While "<<counter<<" time"<<endl; counter++; }while (counter <= a); System(“pause”); }
  • 24. #include <iostream> using namespace std; int main() { int x; x = 0; do { // "Hello, world!" is printed at least one time // even though the condition is false cout<<"Hello, world!n"; } while ( x != 0 ); System(“pause”); }
  • 25. #include <iostream> using namespace std; int main() { int counter, howmuch; cin >> howmuch; counter = 0; do { counter++; cout << counter << 'n'; } while ( counter < howmuch); System(“pause”); }
  • 26.  Decisiom Statements : IF Statement  if the condition in the if statement evaluates to true, then the specified set of statement block is executed, otherwise the if statement exits. The syntax of the if statement is as follows: - if(condition) { statement-block; }
  • 27.  Examples(If statement) #include<iostream> using namespace std; int main() { int a; Cin>>a; if(a>5) cout << "Hello" << "n"; System(“pause”); }
  • 28. #include<iostream> using namespace std; int main() { // Variable Declaration int a; //Get Input Value cout<<"Enter the Number :"; cin>>a; //If Condition Check if(a > 10) { // Block For Condition Success cout<<a<<" Is Greater than 10"; } // Wait For Output Screen system(“pause”); }
  • 29. include<iostream> using namespace std; int main() { int Num; cout<<"Enter Number to check it is Even "; cin>>Num; if(Num%2==0) { cout<<"Number is Even”; } System(“pause”); }
  • 30.  IF Else Statement  If the condition in the if statement evaluates to true, then the specified set of statement block is executed, otherwise the statement-block in the else block is executed. In other words, the if- else statements contains a set of statement-block for both the cases, either the condition evaluates to true or false. The syntax of the if statement is as follows: -  if(condition)  {  statement-block;  }  else  {  statement-block;  }
  • 31. Examples : #include<iostream> using namespace std; int main() { int Num; cout<<"Enter Number to check it is Even or Odd: "; cin>>Num; if(Num%2==0) { cout<<"Number is Even“; } else { cout<<" Number is Odd"; } system(“pause”); }
  • 32. #include<iostream> using namespace std; int main() { int a; cout<<"Enter the Number :"; cin>>a; if(a > 10) { cout<<a<<" Is Greater than 10"; } else { cout<<a<<" Is Less than/Equal 10"; } System(“pause”); }
  • 33. #include<iostream> using namespace std; int main() { int age, height; cin >> age; cin >> height; if(age == height) { cout << "Your age and height are the same!"; } Else Cout<<“not same: “; System(“pause”); }
  • 34.  Nested If Else :  Used when want to add more than 1 conditions for different outputs. if (i == 1) { // action 1 } else { if (i == 2) { // action 2 } else { if (i == 3) { // action 3 } else { // action 4 } } }
  • 35. int age, height; cin >> age; cin >> height; if(height == age) { cout << "Your height is equal to your age!"; } else if(height < age) { cout << "Your height is less than your age!"; } else if(height > age) { cout << "Your height is greater than your age!"; }
  • 36. int main() { int mark; cout << "What mark did you get in the test?" << endl; cin >> mark; if(mark >= 90) { cout << "You got an A*" << endl; cout << "You Passed!" << endl; } else if(mark >= 80) { cout << "You got an A" << endl; cout << "You Passed!" << endl; } else if(mark >= 70) { cout << "You got an B" << endl; cout << "You Passed!" << endl; } else { cout << "You got an U" << endl; cout << "You Failed!" << endl; } return 0; }
  • 37. Switch Case ( works similar to like nested if else) switch (i) { case 1: // action 1 break; case 2: // action 2 break; case 3: // action 3 break; default: // action 4 break; }
  • 38. Control Statements:  Break :  The break statement terminates the execution of the nearest enclosing do, for, switch, or while statement in which it appears. Control passes to the statement that follows the terminated statement.  Syntax jump-statement: break; #include<iostream> using namespace std; int main() {
  • 39. Continue :  The CONTINUE statement exits the current iteration of a loop, either conditionally or unconditionally, and transfers control to the next iteration of either the current loop or an enclosing labeled loop.  Restrictions on CONTINUE Statement  A CONTINUE statement must be inside a LOOP statement.  A CONTINUE statement cannot cross a subprogram or method boundary. Return Statement The return statement terminates the execution of a function and returns control to the calling function. jump-statement: return expression opt ;
  • 40. Variables :  A quantity whose value can be change in the program.  Holder of Constant value (Container).  Decleration int x;
  • 41. Design of Programming Languages OOP Languages Made by :Ahsan Ali 121. Orca 122. Orient84/K 123. OSCAR 124. O'small 125. Oz 126. Parasol 127. Parlog++ 128. Pascal Plus 129. PECOS 130. PHOCUS 131. Pict 132. Polka 133. POLYGOTH 134. POOL2 135. POP++ 136. PopTalk 137. Probe 138. Prolog++ 139. PROOF/L 140. Python 141. Real-Time Mentat 142. ROME 143. Rossette 59. ETHER 60. EXTRA 61. FLEX 62. FMPL 63. FOOP 64. Formes 65. Fresco 66. G 67. GEL 68. HERAKLIT 69. HOOK 70. Hybrid 71. IDOL 72. InnovAda 73. ISLisp 74. Jade 75. JavaKaleidoscope 77. Kevo 78. LAMINA 79. Late-bound 80. LAURE 81. Leda 1. A# 2. ABCL 3. Abel 4. Actor 5. Acttalk 6. Ada 7. ADES 8. ADVSYS 9. Agora 10. Alcool-90 11. ALLOY 12. ALTRAN 13. AppleScript 14. ASDL 15. A’UM 16. BeBOP 17. Beta 18. BLAZE 2 19. Blue 20. Bob 21. BOPL 22. C* 23. C++ ☺THANK YOU List of some of the Object-Oriented Programming Languages in Existence Today Made by :Ahsan Ali