Created
April 28, 2020 08:59
-
-
Save alfianyusufabdullah/b633c994f4d32d882bc5a17a4ef6d46e to your computer and use it in GitHub Desktop.
LSP
This file contains hidden or 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
fun main() { | |
println("Hello, world!!!") | |
} | |
open class Product { | |
fun setExpireDate(){ | |
} | |
} | |
class Smartphone: Product(){ | |
fun setExpiredDate(){ | |
super.setExpireDate() | |
} | |
} | |
class Grocery: Product(){ | |
fun setExpiredDate(){ | |
super.setExpireDate() | |
} | |
} |
This file contains hidden or 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
fun main() { | |
println("Hello, world!!!") | |
} | |
open class Product { | |
} | |
open class FoodProduct: Product(){ | |
open fun setExpiredDate(){ | |
//TODO | |
} | |
} | |
class Smartphone: Product(){ | |
} | |
class Grocery: FoodProduct(){ | |
override fun setExpiredDate(){ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment