Skip to main content

OOPS

Class:
Class is concrete representation of an entity. It represents a group of objects, which posses similar attributes and behavior.
Provides Abstraction and Encapsulations. A category name that can be given to group of objects of similar kind.

Object:
Object represents/resembles a Physical/real entity. An object is simply something you can give a name.


Object Oriented Programming:
is a Style of programming that represents a program as a system of objects and enables code-reuse.


Encapsulation:
Binding of attributes and behaviors. Hiding the implementation and exposing the functionality.


Abstraction:
Hiding the complexity. Defining communication interface for the functionality and hiding rest of the things.

In .Net destructor can not be abstract. Can define Either Finalize / Destructor. For Destructor access specifiers can not be assigned. It is Private.

Overloading:
Adding a new method with the same name in same/derived class but with different number/types of parameters. Implements Polymorphism.


Overriding:
When we need to provide different implementation than the provide by base class, We define the same method with same signatures in the derived class. Method must be Protected/Protected-Friend/Public for this purpose. (Base class routine can be called by Mybase.Method, base.Method)


Shadowing:
When the method is defined as Final/sealed in base class and not overridable and we need to provide different implementation for the same. We define method with Shadows/new.


Inheritance:
Gives you ability to provide is-a relationship. Acquires attributes and behaviors from another. When a class acquires attributes and behaviors from another class. (must not be Final or sealed class in .Net)


Abstract Class:
Instance can not be created. Optionally can have one or more abstract methods but not necessary. Can provide body to Classes.


Interface:
What a Class must do, But not how-to.

Bridge for the communication when the caller does not know to whom he is calling.
Describes externally visible behavior of element.
Only Public members which defines the means of the communication with the outer world. Can-be-Used-As Relationship.
Can not contain data but can declare property. There can be no implementation. Interface can be derived from another interface.

Polymorphism:
Mean by more than one form. Ability to provide different implementation based on different no./type of parameters.

A method behaves differently based on the different input parameters. Does not depend on the Return-Type.

Pure-Polymorphism:
Make an method abstract/virtual in base class. Override it in Derived Class. Declare a variable of type base class and assign an object of derived class to it. Now call the virtual/abstract method. The actual method to be called is decided at runtime.


Early-Binding:
Calling an non-virtual method decides the method to call at compile time is known as Early-Binding.


Late-Binding:
Same as pure-polymorphism.


Identifiers/Access Specifies and scope:
Private, Protected, Friend, Protected Friend, Public
private, protected, internal, protected internal, public

What is a Delegate?
A strongly typed function pointer. A delegate object encapsulates a reference to a method. When actual function needs to be called will be decided at run-time.

Static Variable and Its Life-Time:
Public Shared VAR As Type Or public static Type VAR;
Life time is till the class is in memory.

Constructor: Special Method Always called whenever an instance of the class is created.

Destructor/Finalize:
Called by GC just before object is being reclaimed by GC.

Comments

Popular posts from this blog

Top Open Source Web-Based Project Management Software

This is an user contributed article. Project management software is not just for managing software based project. It can be used for variety of other tasks too. The web-based software must provide tools for planning, organizing and managing resources to achieve project goals and objectives. A web-based project management software can be accessed through an intranet or WAN / LAN using a web browser. You don't have to install any other software on the system. The software can be easy of use with access control features (multi-user). I use project management software for all of our projects (for e.g. building a new cluster farm) for issue / bug-tracking, calender, gantt charts, email notification and much more. Obviously I'm not the only user, the following open source software is used by some of the biggest research organizations and companies world wild. For example, NASA's Jet Propulsion Laboratory uses track software or open source project such as lighttpd / phpbb use re

Google products for your Nokia phone

Stay connected with Gmail, Search, Maps and other Google products. Check products are available for your Nokia phone Featured Free Products Search - Find the information you need quickly and easily Maps - Locate nearby businesses and get driving directions Gmail - Stay connected with Gmail on the go YouTube - Watch videos from anywhere Sync - Synchronize your contacts with Google

My organization went through the approval process of supporting the .NET Framework 2.0 in production. Do we need to go through the same process all...

My organization went through the approval process of supporting the .NET Framework 2.0 in production. Do we need to go through the same process all over again for the .NET Framework 3.0? Do I need to do any application compatibility testing for my .NET Framework 2.0 applications? Because the .NET Framework 3.0 only adds new components to the .NET Framework 2.0 without changing any of the components released in the .NET Framework 2.0, the applications you've built on the .NET Framework 2.0 will not be affected. You don’t need to do any additional testing for your .NET Framework 2.0 applications when you install the .NET Framework 3.0.