Last active
December 2, 2020 20:22
-
-
Save matiasdim/8d9feab56e9537f102b28711ebbcf95f to your computer and use it in GitHub Desktop.
Single-Responsability(Broken)
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
class Employee { | |
let name: String | |
let email: String | |
init(_ name: String, _ email: String) { | |
self.name = name | |
self.email = email | |
} | |
func getInfo() -> String { | |
return "Employee named \(name) has email \(email)" | |
} | |
func validateEmail() -> Boo { | |
// Code that validates email | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment