题目内容

A likely violation of the Demeter principle:Which class?

A. Veem
B. Blurk
C. SnitVeem
D. BlortVeem
E. JitVeem
F. No Violation

查看答案
更多问题

A likely violation of the Demeter principle:Which method?

A. zike
B. initialize
C. get_veem
D. wurgle
E. the class as a whole
F. No Violation

Customers can add milk, syrup, whipped cream, or any combination of these to their coffee. Each ingredient adds to the price and adds a preparation step after brewing.

A. Template or Strategy pattern
B. Decorator pattern
C. Adapter or Facade pattern
D. Null Object pattern Proxy pattern
E. Subclass inheritance with no other design pattern

Customers who drink their coffee in the restaurant have the option of getting free refills. The CoffeeWithFreeRefill product behaves the same as a Coffee except it also has a refill() method.

A. Template or Strategy pattern
B. Decorator pattern
C. Adapter or Facade pattern
D. Proxy pattern
E. Subclass inheritance with no other design pattern
F. Null Object pattern

Alyssa would like to sell gift cards for specific coffee drinks. Gift cards obviously don't need to be brewed or prepared, but in all other respects, gift card purchases should be recorded as and behave the same as the purchases of regular drinks.

A. Template or Strategy pattern
B. Decorator pattern
C. Adapter or Facade pattern
D. Null Object pattern
E. Proxy pattern
F. Subclass inheritance with no other design pattern

答案查题题库