package hierarchie

import "fmt"

type PaymentStrategy interface {
	Pay(amount int) error
}

type CreditCardPayment struct {
}

func (c *CreditCardPayment) Pay(amount int) error {
	fmt.Println("pay with CreditCard")
	return nil
}

type PaypalStrategy struct {
}

func (p *PaypalStrategy) Pay(amount int) error {
	fmt.Println("pay with PayPal")
	return nil
}
