Opening book details…
Can I read Understanding Open-Closed Principle in Java on EtoBox?
Understanding Open-Closed Principle in Java by Rajesh Jangra is a document available to read on EtoBox.
What is Understanding Open-Closed Principle in Java about?
The document discusses the Open-Closed Principle (OCP) which states that code should be open for extension but closed for modification. It provides an example of a bank account system that initially only supports savings accounts, but is then extended to also support current accounts without modifying existing code. This is achieved by defining an interface for accounts and having savings and current accounts implement that interface. This allows new account types to be added without changing core transacti
- Author
- Rajesh Jangra
- Language
- EN