Dikshya Subedidikshyasubedi.hashnode.dev·Sep 20, 2023Open/Closed Principle Explain With An Exampleusing System; public class Fighter { private IWeapon _weapon; public Fighter(IWeapon weapon) { _weapon = weapon; } public void Fight() { _weapon.Attack(); } } public interface IWeapon { void Attack(...Open Closed PrincipleAdd a thoughtful commentNo comments yetBe the first to start the conversation.