This repository contains Swift playground exercises demonstrating Object-Oriented Programming (OOP) and Protocol-Oriented Programming (POP) concepts.
- ✅ Demonstrates basic class creation with properties and methods
- ✅ Implements a Post class with author, content, and likes properties
- ✅ Includes a display() method to format post information
- ✅ Implements the Singleton design pattern with a ShoppingCartSingleton class
- ✅ Uses composition for managing Product objects
- ✅ Includes discount strategies with the Strategy pattern
- ✅ Demonstrates cart management functionality
- ✅ Uses protocol-oriented programming with the PaymentProcessor protocol
- ✅ Implements error handling with custom PaymentError types
- ✅ Creates concrete implementations (CreditCardProcessor, CashProcessor)
- ✅ Demonstrates try-catch error handling for payment processing