Guidewire Interview Question: Write the function that calcu... | Glassdoor

Find your next job here

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

Interview Answer

5 Answers


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

Interview Candidate on Jan 13, 2011

Use Decorator pattern

Yesu on Nov 22, 2013

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

welcomen on Dec 9, 2013

This is classic builder pattern

Anonymous on Mar 7, 2017

What is meant by artificially incorrect implementation of set class?

Anonymous on Apr 14, 2017

Add Answers or Comments

To comment on this, Sign In or Sign Up.