Created
March 13, 2025 19:49
-
-
Save trikitrok/dca9be4649a5275237ba6266422a13b3 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 interface Customer | |
{ | |
double GetEarnedDiscount(); | |
void AddToOrdersHistory(Order order); | |
} | |
// Null Customer's implementation | |
public class NotFoundCustomer : Customer | |
{ | |
private readonly double DEFAULT_DISCOUNT = 1.0; | |
public double GetEarnedDiscount() | |
{ | |
return DEFAULT_DISCOUNT; | |
} | |
// Refused bequest??? | |
public void AddToOrdersHistory(Order order) | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment