LLD - Design — Online Shopping Cart
Find the bug in this code snippet implementing Payment Strategy Pattern:
interface PaymentStrategy {
void pay(double amount);
}
class CashPayment implements PaymentStrategy {
public void pay(int amount) {
System.out.println("Paid " + amount + " in cash");
}
}