Recent

1.OOPs(Object Oriented Programming) Concept

Now, we will learn about basics of object oriented programming concept (OOPs)



What is an Object

Object means real world entity in dictionary point of view. In case of programming, an object is a location in memory having a value and possibly referenced by an identifier.

What is Object Oriented Programming
Object-oriented programming (OOP) is a programming approach organized around objects rather than “actions” and data rather than logic.

Features of OOPs

OOP provides some concept which make this approach much more acceptable. These concepts are:

1.    Class: collection of objects is called class.
2.    Object: Any entity that has state, properties and behaviour is known as an object. For example: Pen, chair.
3.    Polymorphism: It means one name and many form Or When one work is done in many ways. For example: draw a shape, now shape can be anything circle, rectangle or ellipse.
4.    Inheritance: When a class obtains all the properties of its parent class it is known as inheritance.
5.    Encapsulation: Properties and behaviour of an object when coupled/bind to each other in a class and hidden from outside the world is known as encapsulation.
6.    Abstraction: Hiding internal details/ internal working of a function is known as abstraction.It is used to define standards in Java.

------------------------------------------------------------------------------------------------------------------------- 
Advantage of OOPs over Procedure Oriented Programming

>The program in case of Procedure Oriented Programming are lengthy and hard to debug.
>No data security: OOPs provides data hiding whereas in Procedure-oriented programming language the data can be accessed from anywhere.
>OOPs concept and approach is very similar to real world. So, it is easy to understand.
--------------------------------------------------------------------------------------------------------------------------

Object Based vs Object Oriented vs Truly Object Oriented Programming

1.   Object Based Programming languages: a language which does not support these two(some) features of OOPs is known as :
  • Inheritance
  • Run time polymorphism

Example: jscript

2.    Truly Object oriented programming languages: A language in which everything is represented in the form of objects is known as Truly Object oriented programming language.

Example: It is very first language which was Truly object oriented.

3.    Object Oriented Programming Languages: A language which follows the concepts of Object oriented programming is known as object oriented programming language.

Example: Java is object oriented programming language. It is not truly object oriented because primitive Data Types are not represented via objects.

No comments:

Post a Comment

Bug-dbug Designed by Bugdbug - Developed by Belson Raja Copyright © 2016

Theme images by Bim. Powered by Blogger.
Published By Bugdbug India