One Pager Cheat Sheet
- You should be prepared with basic Object-Oriented programming theory when interviewing for a software engineering position.
- Object-Oriented Programming (OOP) is a programming paradigm based on objects, which contain attributes and methods, with four main principles of
inheritance
,encapsulation
,polymorphism
, anddata abstraction
, that provide advantages such as code reuse, flexibility, and improved maintainability. - Only when an
object
is created does memory consumption occur, not based on the number of attributes of the class since classes are merely a logical entity. - In object-oriented programming,
polymorphism
is the ability of an object or a class to exist in multiple forms, and is realized using two types of binding, static and dynamic. - All of the listed
inheritance types
are fundamental features of Object-Oriented Programming. - Encapsulation, abstraction and method/operator overloading are important features of object-oriented programming that allow the binding of data and logic, hiding data and creating multiple methods with the same name respectively.
- Encapsulation is a key feature of Object-Oriented Programming that supports data-hiding and abstraction by making attributes
private
and usingpublic setter and getter methods
to access and modify them. - Exception handling using
try-catch blocks
andfinally block
allow for the graceful handling of errors and exceptions to take place during the execution of a program. - Interfaces have
public
visibility by default, so that any implementation class must adhere to thepublic
exposed methods and attributes when implementing the interface.