From time to time I find myself in the hiring process. Over the years I have collected a series of Question and Answers. They are my go to notes when I am either interviewing or being interviewed. Just thought I would share a bit with you today…
What are the The Four Fundamental Object Oriented Programming (OOP) Concepts?
Encapsulation is the packing of data and functions into a single component. It allows selective hiding of properties and methods in an object by making the fields in a class private and providing access to the fields via public methods.
The main benefit of encapsulation is the ability to modify implemented code without breaking the code of others who use the code. With this feature Encapsulation gives maintainability, flexibility and extensibility to the code.
Polymorphism refers to functionally of different classes with identically named methods or properties that can be used interchangeably by client code at run time.
The Inherits statement is used to declare a new class, called a derived class, based on an existing class, known as a base class. Derived classes inherit, and can extend, the properties, methods, events, and constants defined in the base class.
Abstraction is the combining similar functions into a single construct to hide all but the relevant data about an object in order to reduce complexity and increase efficiency.