oop-polymorphism

Official

Flexible, interchangeable components.

AuthorTheBushidoCollective
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Use this skill when designing object-oriented systems that benefit from interchangeable implementations behind a common interface. It helps you decouple callers from concrete classes and enables runtime substitution of components.

Core Features & Use Cases

  • Interface-based polymorphism: Define a single interface and multiple implementations to swap behavior without changing client code.
  • Extensible architectures: Add new implementations (e.g., CreditCard, PayPal, BankTransfer) without touching existing usage sites.
  • Use Case: Build a payment processor that can try multiple methods and select the first valid option at runtime.

Quick Start

Create a PaymentMethod interface with process() and isValid() methods, implement CreditCard, PayPal, and BankTransfer, and wire them into a PaymentProcessor that iterates available methods until one succeeds.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: oop-polymorphism
Download link: https://github.com/TheBushidoCollective/han/archive/main.zip#oop-polymorphism

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository