This is a question which I was asked in a senior software engineer position for a Berlin based company.

SOLID is a set of 5 principles, which is followed to make maintainable systems.

S — Single Responsible Principle

O — Open-Closed Principle

L — Liskov Substitution Principle

I — Interface Segregation Principle

D-Dependency Inversion Principle

Single Responsibility Principle(SRP)

A class should have one and only one…