SlideShare a Scribd company logo
1 of 18
Download to read offline
Object Oriented Programming
Roadmap to Introduction to Object Oriented
Programming
Prepared by,
Mr.S. Ezra Vethamani
Assistant Professor/CSE
SRM Institute of Science and Technology
Ramapuram Campus
Chennai- 600 089
BASICS – BEFORE GET INTO OOP.
 What is DATA?
 Data is any collection of numbers, characters
orother symbols.
 Data on its own has no meaning.
 Examples: City, Time , Temperature
WHAT IS DATA? CONT…
BASICS – BEFORE GET INTO OOP CONT.
 What is INFORMATION?
 It is only data after processing by a computer and
becomes information.
 Example: The morning temperature of the city
Chicago is 62.
 What is Program?
 Program is a collection of instructions that can be
executed by a computer to perform a specific task.
BASICS – BEFORE GET INTO OOP CONT.
BASICS – BEFORE GET INTO OOP.
 #include<stdio.h>
 //function to find largest among three number
 float large(float a, float b, float c) //
 {
 if(a>=b && a>=c)
 return a;
 else if(b>=a && b>=c)
 return b;
 else
 return c;
 }
 int main()
 {
 float num1, num2, num3, largest;
 printf("Enter three numbers: ");
 scanf("%f %f %f", &num1, &num2, &num3);
 largest = large(num1, num2, num3);
 printf("Largest number = %.2f",largest);
 return 0;
 }
Output:-
Enter three numbers: 12.5 8 6.9
Largest number = 12.50
Enter three numbers: 3 5.9 6.0
Largest number = 6.00
BASICS – BEFORE GET INTO OOP.
 What is STRUCTURE?
 Structure is a group of variables of different data types
represented by a single name.
 Store the data of students like student name, age, address,
id etc. of different types. ( Array not possible)
 Example
 /* Created a structure here. The name of the structure is *
StudentData. */
 struct StudentData
 {
 char *name;
 int id;
 int age;
 float height;
 };
/* student is the variable of
structure StudentData*/
struct StudentData student;
BASIC STRUCTURE OF C PROGRAM
BASIC STRUCTURE OF C++ PROGRAM
BASIC EXAMPLE OF C++ PROGRAM
 #include<iostream.h> // header files
 class MyClass { // The class
public: // Access specifier
int myNum; // Attribute (int variable)
string myString; // Attribute (string variable)
};
int main() {
MyClass myObj; // Create an object of MyClass
// Access attributes and set values
myObj.myNum = 15;
myObj.myString = “OOPs";
// Print attribute values
cout << myObj.myNum << "n";
cout << myObj.myString;
return 0;
}
OUTPUT :
15
OOPs
CLASS VS. STRUCTURE IN C++ PROGRAM
C++ CLASS C++ STRUCTURE
CLASS VS. STRUCTURE IN C++ PROGRAM
 Extension of Structure
 Collections of
variables/data
 Members are private
/public/protected
 Members are by
default private.
 Classes are inherited
 Complex programs
 Structure is a collection
of variables of different
data types under a single
name.
 Collections of
variables/data
 Members are private
/public/protected
 Members are by default
public.
 Not inherited
 Simple programs
CLASS VS STRUCTURE IN C++ PROGRAM
Linker is a system
program that takes one
or more object files and
combines them into a
single executable file,
library file, or another
'object' file.
Loader is the part of an
operating system that
is responsible for
loading programs and
libraries.
C & C++ PROGRAM EXECUTION FLOW
BASIC STRUCTURE OF JAVA PROGRAM
JAVA PROGRAM EXECUTION FLOW
JAVA PROGRAM EXECUTION FLOW
SIMPLE EXAMPLE PROGRAMS

More Related Content

What's hot

Memory allocation in c
Memory allocation in cMemory allocation in c
Memory allocation in cPrabhu Govind
 
Fpgaでの非同期信号の扱い方とvivadoによるサポート(公開用)
Fpgaでの非同期信号の扱い方とvivadoによるサポート(公開用)Fpgaでの非同期信号の扱い方とvivadoによるサポート(公開用)
Fpgaでの非同期信号の扱い方とvivadoによるサポート(公開用)marsee101
 
ETH ASIC礦機以及簡易分辨方式.pptx
ETH ASIC礦機以及簡易分辨方式.pptxETH ASIC礦機以及簡易分辨方式.pptx
ETH ASIC礦機以及簡易分辨方式.pptxLouk Chi
 
Representation of binary tree in memory
Representation of binary tree in memoryRepresentation of binary tree in memory
Representation of binary tree in memoryRohini Shinde
 
introduction to python
 introduction to python introduction to python
introduction to pythonJincy Nelson
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference InstructionsRabin BK
 
Application of Stack - Yadraj Meena
Application of Stack - Yadraj MeenaApplication of Stack - Yadraj Meena
Application of Stack - Yadraj MeenaDipayan Sarkar
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming KrishnaMildain
 
Object-Oriented concepts.pptx
Object-Oriented concepts.pptxObject-Oriented concepts.pptx
Object-Oriented concepts.pptxBHARATH KUMAR
 
STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強
STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強
STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強Kiyoshi Ogawa
 
introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack monad bobo
 
Physical Memory Models.pdf
Physical Memory Models.pdfPhysical Memory Models.pdf
Physical Memory Models.pdfAdrian Huang
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulationSanjeev Patel
 
Introduction to OpenCL (Japanese, OpenCLの基礎)
Introduction to OpenCL (Japanese, OpenCLの基礎)Introduction to OpenCL (Japanese, OpenCLの基礎)
Introduction to OpenCL (Japanese, OpenCLの基礎)Takahiro Harada
 
Wrapping a C++ library with Cython
Wrapping a C++ library with CythonWrapping a C++ library with Cython
Wrapping a C++ library with Cythonfuzzysphere
 
○○大学の本当にあった怖い話
○○大学の本当にあった怖い話○○大学の本当にあった怖い話
○○大学の本当にあった怖い話idkqh7 Nishino
 

What's hot (20)

Memory allocation in c
Memory allocation in cMemory allocation in c
Memory allocation in c
 
Instruction code
Instruction codeInstruction code
Instruction code
 
Fpgaでの非同期信号の扱い方とvivadoによるサポート(公開用)
Fpgaでの非同期信号の扱い方とvivadoによるサポート(公開用)Fpgaでの非同期信号の扱い方とvivadoによるサポート(公開用)
Fpgaでの非同期信号の扱い方とvivadoによるサポート(公開用)
 
ETH ASIC礦機以及簡易分辨方式.pptx
ETH ASIC礦機以及簡易分辨方式.pptxETH ASIC礦機以及簡易分辨方式.pptx
ETH ASIC礦機以及簡易分辨方式.pptx
 
Representation of binary tree in memory
Representation of binary tree in memoryRepresentation of binary tree in memory
Representation of binary tree in memory
 
Pointers in C Programming
Pointers in C ProgrammingPointers in C Programming
Pointers in C Programming
 
introduction to python
 introduction to python introduction to python
introduction to python
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
Application of Stack - Yadraj Meena
Application of Stack - Yadraj MeenaApplication of Stack - Yadraj Meena
Application of Stack - Yadraj Meena
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
 
Object-Oriented concepts.pptx
Object-Oriented concepts.pptxObject-Oriented concepts.pptx
Object-Oriented concepts.pptx
 
Operators in python
Operators in pythonOperators in python
Operators in python
 
STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強
STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強
STARC RTL設計スタイルガイドによるVerilog HDL並列記述の補強
 
introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack
 
Physical Memory Models.pdf
Physical Memory Models.pdfPhysical Memory Models.pdf
Physical Memory Models.pdf
 
Threads in python
Threads in pythonThreads in python
Threads in python
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulation
 
Introduction to OpenCL (Japanese, OpenCLの基礎)
Introduction to OpenCL (Japanese, OpenCLの基礎)Introduction to OpenCL (Japanese, OpenCLの基礎)
Introduction to OpenCL (Japanese, OpenCLの基礎)
 
Wrapping a C++ library with Cython
Wrapping a C++ library with CythonWrapping a C++ library with Cython
Wrapping a C++ library with Cython
 
○○大学の本当にあった怖い話
○○大学の本当にあった怖い話○○大学の本当にあった怖い話
○○大学の本当にあった怖い話
 

Similar to Introduction to Object Oriented Programming (OOP) Roadmap

Oop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer MelayiOop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer MelayiMuhammed Thanveer M
 
Student DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmStudent DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmhome
 
VIT351 Software Development VI Unit4
VIT351 Software Development VI Unit4VIT351 Software Development VI Unit4
VIT351 Software Development VI Unit4YOGESH SINGH
 
classes & objects.ppt
classes & objects.pptclasses & objects.ppt
classes & objects.pptBArulmozhi
 
Computerscience 12th
Computerscience 12thComputerscience 12th
Computerscience 12thJUSTJOINUS
 
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptx
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptxCONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptx
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptxDeepasCSE
 
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptxINTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptxDeepasCSE
 
OOP-Lecture-05 (Constructor_Destructor).pptx
OOP-Lecture-05 (Constructor_Destructor).pptxOOP-Lecture-05 (Constructor_Destructor).pptx
OOP-Lecture-05 (Constructor_Destructor).pptxSirRafiLectures
 
Object oriented programming 2
Object oriented programming 2Object oriented programming 2
Object oriented programming 2Aadil Ansari
 
Static types on javascript?! Type checking approaches to ensure healthy appli...
Static types on javascript?! Type checking approaches to ensure healthy appli...Static types on javascript?! Type checking approaches to ensure healthy appli...
Static types on javascript?! Type checking approaches to ensure healthy appli...Arthur Puthin
 

Similar to Introduction to Object Oriented Programming (OOP) Roadmap (20)

Oop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer MelayiOop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer Melayi
 
Student DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmStudent DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEm
 
VIT351 Software Development VI Unit4
VIT351 Software Development VI Unit4VIT351 Software Development VI Unit4
VIT351 Software Development VI Unit4
 
classes & objects.ppt
classes & objects.pptclasses & objects.ppt
classes & objects.ppt
 
