SlideShare a Scribd company logo
1 of 12
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Affiliated G.G.S.IP.U, Delhi
BCA, FEDT VB .NET,20205
Priyanka Rattan
Assistant Professor(IT)
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Topic
Object Oriented Programming Concepts
–Object Oriented Programming
–Objects vs. Structures
–Methods, Events, and Properties
–Overloading
–Interfaces and Inheritance
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Object Oriented Programming
• Objects
• Abstraction
• Encapsulation
• Polymorphism
• Inheritance
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Object Components
The Object
• Data
– Members
– Properties
• Behavior
– Methods
– Events
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Objects vs. Structures
Public Structure Person
Public Appendages As Integer
Public Male As Boolean
Public EyeColor As Color
End Structure
Public Class Person
Public Appendages As Integer
Public Male As Boolean
Public EyeColor As Color
End Class
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Properties and Events
• Every Control has a set of properties, methods and
events associated with it
• Eg Form
– Properties
• Name (program will use this name to refer)
• Text (title of the form)
– Methods
• Show
• Hide
• Close
– Events
• Load
• UnLoad
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Constructor
• Used for initializing private members of a class
• Name of the constructor should be New() always
• Can have zero or more parameters
• Does not return any value. So they are sub routines
• Need not be invoked explicitly. They are invoked
automatically when an object is created
• A class can have more than one constructor
• Every constructor should differ from the other by
means of number of parameters or data types of
parameters
• Constructors can be inherited
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Destructor
• Used for releasing memory consumed by objects
• Name of the destructor should be Finalize() and the
method is already defined in CLR. So we can only
override it.
• Does not return any value. Hence it is a subroutine
• Does not accept any parameters
• Only one destructor for a class
• Destructors are not inherited
• No need of explicit invocation. They are called when
the execution is about to finish.
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Array List
• Array List is a dynamic array
• Its size grows with the addition of element
• Searching is based on the index
• Sequential search is performed on elements
• Hence it is slow
• Occupies less space
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Forms and other controls
• Form is a container for other controls
• We can place the following in a form
– Label
– Text Box
– Check Box
– Radio Button
– Button
– Date Picker
– And more…
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Exception Handling
• Exception is Run time error
• It is not known at the compile time
• Examples of exceptions
– Divide by zero
– Accessing non existing portion of memory
– Memory overflow due to looping
• In VB .Net, exception is handled via Try Catch
Mechanism
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Try Catch Finally
Try
Suspicious code that may throw an exception to
be written here
Catch ex As Exception
What to be done if exception occurs to be written
here
Finally
Optional portion which will be executed
irrespective of the happening of exception to be
written here. Can contain code for releasing
unnecessary space

More Related Content

Similar to Object Oriented Programming Concepts

Software Engineering- Types of Testing
Software Engineering- Types of TestingSoftware Engineering- Types of Testing
Software Engineering- Types of TestingTrinity Dwarka
 
JAVA PROGRAMMING- OOP Concept
JAVA PROGRAMMING- OOP ConceptJAVA PROGRAMMING- OOP Concept
JAVA PROGRAMMING- OOP ConceptTrinity Dwarka
 
Software Engineering- Observations about Testing
Software Engineering-  Observations about TestingSoftware Engineering-  Observations about Testing
Software Engineering- Observations about TestingTrinity Dwarka
 
Introduction to Information Technology- Operating system
Introduction to Information Technology- Operating systemIntroduction to Information Technology- Operating system
Introduction to Information Technology- Operating systemTrinity Dwarka
 
Data Base Management system
Data Base Management systemData Base Management system
Data Base Management systemTrinity Dwarka
 
Database Management System
Database Management System Database Management System
Database Management System Trinity Dwarka
 
Introduction to Operating Systems
Introduction to Operating SystemsIntroduction to Operating Systems
Introduction to Operating SystemsTrinity Dwarka
 
Dimensional Modelling-Data Warehouse & Data Mining
 Dimensional Modelling-Data Warehouse & Data Mining Dimensional Modelling-Data Warehouse & Data Mining
Dimensional Modelling-Data Warehouse & Data MiningTrinity Dwarka
 
INTRODUCTION TO OPERATING SYSTEM
INTRODUCTION TO OPERATING SYSTEMINTRODUCTION TO OPERATING SYSTEM
INTRODUCTION TO OPERATING SYSTEMTrinity Dwarka
 
Object oriented programming using c++
Object oriented programming using c++Object oriented programming using c++
Object oriented programming using c++Trinity Dwarka
 
Software Engineering- Engineering Practice
Software Engineering- Engineering PracticeSoftware Engineering- Engineering Practice
Software Engineering- Engineering PracticeTrinity Dwarka
 
