---
title: "Discussion on \"Open-Closed Principle\" | Hashnode"
description: "Discussion on \"Open-Closed Principle\". Open for Extension and Closed for Modification.\nWe understand this with simple user class\n@startuml\nclass User {\n  + id: int\n  + age: int\n  + name: string\n}\n@enduml\n\nnow I want to add new feature if the user is privileged capture the phone number to ..."
url: "https://hashnode.com/posts/open-closed-principle/665af21426d96989c229834f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Open-Closed Principle](https://gurupalaniveltech.hashnode.dev/open-closed-principle?utm_source=hashnode&utm_medium=feed)

Open for Extension and Closed for Modification. We understand this with simple user class @startuml class User { + id: int + age: int + name: string } @enduml now I want to add new feature if the user is privileged capture the phone number to ...

Jun 1, 2024 · 1 min read · gurupalaniveltech.hashnode.dev  
Read the article

-   [#design-principles](https://hashnode.com/tag/design-principles)

## Written by

[Palanivel SundaraRajan GugaGuruNathan](https://hashnode.com/@GuruRajan)

@GuruRajan · India

  
[View profile](https://hashnode.com/@GuruRajan)

Software Developer

Hi , thanks for stopping by! I am full-stack developer and I'm passionate about making complex concepts clear through code and visuals. After all, a picture (and a code snippet) is worth a thousand words! I hope you enjoy my blog.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
