Ensure derived classes are substitutable for Base classes with Liskov’s Substitution Principle


Contracts, Promises & APIs


Definitions



As time progresses, machines are taking over! A new category of workers is now introduced. Robots. Android and Bots which work all the time on manual tedious jobs.Untiring & dedicated. Clearly, a robot “is-a” worker and since we are super smart and we have implemented Workers with OCP, we happily define a new implementation known as Robot. The client has completely abstracted from this new kind worker and everything works as normal. Or does it?

Comments

Popular posts from this blog

6 point design guide for Generation Z

What is a Serverless Architecture