Skip to Content
Architectural Patterns
book

Architectural Patterns

by Anupama Murali, Pethuru Raj, Harihara Subramanian J, Pethuru Raj Chelliah
December 2017
Intermediate to advanced
468 pages
13h 12m
English
Packt Publishing
Content preview from Architectural Patterns

Open and close principle – SOLID

The open and close principle of OO programming suggests that the OO software entities such as classes, methods or functions, and modules, should be open for extensions, but closed for any modifications.

Imagine a class that you never need to change, and any new functionality gets added only by adding new methods or subclasses, or by reusing the existing code, and so we can prevent any new defects to the existing code or functionality.

The preceding class diagram shows the application of the open and close principle on the Account class and its subclasses. The account can be any type, savings or current. A ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Software Architecture Patterns

Software Architecture Patterns

Mark Richards
Design It!

Design It!

Michael Keeling

Publisher Resources

ISBN: 9781787287495Other