viernes, 9 de diciembre de 2011

Ejercicio reglas de negocio





The exercise
Mike loves sandwiches.  He loves them so much that after visiting his favorite sandwich store in New York, he realized that he could organize a better process and offer a lower price just by writing down a few rules for his employees.  He lays the ingredients out so that his customers can see their choices and so that his staff can quickly assemble the sandwiches.  The rules for assembling ingredients into a customer's sandwich are as follows:
Bread:  Every sandwich must have exactly one bread.  (Mike has three choices for bread:  White, wheat, and sourdough.)  A patron must choose a half or a whole loaf for a sandwich.
Meat:
  • A regular sandwich must have at most one meat.
  • A meat-lover's sandwich must have at most two meats.
  • (Mike offers 5 choices for meat:  Turkey, Roast Beef, Ham, Salami, Pepperoni.)
Cheese:  A sandwich must not have more than one cheese.  (Mike offers American and Swiss cheese.)
Vegetables:  A sandwich must have all the vegetables that a patron wishes.  (Mike offers lettuce, tomato, peppers, onions, olives, sprouts, and pickles.)

No hay comentarios:

Publicar un comentario