Sunday, May 12, 2013

Definitions of OOP's terms : in one line


Class and object: a class is a definition which describes all attributes of entity or an object. And object is an instance of a class.
Encapsulation: is an ability of hiding data or methods from the rest of the world.
Inheritance: is a concept of passing and using attributes of base class into derived class.
Polymorphism: single name – multiple use, it can be achieved via Function overloading & operator overloading.
Overloading: is the concept of using function or class with same name but different implementation by changing types of parameters
Static or shared: a keyword to define static class, members of static class doesn't require creating instance of that class.
Virtual: indicated that this base class method is to be overridden. [Without specifying virtual keyword also method can be override, but it makes code more understandable]
Sealed: indicates that this base class method not to be override.
Overriding: is a concept of implementing a method in derived class with same definition of the base class method
Shadowing: without overriding a method derived class can do new implementation where parameters, return type & access modifier may differ from the base class implementation, Shadow is the keyword in C#
Constructor: is a method with same name as class, it gives a way to initiate the class members to default values at the time of object creation, automatically calls whenever class object is created
Static constructor: a type of constructor, calls at the first time object creation.
Serialization: is the process of converting object into a stream of bytes. De-serialization is the reverse process.
Delegate: holds a reference to a function. Type safe pointer
Multicast delegate: holds reference to multiple functions, its return type must be void.
Interface and Abstract:
Abstract classInterface
Is a class to provide common fields/members to subclassesIs a collection of member definitions to be implemented in derived class
a class can inherit only 1 abstract classA class can implement many interface
Members of abstract class can have any access modifierAll members are only public by default, it can’t be changed
Abstract class method may or may not have implementationInterface can have only definition of methods, no implementation

1 comment:

Unknown said...

So can we say that OOP's is also an design pattern to achieve more modular, relational and realistic way to solve the problem.