KEMBAR78
Object Oriented Programming - Basic Concepts | PPTX
Object Oriented Programming
- Basic Concept
Why OOPs?
1. Procedural Programming
- Program executes statement by statement.
1. Structured Programming
- Modular programming(Help of Function)
1. Object oriented Programming
- Concept implemented with Classes & Object
Class
● Class is a template definition of the methods and variables in a particular kind
of object.
● Class created using the Keyword class
● Class name start with capital letter and can use Camel cases for name.
Object
● Object is the instance of Class. It used for access class methods and
properties.
● The object is created with the help of new keyword.
● Multiple object can create single Class.
Access Specifiers
● Public
- Publicly accessible from anywhere.
- Created using keyword public we will create variables and methods. By
default all method and properties are public.
● Private
- Scope is only inside particular class.
- Created using keyword private we will create variables and methods.
● Protected
Inheritance
● Accessing the properties and methods of one from another class.
● The keyword extends is used for extending base class properties.
● Types Of Inheritance
○ Single Level Inheritance
- Parent class methods will be extended by the child class.
○ Multilevel Inheritance
- Parent class method will be inherited by child class and again
subclass will inherit the child class method.
Object Oriented Programming - Basic Concepts

Object Oriented Programming - Basic Concepts

  • 1.
  • 2.
    Why OOPs? 1. ProceduralProgramming - Program executes statement by statement. 1. Structured Programming - Modular programming(Help of Function) 1. Object oriented Programming - Concept implemented with Classes & Object
  • 3.
    Class ● Class isa template definition of the methods and variables in a particular kind of object. ● Class created using the Keyword class ● Class name start with capital letter and can use Camel cases for name.
  • 4.
    Object ● Object isthe instance of Class. It used for access class methods and properties. ● The object is created with the help of new keyword. ● Multiple object can create single Class.
  • 5.
    Access Specifiers ● Public -Publicly accessible from anywhere. - Created using keyword public we will create variables and methods. By default all method and properties are public. ● Private - Scope is only inside particular class. - Created using keyword private we will create variables and methods. ● Protected
  • 6.
    Inheritance ● Accessing theproperties and methods of one from another class. ● The keyword extends is used for extending base class properties. ● Types Of Inheritance ○ Single Level Inheritance - Parent class methods will be extended by the child class. ○ Multilevel Inheritance - Parent class method will be inherited by child class and again subclass will inherit the child class method.