Last active
May 31, 2021 06:17
-
-
Save sidd-kulk/5f7a5ce9a44af2a3448b8943f1cd86d7 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
public class Customer { | |
public String type; | |
} | |
public class ProcessOrder | |
{ | |
public int getOrderGrandTotal(Customer customer, int subTotal) | |
{ | |
if (customer.type.equals("EMPLOYEE")) | |
{ | |
return subTotal - 20; | |
} | |
else if (customer.type.equals("NON_EMPLOYEE")) | |
{ | |
return subTotal - 10; | |
} | |
return subsTotal; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment