Guidewire

  www.guidewire.com
  www.guidewire.com

Interview Question

Senior Software Engineer Interview San Mateo, CA

Write the function that calculates price of the cup of

  coffee where price of the condiments depends on size of the coffee cup. For example milk cost 10 c for small cup 15 c for medium and 20 c for large
Tags:
java
Answer

Interview Answer

3 Answers

1

You have to index elements of one array of enums by essentially using ordinals of another enum

Interview Candidate on Jan 13, 2011
0

Use Decorator pattern

Yesu on Nov 22, 2013
0

classic decorator design pattern, 23 design patterns book has this.

welcomen on Dec 9, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.