Management Information System- Information Technology Concepts
Management Information System-  Information Technology ConceptsManagement Information System-  Information Technology Concepts
Management Information System- Information Technology ConceptsTrinity Dwarka
 
Introduction to information technology
Introduction to information technologyIntroduction to information technology
Introduction to information technologyTrinity Dwarka
 
Machine Learning for Everyone
Machine Learning for EveryoneMachine Learning for Everyone
Machine Learning for EveryoneAly Abdelkareem
 
INTRODUCTION TO INFORMATION TECHNOLOGY- IT Basics
INTRODUCTION TO INFORMATION TECHNOLOGY- IT BasicsINTRODUCTION TO INFORMATION TECHNOLOGY- IT Basics
INTRODUCTION TO INFORMATION TECHNOLOGY- IT BasicsTrinity Dwarka
 

Similar to Object Oriented Programming Concepts (20)

Software Engineering- Types of Testing
Software Engineering- Types of TestingSoftware Engineering- Types of Testing
Software Engineering- Types of Testing
 
Java programming
Java programmingJava programming
Java programming
 
JAVA PROGRAMMING- OOP Concept
JAVA PROGRAMMING- OOP ConceptJAVA PROGRAMMING- OOP Concept
JAVA PROGRAMMING- OOP Concept
 
Software Engineering- Observations about Testing
Software Engineering-  Observations about TestingSoftware Engineering-  Observations about Testing
Software Engineering- Observations about Testing
 
Introduction to Information Technology- Operating system
Introduction to Information Technology- Operating systemIntroduction to Information Technology- Operating system
Introduction to Information Technology- Operating system
 
Data Base Management system
Data Base Management systemData Base Management system
Data Base Management system
 
Database Management System
Database Management System Database Management System
Database Management System
 
Introduction to Operating Systems
Introduction to Operating SystemsIntroduction to Operating Systems
Introduction to Operating Systems
 
Operating system
Operating systemOperating system
Operating system
 
Dimensional Modelling-Data Warehouse & Data Mining
 Dimensional Modelling-Data Warehouse & Data Mining Dimensional Modelling-Data Warehouse & Data Mining
Dimensional Modelling-Data Warehouse & Data Mining
 
INTRODUCTION TO OPERATING SYSTEM
INTRODUCTION TO OPERATING SYSTEMINTRODUCTION TO OPERATING SYSTEM
INTRODUCTION TO OPERATING SYSTEM
 
Object oriented programming using c++
Object oriented programming using c++Object oriented programming using c++
Object oriented programming using c++
 
Software Engineering- Engineering Practice
Software Engineering- Engineering PracticeSoftware Engineering- Engineering Practice
Software Engineering- Engineering Practice
 
OPERATING SYSTEMS
OPERATING SYSTEMSOPERATING SYSTEMS
OPERATING SYSTEMS
 
Management Information System- Information Technology Concepts
Management Information System-  Information Technology ConceptsManagement Information System-  Information Technology Concepts
Management Information System- Information Technology Concepts
 
Introduction to information technology
Introduction to information technologyIntroduction to information technology
Introduction to information technology
 
Operating system
Operating systemOperating system
Operating system
 
Computer fundamentals
Computer fundamentalsComputer fundamentals
Computer fundamentals
 
Machine Learning for Everyone
Machine Learning for EveryoneMachine Learning for Everyone
Machine Learning for Everyone
 
INTRODUCTION TO INFORMATION TECHNOLOGY- IT Basics
INTRODUCTION TO INFORMATION TECHNOLOGY- IT BasicsINTRODUCTION TO INFORMATION TECHNOLOGY- IT Basics
INTRODUCTION TO INFORMATION TECHNOLOGY- IT Basics
 

More from Trinity Dwarka

Why BAJMC in Trinity Dwarka
Why BAJMC in Trinity DwarkaWhy BAJMC in Trinity Dwarka
Why BAJMC in Trinity DwarkaTrinity Dwarka
 
Career Options after BCA
Career Options after BCACareer Options after BCA
Career Options after BCATrinity Dwarka
 
Principles of Management-Management-Concept & Meaning
  Principles of Management-Management-Concept & Meaning  Principles of Management-Management-Concept & Meaning
Principles of Management-Management-Concept & MeaningTrinity Dwarka
 
Principles of Management- Management Process & Functions
Principles of Management- Management Process  &  FunctionsPrinciples of Management- Management Process  &  Functions
Principles of Management- Management Process & FunctionsTrinity Dwarka
 
Principles of Management- Managerial Levels & Roles-
Principles of Management- Managerial Levels & Roles-Principles of Management- Managerial Levels & Roles-
Principles of Management- Managerial Levels & Roles-Trinity Dwarka
 
Management-Concept & Meaning
 Management-Concept & Meaning Management-Concept & Meaning
Management-Concept & MeaningTrinity Dwarka
 
Principles of Management- Planning
Principles of Management- PlanningPrinciples of Management- Planning
Principles of Management- PlanningTrinity Dwarka
 
Organizing Authority & Responsibility- Principles of Management
Organizing Authority & Responsibility- Principles of ManagementOrganizing Authority & Responsibility- Principles of Management
Organizing Authority & Responsibility- Principles of ManagementTrinity Dwarka
 
Staffing- Principles of Management
Staffing- Principles of ManagementStaffing- Principles of Management
Staffing- Principles of ManagementTrinity Dwarka
 
Directing-Principles of Management
Directing-Principles of ManagementDirecting-Principles of Management
Directing-Principles of ManagementTrinity Dwarka
 
Data Preprocessing- Data Warehouse & Data Mining
Data Preprocessing- Data Warehouse & Data MiningData Preprocessing- Data Warehouse & Data Mining
Data Preprocessing- Data Warehouse & Data MiningTrinity Dwarka
 
Computer Networks- Network Basics
Computer Networks- Network BasicsComputer Networks- Network Basics
Computer Networks- Network BasicsTrinity Dwarka
 
Java Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet ProgramsJava Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet ProgramsTrinity Dwarka
 
Linux Environment- Linux vs Unix
Linux Environment- Linux vs UnixLinux Environment- Linux vs Unix
Linux Environment- Linux vs UnixTrinity Dwarka
 
Linux Environment- Linux Basics
Linux Environment- Linux BasicsLinux Environment- Linux Basics
Linux Environment- Linux BasicsTrinity Dwarka
 
BCA-Mobile Computing- BASICS OF MOBILE COMPUTING
BCA-Mobile Computing- BASICS OF MOBILE COMPUTINGBCA-Mobile Computing- BASICS OF MOBILE COMPUTING
BCA-Mobile Computing- BASICS OF MOBILE COMPUTINGTrinity Dwarka
 
E-Commerce- Introduction to E-Commerce
E-Commerce- Introduction to E-CommerceE-Commerce- Introduction to E-Commerce
E-Commerce- Introduction to E-CommerceTrinity Dwarka
 
DIGITAL ELECTRONICS- Minimization Technique Karnaugh Map
DIGITAL ELECTRONICS- Minimization TechniqueKarnaugh MapDIGITAL ELECTRONICS- Minimization TechniqueKarnaugh Map
DIGITAL ELECTRONICS- Minimization Technique Karnaugh Map Trinity Dwarka
 
DIGITAL ELECTRONICS- Number System
DIGITAL ELECTRONICS- Number SystemDIGITAL ELECTRONICS- Number System
DIGITAL ELECTRONICS- Number SystemTrinity Dwarka
 
Digital Electronics -Boolean Algebra
Digital Electronics -Boolean AlgebraDigital Electronics -Boolean Algebra
Digital Electronics -Boolean AlgebraTrinity Dwarka
 

More from Trinity Dwarka (20)

Why BAJMC in Trinity Dwarka
Why BAJMC in Trinity DwarkaWhy BAJMC in Trinity Dwarka
Why BAJMC in Trinity Dwarka
 
Career Options after BCA
Career Options after BCACareer Options after BCA
Career Options after BCA
 
Principles of Management-Management-Concept & Meaning
  Principles of Management-Management-Concept & Meaning  Principles of Management-Management-Concept & Meaning
Principles of Management-Management-Concept & Meaning
 
Principles of Management- Management Process & Functions
Principles of Management- Management Process  &  FunctionsPrinciples of Management- Management Process  &  Functions
Principles of Management- Management Process & Functions
 
Principles of Management- Managerial Levels & Roles-
Principles of Management- Managerial Levels & Roles-Principles of Management- Managerial Levels & Roles-
Principles of Management- Managerial Levels & Roles-
 
Management-Concept & Meaning
 Management-Concept & Meaning Management-Concept & Meaning
Management-Concept & Meaning
 
Principles of Management- Planning
Principles of Management- PlanningPrinciples of Management- Planning
Principles of Management- Planning
 
Organizing Authority & Responsibility- Principles of Management
Organizing Authority & Responsibility- Principles of ManagementOrganizing Authority & Responsibility- Principles of Management
Organizing Authority & Responsibility- Principles of Management
 
Staffing- Principles of Management
Staffing- Principles of ManagementStaffing- Principles of Management
Staffing- Principles of Management
 
Directing-Principles of Management
Directing-Principles of ManagementDirecting-Principles of Management
Directing-Principles of Management
 
Data Preprocessing- Data Warehouse & Data Mining
Data Preprocessing- Data Warehouse & Data MiningData Preprocessing- Data Warehouse & Data Mining
Data Preprocessing- Data Warehouse & Data Mining
 
Computer Networks- Network Basics
Computer Networks- Network BasicsComputer Networks- Network Basics
Computer Networks- Network Basics
 
Java Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet ProgramsJava Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet Programs
 
Linux Environment- Linux vs Unix
Linux Environment- Linux vs UnixLinux Environment- Linux vs Unix
Linux Environment- Linux vs Unix
 
Linux Environment- Linux Basics
Linux Environment- Linux BasicsLinux Environment- Linux Basics
Linux Environment- Linux Basics
 
BCA-Mobile Computing- BASICS OF MOBILE COMPUTING
BCA-Mobile Computing- BASICS OF MOBILE COMPUTINGBCA-Mobile Computing- BASICS OF MOBILE COMPUTING
BCA-Mobile Computing- BASICS OF MOBILE COMPUTING
 
E-Commerce- Introduction to E-Commerce
E-Commerce- Introduction to E-CommerceE-Commerce- Introduction to E-Commerce
E-Commerce- Introduction to E-Commerce
 
DIGITAL ELECTRONICS- Minimization Technique Karnaugh Map
DIGITAL ELECTRONICS- Minimization TechniqueKarnaugh MapDIGITAL ELECTRONICS- Minimization TechniqueKarnaugh Map
DIGITAL ELECTRONICS- Minimization Technique Karnaugh Map
 
DIGITAL ELECTRONICS- Number System
DIGITAL ELECTRONICS- Number SystemDIGITAL ELECTRONICS- Number System
DIGITAL ELECTRONICS- Number System
 
Digital Electronics -Boolean Algebra
Digital Electronics -Boolean AlgebraDigital Electronics -Boolean Algebra
Digital Electronics -Boolean Algebra
 

Recently uploaded

Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningMarc Dusseiller Dusjagr
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfstareducators107
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptNishitharanjan Rout
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonhttgc7rh9c
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxakanksha16arora
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Celine George
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 

Recently uploaded (20)

Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptx
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

Object Oriented Programming Concepts

  • 1. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Affiliated G.G.S.IP.U, Delhi BCA, FEDT VB .NET,20205 Priyanka Rattan Assistant Professor(IT)
  • 2. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Topic Object Oriented Programming Concepts –Object Oriented Programming –Objects vs. Structures –Methods, Events, and Properties –Overloading –Interfaces and Inheritance
  • 3. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Object Oriented Programming • Objects • Abstraction • Encapsulation • Polymorphism • Inheritance
  • 4. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Object Components The Object • Data – Members – Properties • Behavior – Methods – Events
  • 5. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Objects vs. Structures Public Structure Person Public Appendages As Integer Public Male As Boolean Public EyeColor As Color End Structure Public Class Person Public Appendages As Integer Public Male As Boolean Public EyeColor As Color End Class
  • 6. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Properties and Events • Every Control has a set of properties, methods and events associated with it • Eg Form – Properties • Name (program will use this name to refer) • Text (title of the form) – Methods • Show • Hide • Close – Events • Load • UnLoad
  • 7. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Constructor • Used for initializing private members of a class • Name of the constructor should be New() always • Can have zero or more parameters • Does not return any value. So they are sub routines • Need not be invoked explicitly. They are invoked automatically when an object is created • A class can have more than one constructor • Every constructor should differ from the other by means of number of parameters or data types of parameters • Constructors can be inherited
  • 8. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Destructor • Used for releasing memory consumed by objects • Name of the destructor should be Finalize() and the method is already defined in CLR. So we can only override it. • Does not return any value. Hence it is a subroutine • Does not accept any parameters • Only one destructor for a class • Destructors are not inherited • No need of explicit invocation. They are called when the execution is about to finish.
  • 9. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Array List • Array List is a dynamic array • Its size grows with the addition of element • Searching is based on the index • Sequential search is performed on elements • Hence it is slow • Occupies less space
  • 10. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Forms and other controls • Form is a container for other controls • We can place the following in a form – Label – Text Box – Check Box – Radio Button – Button – Date Picker – And more…
  • 11. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Exception Handling • Exception is Run time error • It is not known at the compile time • Examples of exceptions – Divide by zero – Accessing non existing portion of memory – Memory overflow due to looping • In VB .Net, exception is handled via Try Catch Mechanism
  • 12. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Try Catch Finally Try Suspicious code that may throw an exception to be written here Catch ex As Exception What to be done if exception occurs to be written here Finally Optional portion which will be executed irrespective of the happening of exception to be written here. Can contain code for releasing unnecessary space