Q1_20251118074653.webp
quanghoa92

Q1_20251118074653.webp

}
class Sauce Decorator extends DishDecorator (
public Sauce Decorator (Dish dish) (super (dish); }
public String getDescription () {
}
return decorated Dish.getDescription () + ", Sauce";
public double getCost () (
return decorated Dish.getCost () + 0.75;
}
}
1. WHAT DESIGN PATTERN is used in the code above? Identify its name and pattern family
(creational, structural, or behavioral.) (0.5 points)
2. DRAW the class diagram for this pattern. (1 point)
3. DESCRIBE a practical situation in software development where this pattern would be appropriate.
(0.5 points)
Zoom
- FUO
+ 100%
Close
Chưa có bình luận nào.

Thông tin

Category
SWD392
Thêm bởi
quanghoa92
Ngày thêm
Lượt xem
5,908
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom