chapter 13

This commit is contained in:
hellerve committed 2018-07-27 18:35:39 +02:00
1 parent 580795cd2b
commit 668248bd84
6 files changed
+115 -7

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
class Doughnut {
fn cook() {
print("Fry until golden brown.");
}
}
class BostonCream < Doughnut {}
BostonCream().cook();
+14
View File
@@ -0,0 +1,14 @@
class Doughnut {
fn cook() {
print("Fry until golden brown.");
}
}
class BostonCream < Doughnut {
fn cook() {
super.cook();
print("Pipe full of custard and coat with chocolate.");
}
}
BostonCream().cook();