- Home
- Skills
- Agents & Orchestration
- Oop Concepts
Works with the AI Agents you already use
Oop Concepts
Design object-oriented software from requirements: the 4 pillars, SOLID, GoF design patterns, composition vs inheritance, interface vs abstract class, coupling and cohesion, UML class diagrams, OOP anti-patterns, and when OOP fits vs procedural/functional.
Free
Oop Concepts
Example session with this skill installed
I need to design a library management system where members can borrow books, but some books are reference-only. Use CRC cards and favor composition.
- Read your context and instructions
- Compiled the oop concepts
I have analyzed the library management requirements. By separating the borrowing logic from the book identity, we can handle reference-only constraints without complex inheritance.
Library System Design (CRC & Composition)
CRC Cards
| Class | Responsibilities | Collaborators |
|---|---|---|
| LibraryBook | Knows its title, ISBN, and BorrowingPolicy. Delegates availability checks to policy. | BorrowingPolicy |
| Member | Knows its borrowing history and current limits. Can request a checkout. | LibraryBook, Loan |
| BorrowingPolicy | Interface. Determines if a book can be checked out and for how long. | - |
| Loan | Tracks the due date and return status of a specific checkout event. | Member, LibraryBook |
Composition Architecture (Python)
from abc import ABC, abstractmethod
from datetime import datetime, timedelta
class BorrowingPolicy(ABC):
@abstractmethod
def is_eligible(self) -> bool:
pass
class ReferenceOnlyPolicy(BorrowingPolicy):
def is_eligible(self) -> bool:
return False
class StandardBorrowingPolicy(BorrowingPolicy):
def is_eligible(self) -> bool:
return True
class LibraryBook:
def __init__(self, title: str, policy: BorrowingPolicy):
self.title = title
self._policy = policy # Composition: Policy is injected
def can_be_borrowed(self) -> bool:
return self._policy.is_eligible()
# Usage
ref_book = LibraryBook("Rare Manuscript", ReferenceOnlyPolicy())
circulating_book = LibraryBook("Clean Code", StandardBorrowingPolicy())
Next steps
- Define the
Loanclass to handle fine calculations for overdue items. - Implement a
Memberrepository to manage persistence. - Create a Mermaid class diagram to visualize the
MembertoLoanmultiplicity.
Connects securely to your tools. The creator never sees your data.
About this skill
Design object-oriented software from requirements: the 4 pillars, SOLID, GoF design patterns, composition vs inheritance, interface vs abstract class, coupling and cohesion, UML class diagrams, OOP anti-patterns, and when OOP fits vs procedural/functional.
Java code is illustrative only and not validated via compiler. Mermaid diagrams require external rendering support.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account
- Software
Python
Permissions
What's inside
Frequently Asked Questions
New in Agents & Orchestration
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.