Saturday 27 October 2018

What is Object Oriented Programming?

Object oriented programming (OOP) is a kind of programming model that is used to make flexible, efficient, more reusable programming structure for applications or software. Object Oriented programming is based on objects and classes, its properties and the relationship between them.

What are classes?

Classes define the properties and methods that are possessed by an object. On the other hand object is an instance of a class. Classes basically define the behavior and structure of a program and then that structure or behavior is handled by object of that class.


What are objects?

 In real world example an object is such a thing that contain its properties and functionalities. For example, an object may be a person, chair, car, table etc. If we talk about properties in a person and person's functionalities, a person has name, age, height, weight etc. Likewise a person can move, talk, eat etc these are his functionalities.   



What are methods?

Methods are actions that perform some specific task that user required. Methods are define in a class and when you want that method to be called first you need to create the instance (object) of that class and then you can call that method with the help of instance. You can also call a method without creating the instance of a class but we will talk about that later.


No comments:

Post a Comment