http://computertriksno1.blogspot.in/

OOPS Features

20 Oct 2017 2 comments

OOPS Features


The object oriented programming (OOP) is a programming model where Programs are organized around object and data rather than action and logic. OOP allow decomposition of a problem into a number of entities called Object and then builds data and function around these objects.

The Program is divided into number of small units called Object. The data and function are build around these objects.

  • The data of the objects can be accessed only by the functions associated with that object.
  • The functions of one object can access the functions of other object.


OOP has the following important features.

 Class:

A class is the core of any modern Object Oriented Programming language such as C#.
In OOP languages it is must to create a class for representing data.
Class is a blueprint of an object that contains variables for storing data and functions to performing operations on these data.
Class will not occupy any memory space and hence it is only logical representation of data.
To create a class, you simply use the keyword "class" followed by the class name:

class Employee
{
}

Object: 


Objects are the basic run-time entities in an object oriented system.They may represent a person,a place or any item that the program has to handle.


  • "Object is a Software bundle of related variable and methods."
  • “Object is an instance of a class”




Class will not occupy any memory space. Hence to work with the data represented by the class you must create a variable for the class, which is called as an object.
When an object is created by using the keyword new, then memory will be allocated for the class in heap memory area, which is called as an instance and its starting address will be stored in the object in stack memory area.
 When an object is created without the keyword new, then memory will not be allocated in heap I.e. instance will not be created and object in the stack contains the value null.
When an object contains null, then it is not possible to access the members of the class using that object.

class Employee
{
}

Syntax to create an object of class Employee:-

Employee objEmp = new Employee();

All the programming languages supporting Object Oriented Programming will be supporting these three main concepts:


  1. Encapsulation
  2. Inheritance
  3. Polymorphism
Share this article :

+ comments + 2 comments

28 July 2021 at 21:09

You can watch on YouTube => Click Here

!!!Demo!!! I'm having a small issue I can't get my reader to pickup your rss feed, I'm using google reader by the way.
What is the hardest thing in the world To think.
Starting a site kind of like this one forced me to do some research and I found your post to be quite helpful. My site is centered around the idea of knowledge, fun and sharing. I wish you good luck with your website in the future and you can be sure I'll be following it.
Took me time to understand all of the comments, but I seriously enjoyed the write-up. It proved being really helpful to me and Im positive to all of the Good post, adding it to my blog now, thanks. >
obst und gemüsereiniger
!!!Demo!!!

8 September 2021 at 21:05

You can watch on YouTube => Click Here

!!!Demo!!! I have wanted to post something like this on my website and you have given me an idea. Cheers.
TY for the useful info! I wouldnt have found this myself!
600 high authority UK directory submission and 400 search engine submission
!!!Demo!!!

Post a Comment

 
Support : GDDon | Creating Website | Gddon |
Copyright © 2013. Computer Tricks and Tips for System - All Rights Reserved
Template Created by Creating Website Modify by GDDon.Com
Proudly powered by Blogger