Skip to content

Homework exercises for Kodeco's OOP and POP Programming course

Notifications You must be signed in to change notification settings

jdelacuesta/iOS-OOP-POP-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

iOS OOP & POP Programming Exercises

This repository contains Swift playground exercises demonstrating Object-Oriented Programming (OOP) and Protocol-Oriented Programming (POP) concepts.

Exercise 1: Social Media Post Class

  • ✅ 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

Exercise 2: Shopping Cart Singleton

  • ✅ 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

Exercise 3: Payment Processor Protocol

  • ✅ 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

Releases

No releases published

Packages

No packages published