Created
December 4, 2020 19:18
-
-
Save matiasdim/3cbc9470a88b6eb8a508e8733eb230e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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