public class CreditCardPayment extends Payment implements IPay {
    String number;
    String name;

    public CreditCardPayment(String number, String name) {
        this.number = number;
        this.name = name;
    }

    @Override
    public void pay(double amount) {
        System.out.println("Bezahlung von " + amount + " CHF mit Kreditkarte " + number + " von " + name);
    }
}
