Skip to content

Instantly share code, notes, and snippets.

@AppleCEO
Last active October 1, 2021 10:05
Show Gist options
  • Save AppleCEO/afe4bd907092ab3d5a91f37468a5a1c0 to your computer and use it in GitHub Desktop.
Save AppleCEO/afe4bd907092ab3d5a91f37468a5a1c0 to your computer and use it in GitHub Desktop.
class SmartPhone {
let inch: Double
init(inch: Double) {
self.inch = inch
}
func call(to: String) {
print("calling to \(to)")
}
func showYoutube() {
print("Watching Youtube")
}
}
class GalaxyFold: SmartPhone {
var isFolded: 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