Last active
October 1, 2021 10:10
-
-
Save AppleCEO/9a6fb0ea7c63dbcd95fa314891e913a7 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
class SmartPhone { | |
let inch: Double | |
init(inch: Double) { | |
self.inch = inch | |
} | |
func call(to: String) { | |
print("calling to \(to)") | |
} | |
func showYoutube() { | |
print("Watching Youtube") | |
} | |
} | |
protocol Foldable { | |
var isFolded: Bool { get } | |
} | |
class GalaxyFold: SmartPhone, Foldable { | |
var idsFolded: Bool = false | |
} | |
let galaxyFold = GalaxyFold(inch: 7.3) | |
galaxyFold.isFolded = true | |
galaxyFold.isFolded = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment