桥接模式
来源:15-1 桥接模式讲解
 
			杰9407987
2020-12-18
把账户传递到银行实现类,
public ICBCBank(Account account) {
super(account);
}
@Override
Account openAccount() {
System.out.println(“打开中国工商银行账号”);
account.openAccount();
return account;
}
感觉 跟装饰者模式很像啊,即装饰账户类的openAccount()方法
写回答
	1回答
- 
				  geelylucky 2020-12-23 同学,ICBCBank和Account不是一个类型的对象,所以不应该是装饰者模式。 00
相似问题
