void main() {
Calculator c = new Calculator();
print("The gross total : ${c.ret_tot()}");
print("Discount :${c.ret_dis()}");
}
class Calculate_Total {
int ret_tot() {}
}
class Calculate_Discount {
int ret_dis() {}
}
class Calculator implements Calculate_Total,Calculate_Discount {
int ret_tot() {
return 1000;
}
int ret_dis() {
return 50;
}
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266192.html