a00b5a50 | export class Item { constructor(price) { this.price = price; } |
cc733b08 | get tax() { throw "not implemented"; } get subtotal() { return this.price + this.tax; } |
a00b5a50 | } export class AlcoholicBeverage extends Item { |
cc733b08 | get tax() { return this.price * 0.25; } |
a00b5a50 | } export class NormalFood extends Item { |
cc733b08 | get tax() { return 0; } |
a00b5a50 | } export class NonFood extends Item { |
cc733b08 | get tax() { return this.price * 0.0825; } |
a00b5a50 | } |