• Home
  • Android
  • Programming
    • Object Oriented Programming
  • PHP
  • Contact

bitcaal.com

  • Home
  • Android
  • Programming
    • Object Oriented Programming
  • PHP
  • Contact

Object-Oriented Programming Concepts: OOP, Class & Object

bymehadi February 24, 2020 Object Oriented Programming Programming

In this lecture i will talk about the basic Object-Oriented Programming Concepts such as OOP, Class & Object. By following the lecture you will get very clear idea about the OOP, Class & Object.

Table Of Contents

  1. What is Object-oriented Programming?
  2. What is Class?
  3. What is Object?

What is Object-oriented Programming?

Object-oriented programming is a methodology which helps us to create or design a program using classes and objects in a structured way. OOP is also connected with the concepts such as class, object, inheritance, encapsulation etc.

Advantage of OOP

– OOP improves program quality

– It is fast and easy to maintain

– Reduce development time

– Reusable code

What is Class?

A class is blueprint or set of instructions from which objects are created. A class contains  properties and methods it determines how an object will behave and what kind of data the object will contain.

How to define Class in Java?


class ClassName{
    // properties 
   // methods
}

Example

class Animal {
    private String name;
    int age;
    String color;
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}

What is Object?

An Object is an example of a class. It determines  the behavior of a class. When an object is created, memory is allocated.

Example

Animal cat = new Animal();
TaggedClass & ObjectObject Oriented ProgrammingObject-Oriented Programming Concepts: OOPOOP

Object-Oriented Programming Concepts: Properties and Methods

Leave a Reply Cancel reply

three − one =

Recent Posts

  • Remove null values from an Array in PHP
  • Rubik’s Cube, 3D Combination Puzzle
  • Object-Oriented Programming Concepts: Constructor & Destructor
  • 5 Best New Latest Technology
  • How to Change The App Language Programmatically in Android

Categories

  • Android Basic
  • Object Oriented Programming
  • PHP
  • Programming
  • Technology

Recent Comments

  • JohnDoes on How to Change The App Language Programmatically in Android
© bitcaal 2020