COW
COWCOW
COW
 
Objective c intro (1)
Objective c intro (1)Objective c intro (1)
Objective c intro (1)
 
Structures
StructuresStructures
Structures
 
OOC MODULE1.pptx
OOC MODULE1.pptxOOC MODULE1.pptx
OOC MODULE1.pptx
 
Computerscience 12th
Computerscience 12thComputerscience 12th
Computerscience 12th
 
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptx
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptxCONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptx
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptx
 
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptxINTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
 
OOP-Lecture-05 (Constructor_Destructor).pptx
OOP-Lecture-05 (Constructor_Destructor).pptxOOP-Lecture-05 (Constructor_Destructor).pptx
OOP-Lecture-05 (Constructor_Destructor).pptx
 
Object oriented programming 2
Object oriented programming 2Object oriented programming 2
Object oriented programming 2
 
Static types on javascript?! Type checking approaches to ensure healthy appli...
Static types on javascript?! Type checking approaches to ensure healthy appli...Static types on javascript?! Type checking approaches to ensure healthy appli...
Static types on javascript?! Type checking approaches to ensure healthy appli...
 
Opps manual final copy
Opps manual final   copyOpps manual final   copy
Opps manual final copy
 
OOPs manual final copy
OOPs manual final   copyOOPs manual final   copy
OOPs manual final copy
 
iOS Session-2
iOS Session-2iOS Session-2
iOS Session-2
 
Classes and Inheritance
Classes and InheritanceClasses and Inheritance
Classes and Inheritance
 
Linq
LinqLinq
Linq
 
L10
L10L10
L10
 

Recently uploaded

EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIkoyaldeepu123
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 

Recently uploaded (20)

EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AI
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 

Introduction to Object Oriented Programming (OOP) Roadmap

  • 1. Object Oriented Programming Roadmap to Introduction to Object Oriented Programming Prepared by, Mr.S. Ezra Vethamani Assistant Professor/CSE SRM Institute of Science and Technology Ramapuram Campus Chennai- 600 089
  • 2. BASICS – BEFORE GET INTO OOP.  What is DATA?  Data is any collection of numbers, characters orother symbols.  Data on its own has no meaning.  Examples: City, Time , Temperature
  • 3. WHAT IS DATA? CONT…
  • 4. BASICS – BEFORE GET INTO OOP CONT.  What is INFORMATION?  It is only data after processing by a computer and becomes information.  Example: The morning temperature of the city Chicago is 62.  What is Program?  Program is a collection of instructions that can be executed by a computer to perform a specific task.
  • 5. BASICS – BEFORE GET INTO OOP CONT.
  • 6. BASICS – BEFORE GET INTO OOP.  #include<stdio.h>  //function to find largest among three number  float large(float a, float b, float c) //  {  if(a>=b && a>=c)  return a;  else if(b>=a && b>=c)  return b;  else  return c;  }  int main()  {  float num1, num2, num3, largest;  printf("Enter three numbers: ");  scanf("%f %f %f", &num1, &num2, &num3);  largest = large(num1, num2, num3);  printf("Largest number = %.2f",largest);  return 0;  } Output:- Enter three numbers: 12.5 8 6.9 Largest number = 12.50 Enter three numbers: 3 5.9 6.0 Largest number = 6.00
  • 7. BASICS – BEFORE GET INTO OOP.  What is STRUCTURE?  Structure is a group of variables of different data types represented by a single name.  Store the data of students like student name, age, address, id etc. of different types. ( Array not possible)  Example  /* Created a structure here. The name of the structure is * StudentData. */  struct StudentData  {  char *name;  int id;  int age;  float height;  }; /* student is the variable of structure StudentData*/ struct StudentData student;
  • 8. BASIC STRUCTURE OF C PROGRAM
  • 9. BASIC STRUCTURE OF C++ PROGRAM
  • 10. BASIC EXAMPLE OF C++ PROGRAM  #include<iostream.h> // header files  class MyClass { // The class public: // Access specifier int myNum; // Attribute (int variable) string myString; // Attribute (string variable) }; int main() { MyClass myObj; // Create an object of MyClass // Access attributes and set values myObj.myNum = 15; myObj.myString = “OOPs"; // Print attribute values cout << myObj.myNum << "n"; cout << myObj.myString; return 0; } OUTPUT : 15 OOPs
  • 11. CLASS VS. STRUCTURE IN C++ PROGRAM
  • 12. C++ CLASS C++ STRUCTURE CLASS VS. STRUCTURE IN C++ PROGRAM  Extension of Structure  Collections of variables/data  Members are private /public/protected  Members are by default private.  Classes are inherited  Complex programs  Structure is a collection of variables of different data types under a single name.  Collections of variables/data  Members are private /public/protected  Members are by default public.  Not inherited  Simple programs
  • 13. CLASS VS STRUCTURE IN C++ PROGRAM
  • 14. Linker is a system program that takes one or more object files and combines them into a single executable file, library file, or another 'object' file. Loader is the part of an operating system that is responsible for loading programs and libraries. C & C++ PROGRAM EXECUTION FLOW
  • 15. BASIC STRUCTURE OF JAVA PROGRAM