Skip to content

Instantly share code, notes, and snippets.

@matiasdim
Created December 4, 2020 19:18
Show Gist options
  • Save matiasdim/3cbc9470a88b6eb8a508e8733eb230e9 to your computer and use it in GitHub Desktop.
Save matiasdim/3cbc9470a88b6eb8a508e8733eb230e9 to your computer and use it in GitHub Desktop.
protocol ATM {
func withdrawMoney()
}
protocol ExquisiteATM: ATM {
func depositMoney()
}
// Simple ATM Machine CANNOT deposit money
class simpleATM: ATM {
func withdrawMoney() {
// Logic to withdraw money
}
}
class greatATM: ExquisiteATM {
func depositMoney() {
// Logic to deposit money
}
func withdrawMoney() {
// Logic to withdraw money
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment