Start learning 50% faster. Sign in now
The Open/Closed Principle (OCP) is one of the SOLID principles for object-oriented design. 1. Key Idea: Software entities like classes, modules, and functions should be extendable without altering existing code. 2. Implementation: Achieved through techniques like inheritance, polymorphism, or interfaces that allow new functionality to be added without modifying the original codebase. 3. Benefits: Promotes code reusability, reduces the risk of introducing bugs into stable code, and facilitates easier maintenance and scaling. 4. Example: A class for processing payments could use an interface for payment methods. Adding a new payment type would require extending the interface, not modifying the class. This principle ensures that software systems are adaptable to new requirements without jeopardizing existing functionality. Why Other Options Are Incorrect: • A) SRP: Focuses on assigning one responsibility to each class/module but does not address extensibility. • C) LSP: Ensures derived classes can replace base classes without altering behavior, unrelated to modification. • D) ISP: Advocates for creating specific interfaces for clients, reducing unnecessary dependencies. • E) DIP: Encourages high-level modules to depend on abstractions rather than concrete implementations.
What covers professionals for negligence and errors or omissions that injure their clients?
What is the purpose of a "warranty" in an insurance policy?
Insurance that pays claims arising out of incidents that occur during the policy term, even if they are filed many years later is known as?
A policy that covers the loss of baggage during travel is:
The 'Third-Party Liability' cover in a motor insurance policy is mandatory in India as per the:
Which of the following public sector company have the highest shareholding in Agriculture Insurance Company of India Limited (AIC)?
Which term referring to property coverage for the perils of burglary, theft and robbery?
The section of the policy that outlines what is NOT covered is called:
What are moral hazards in underwriting?
Section 64VB requires what action for a policy to be effective?