Object Orientated

This is a style of programming that represents concepts as objects, actions as methods and attributes as properties.
VBA does not support implementation inheritance.
VBA does support polymorphism.
VBA does support encapsulation.


Inheritance

Ability for a derived class to inherit the methods of a base class.
VBA does not support implementation inheritance.
Interface Inheritance - This is provided by the Implements keyword and lets you implement an interface differently in multiple classes.
Implementation Inheritance - Not supported in VBA. This is the ability to inherit method implementation from a base class in a derived class.
VBA does not implement derived classes, it exposes the methods that need to be implemented.
VBA does not implement interfaces, it exposes the methods that need to be implemented.


Polymorphism

Ability for a base class to implement from a derived class.
Ability for an object to decide its implementation at runtime.
If there are two classes that implement the same method you can invoke the method without knowing which class the object has been derived from.


Encapsulation

Ability to keep fields, methods and properties private in a class to prevent them being accessed from outside the class.
Also known as Data Abstraction.
Using Private keyword to hide variables,methods and properties inside a class.



© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited TopPrevNext