Could you please tell me if my diagram is correct?
I especially care about relations between PaymentService
and Customer
,
Payment
, Customer
I guess that:
class Customer {
private List<Payment> payments;
//..
public boolean pay() {
return PaymentService.pay(this.payments);
// calling the static method of the class PaymentService
}
}
interface Payment {
// knows nothing about Customer
}
class PaymentService {
public static boolean pay (List<ayment> payments) {
// the magic here is return result
}
}
UPD: Now, I noticed that why I use static member, but it does not touch my question.
What is the common way to construct payment systems (It looks like a general task)?
I guess that the FFCustomer should have only one account. And an account exists only while an FFCustomer exists.
UPD: