// {...}
public class Main {
public static void main(String[] args) {
double price = 100;
PaymentStrategy paymentStrategy = new CashPaymentStrategy();
System.out.println("Cash Price: - " + paymentStrategy.pay(price));
paymentStrategy = new CreditCardStrategy();
System.out.println("Credit Card Price: - " + paymentStrategy.pay(price));
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX