Created
December 31, 2016 10:23
-
-
Save chrisza4/68ccbe96f33dc4a1bcf50038a3bee9ff to your computer and use it in GitHub Desktop.
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
| public class Invoice { | |
| private bool isForXDepartment; | |
| public Invoice(bool isForXDepartment) { | |
| // บริษัทนี้ถ้าเป็นใบเสร็จของแผนก X จะต้องคำนวณภาษีและส่วนลดแบบพิเศษ | |
| this.isForXDepartment = isForXDepartment; | |
| } | |
| public double calculateSumPrice () { | |
| if (this.isForXDepartment) { | |
| return this.calculateSumPriceForDepartmentX(); | |
| } | |
| else { | |
| return this.calculateSumPrice(); | |
| } | |
| } | |
| private double calculateSumPriceForDepartmentX () { | |
| } | |
| private double calculateSumPrice() { | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment