Last active
April 10, 2019 20:19
-
-
Save mohamed-gara/181104c17fad24df80ba049aea450b81 to your computer and use it in GitHub Desktop.
This file contains 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
import {Customer} from './customer'; | |
import {Order} from './order'; | |
export class OrderDiscounter { | |
constructor(public customer: Customer, public order: Order) {} | |
discountedAmount() { | |
return (100 - this.customer.discount()) * this.order.amount; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment