CS计算机代考程序代写 b’5c4f3670e8475e1eba7d165929cec10d57da92′

b’5c4f3670e8475e1eba7d165929cec10d57da92′

blob 350�package programmingexample6;

public class DiscountDecorator extends Decorator {

private double discount;

public DiscountDecorator(Product product, double discount) {
super(product);
this.discount = discount;
}

@Override
public double getPrice() {
return super.getPrice() * (1 – discount/100);
}

}