Có những tình huống phổ biến khi các lớp học chỉ khác nhau về hành vi của họ. Đối với trường hợp này là một ý tưởng tốt để cô lập các thuật toán trong các lớp riêng biệt để có khả năng chọn thuật toán khác nhau trong thời gian chạy.
Xác định một gia đình của các thuật toán, gói gọn mỗi người, và làm cho họ thay đổi được. Chiến lược cho phép các thuật toán khác nhau một cách độc lập từ các khách hàng mà sử dụng nó.
đang được dịch, vui lòng đợi..