In Static method of descriptive programming, we provide the set of properties and values directly in a single line, in form of the string arguments. Here is the format/syntax of DP: object’s Class Name(“property name:=property value”).Method
The second way to write descriptive programming is by using the Description object. This way is also known as Programmatic Description. Description Object also do the same thing as static way do but there are some differences. Description Object stores the properties and values of a particular object in an instance of that… Continue reading →
Delegate Interface We can define multiple methods by using delegate. Interface defines only a single method. No need to implement multiple times. Need to implement the interface multiple times. Fastest to call at runtime when we know all the parameter types. Well designed interfaces are allowed for generic uses which… Continue reading →
It is a bit similar to a class. Semantically, structures are known as value types, while classes as reference types. We don’t instantiate an object using the New keyword while working with a structure. We can not inherit from a structure.
An Abstract class is a class with some common/certain implementations and defines abstraction for other services which are implemented in its concrete sub classes, whereas interface only have method declaration with zero implementations. The difference between Abstract class and An Interface is that if u call Abstract class then u… Continue reading →
Shadowing is a concept of polymorphism usage in Object Oriented Programming. This is a concept related to over-riding functions at run-time or making a shadow of the object’s methods in the inherited classes. Though it is not much used in programming but it may be used sometimes and its usage… Continue reading →
To work with classes and modules, the key concepts to know are definition, access, inheritance, constructors, destructors, delegates, abstract classes & interfaces.
Private constructor is used if you do not want other classes to instantiate the object and to prevent subclassing. The instantiation is done by a public static method (i.e. a static factory method) within the same class. Used in the singleton design pattern. Used in the factory method design pattern… Continue reading →
Modifier Used with Description public Outer classes, interfaces, constructors, Inner classes, methods and field variables A class or interface may be accessed from outside the package. Constructors, inner classes, methods and field variables may be accessed wherever their class is accessed. protected Constructors, inner classes, methods, and field variables. Accessed… Continue reading →
Queue Stack First item to be inserted is the first one to be removed. Allows access to only last item inserted. This mechanism is called First In First Out (FIFO). An item is inserted or removed from one end called the “top” of the stack. This is called Last In… Continue reading →